First post, had my Duemilanove a week and just wish I had bought/discovered it a few years ago. What an excellent bit of kit!!!! ;D
So, back to the subject in hand....I have managed to hook up and tx/rx serial info to a device and also got an RFID chip working too. All fairly straightforward as they are just serial devices running at 9600.
Now I'm looking into how to tx/rx from a USB medical device to retrieve the data.
The device is currently hooked up to my PC via a straight USB connector and there is a virtual serial COM port set up on the PC. I've had a look at the PC code and can see what characters need to be sent...just the USB connectivity/conversion bit is the problem now.
Can anyone recommend what is the best way to hook the board up to the USB device for this to tx/rx the data? Can the onboard USB plug be used and write the data returned to the EEPROM?
Bad news: the Arduino and your medical device are both USB "slaves", and you need a USB "master" to control them. That's usually a PC, but there are some embedded systems with "master" capability. Unfortunately, the Arduino isn't one of them.
You might pop open your other gadget, and discover that it also has something like your Arduino's USB-to-serial chip, making it possible to bypass their USB interfaces and go serial-to-serial. Or you might find it's something completely different. But there's no simple way to do it.
There might be a way to use "software" on the PC to connect them together. This comes to mind --> http://com0com.sourceforge.net/ I've not used it... but I found it while researching a project I was working on.
I know they make USB A-A interface boxes (essentially to allow two PCs or USB masters connect); they aren't cheap. It would be neat if you could buy or build a B-B interface (slave to slave). It should be possible, but it wouldn't be easy.
I would love to interface my Arduino with my G1, but I have two issues:
They are both slave devices
From what I could see of the Android documentation, there isn't any function to access the USB port
I was also musing this morning how it would be neat to root the phone and install AVRdude, etc and the Arduino IDE to create a super-portable Arduino programming kit - unfortunately you run into the same issue.
So, it looks like (if you want to interface with Android phones) the only way to do it is via the headphone/microphone interface (ie, like a modem); unfortunately, you still have the problem that you can't buy the special enhanced mini-USB plugs anywhere (digikey/mouser don't sell them) - you would have to buy such a headset, and hack it for the connector...
I got a VDIP1 FTDI Host Controller for ~20$ it interfaces nicely with a breadboard for prototype board. I'm using it to make the Arduino communicate with a host for a Digital Camera slave device.
Mentions about using it to interface keyboards and that its 8 bit which smells of serial to me!
The block diagram doesn't show any UART or USART, and that chip is designed for use in keyboards, so they almost certainly left it out because they need to save every penny they can.
But, since it apparently has an HID interface on USB, the drivers supplied with the VDIP1 can probably handle it. Probably: people have abused HID to connect all sorts of non-standard stuff to USB, so it might turn out to be a huge job that requires more code than you can stuff into an Arduino.
Thanks Ran - interesting info - I may give that a go then, although I think the hardest thing will be getting it to spit out the 'data' so that it can be read.
As mentioned I've managed to go through the COM code on the PC side to see what control characters to send - though not 100%, so combined with the above it may all be a shot in the dark!!!
The VDIP1 is a host controller interface development kit so this is the one you need to connect to your USB medical equipment.
Having said that you also need to develop the software to do this which means knowing something about the device you are trying to interface to.
What I'm trying to emulate is the PC software that is currently sending set sequences of characters via the USB for different functions (though via a virtual serial port in the software first) to get the device to respond by spitting something out. I can do away with the PC then!
The FT232RL is a USB slave. It won't work for this purpose.
The VDIP1 module is the thing that gives you a chance of getting the Arduino to work as a USB master for your gadget.
I missed it earlier when you mentioned the gadget showed up as a "virtual COM port". It still looks like there's no real USB-to-serial conversion going on: the most likely scenario is that the onboard CPU is taking the bytes written to the simulated UART data register as parallel data on its internal data bus. I.e., that there's no pad or trace on the board where you can solder on a wire and communicate via the Arduino's UART. That means it's pretty much either get the VDIP1 working, or spend a lot of time on the very dicey possibility of decoding the display.