I have a toy which can be controlled via the computer, using a USB cable that connects to a serial in FTDI port. For portability, I'd like to control this using an arduino, however when I send text commands using Serial.println() my toy device doesn't respond.
Does anybody have advice on how to do this? My only thinking is that the toy FTDI is expecting the data to be wrapped up by a driver, like it would be if it were sent via a computer.
Is that right? In that case do you know what the TTL serial configuration is (speed, start/stop/parity bits) and what messaging protocol is used over that serial link?
Or are you actually using
Arduino -> USB host shield -> USB cable -> FTDI -> TTL serial -> toy
In this case you need to know what sort of USB device the FTDI adapter presents itself as and find or write a suitable USB host driver for it - writing a USB driver is a very substantial piece of work.
It might be worth putting the Arduino in place of the toy so that it can receive the codes that the toy normally gets. Then you would know exactly what the toy needs to receive. There may be some "control" characters that are not normally visible. Alternatively the Arduino might be inserting unwanted line-feeds or the like.
Using the Arduino as a receiver would also allow you to check the baud rate etc.
The toy device is FT232 USB-Serial chip (Linux lsusb call it: 0403:6001). I have already tried using usbmon to sniff all the data being sent to the USB device but it's close to gobblegook.
Putting an arduino in place of the toy sounds useful, but how exactly would I get the data back off the arduino if I'm using the serial data to send commands to it. Should I save it to EEPROM?
I wonder will it stay alive if you power it separately from the USB connection so that you can disconnect from the controller and reconnect to your PC?