4
votes

I am using an Arduino-compatible board with USB host shield to send and receive serial data throught its USB port.

Note for any beginners out there, this nice video explains how to do Arduino serial transmission over the USB: http://www.youtube.com/watch?v=KYWCkdrCUKg

The Software I am using is Arduino 1.0 on my PC to write, compile and upload the firmware to the Arduino board. I can successfully send and receive serial data between the Arduino and the PC using the Arduino software's "Serial Monitor." The Arduino board's TX light flashes for each byte sent up to the PC. So far so good.

My problem occurs when I disconnect my Arduino's USB cable from the PC and connect to my own USB device -- a FTDI compatible USB slave.

(My Arduino board now has an external power supply to provide USB power. The firmware flashes the Digital Pin 13 LED, so I know that the firmware is running. I checked USB Pin 1 up on the slave so I know it's getting the 5V.)

But now, when the same firmware attempts to send some bytes over to my USB device, the TX light will not flash and nothing gets transmitted. I am thinking that maybe the USB data+ and data- lines might need to be swapped, but I don't know. Can anyone offer some advice?

3
Why unplug from the computer? Shouldn't the USB host shield have a USB port that you should plug things into? Plugging the Arduino slave port into a device will not work.zebediah49
My tablet is plugged into the other USB connector on the Arduino. It ultimately must control my USB slave device connected to the first USB connector. The tablet can communicate through its USB connector to the Arduino and the other USB connector (as mentioned above) is capable of transmitting, but not to my device. And yes, the Arduino with USB host shield is designed to connect to slave devices as per: seeedstudio.com/depot/seeeduino-adk-main-board-p-846.htmlroc524
What specific arduino-compatible board and shield are you using?Craig
I am using the "Seeeduino ADK Main Board" at: seeedstudio.com/depot/seeeduino-adk-main-board-p-846.html It says, "On board USB host makes it easy to interact with USB devices like pen drivers, keyboard, mouse, Bluetooth dongles."roc524

3 Answers

3
votes

Digital Output Pins 0 and 1 are Serial. Try performing your serial RX/TX over those pins to your external device.

Arduino Serial Reference

2
votes

The TX LED is only for communication on the USB port used for uploading your shields. The HOST USB adapter is a different device on different pins. You can actually connect them both at the same time as shown on the image at http://www.seeedstudio.com/wiki/index.php?title=Seeeduino_ADK_Main_Board

Look in Adb.h how the data is actually sent to the board. And strip that down to your needs (as the FTDI is not an Arduino device for which this extra port is primarily advertized).

0
votes

If you directly want to use the RX/TX Pins to communicate serial with your pc, you may need some of these little parts: http://www.ebay.de/itm/6Pin-USB-2-0-zu-TTL-UART-Modul-Serieller-Wandler-CP2102-STC-Ersetzen-Ft232-V1N3-/262814438851?hash=item3d30f615c3:g:-LAAAOSw4DJYgKa8

With them you could communicate over USB when you don't want to use the intern serial to USB driver.

The you use is the TTL protocol.