I'm going to need to integrate a Java application that I wrote with a medical device that uses a serial port for communications. This device is rather expensive, and also not so portable.
I'd like to be able to test code wherever I happen to be, but you can only do so much before you need to plug in your serial device and start testing.
So, I'm looking for a cheap, portable electronic device that uses a serial port for communication. It only needs to communicate one way (i.e. I only need to collect data from it). In this way, I can be sitting at my local coffee shop, plug in my serial to USB connector, hook up this mystery device, and start receiving data.
EDIT:
For those interested in my strange predicament, I'm connecting to a Tanita scale TBF-300A
web site
Communication Standard: EIA RS-232C Compatible
Communication Method: Asynchronous
Baud Rate: 2400bps
Data Length 7bits
Parity: EVEN
Stop Bit: 1bit
Someone scans a barcode, steps on the scale, and my program feeds the info into a database like this:
adobe air -> blazeds -> java -> hibernate/spring -> HSQL db file
My guess is that I'm going to write a java app that takes the serial port information and redirects it to a TCP port that my air app can listen to. This is my guess, for now.
You might want to look at com0com. This lets you create virtual COM ports on your computer and connect them together in pairs. With this, you can write a small test application that emulates the behavior of your "mystery device" and writes data to one of these virtual COM ports, and have your other application read data from the other COM port.
With this setup you can do any testing that does not require plugging the actual medical equipment, without purchasing any external device. To your application it will look like a real COM port.
Edit:
com0com is Windows-only, but here are some alternatives for non-Windows platforms:
You might look at some sort of Microcontroller dev board. An Arduino or an MSP430 probably would fit the bill. You will need to write a small amount of code for it, but you could get it to send exactly what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With