3
votes

My previous question, Android cannot talk to Arduino using AVRDUDE, has been resolved. I can now connect my Nexus 7 to my Arduino Uno. The full command I am running is this:

/system/xbin/su (getting root here)
/data/data/jackpal.androidterm/local/bin/avrdude -F -V -c arduino -p ATMEGA328P -P /dev/bus/usb/002/002  -b 115200 -C /data/data/jackpal.androidterm/local/etc/avrdude.conf -U flash:w:led.hex

Here I am trying to put the hex file on the Arduino. I do however get the following error:

avrdude: ser_open():can't set attributes for device "/dev/bus/usb/002/002": Inappropriate ioctl for device ioctl("TIOCMGET"): Bad file desriptor

1
I am uploading the file from my mac, and I get: avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.00s avrdude: Device signature = 0x1e950f avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option. avrdude: erasing chip avrdude: reading input file "led.hex" avrdude: input file led.hex auto detected as Intel Hex avrdude: writing flash (214 bytes): Writing | ################################################## | 100% 0.04sHansStam
On Android I upload exactly the same file, so the led.hex file itself is 100% correct.HansStam

1 Answers

4
votes

It turns out I was using the wrong port. I used /dev/bus/usb/002/002 while I should have used ttyACM0.