Android无法用说话来AVRDUDE Arduino的 [英] Android cannot talk to Arduino using AVRDUDE
问题描述
我使用 AVRDUDE 为Android(的 HTTP://$c$c.google.com/p/andavr/ )。我可以编译ç code。我可以运行
I am using AVRDUDE for Android (http://code.google.com/p/andavr/). I can compile the C code. I can run
$ avr-gcc -Os -DF_CPU=16000000UL -mmcu=atmega328p -c -o led.o led.c
$ avr-gcc -mmcu=atmega328p led.o -o led
$ avr-objcopy -O ihex -R .eeprom led led.hex
都没有问题。然后我尝试运行:
all without issues. Then I try to run:
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
结果是:
avrdude: ser_open(): can't open device "/dev/bus/usb/002/002"; Permission denied
loctl("TIOCMGET"): Invalid argument
avrdude done. Thank you.
的情况是类似的,当我运行:
The situation is similar when I run:
avrdude -F -V -c arduino -p ATMEGA328P -P /dev/bus/usb/002/001 -b 115200 -C /data/data/jackpal.androidterm/local/etc/avrdude.conf -U flash:w:led.hex
我可以证实,的/ dev /巴士/ USB / 002/002
与 OTG 电缆。在连接之前,我跑
I can confirm that /dev/bus/usb/002/002
is the Arduino device connected with the OTG cable. Before connecting, I run
ls -l /dev/bus/usb/002/
和我得到的:
total 0
在我通过USB我的平板电脑连接的Arduino我运行命令:
After I connect the Arduino via USB to my tablet I run the command:
ls -l /dev/bus/usb/002
和我得到
crw-rw---- 1 0 1018 180,128 Mar 24 07:53 001
crw-rw---- 1 0 1018 180,129 Mar 24 07:53 002
这清楚地表明我的Arduino的连接。我很想知道,如果任何人都可以看到我在做什么错。
This clearly shows me that the Arduino is connected. I would love to know if anyone can see what I am doing wrong.
PS:我想创建一个Android应用程序,可直接从Android平板电脑的Arduino编程
PS: I am trying to create an Android application that allows Arduino programming directly from an Android tablet.
推荐答案
报告说,权限被拒绝',你似乎没有使用一个root shell。 尝试素,然后该命令失败。如果您的手机是不是扎根,我不认为它可以工作。
It says 'permission denied' and you do not seem to be using a root shell. Try 'su' and then the command that failed. If your phone is not rooted, I don't think it could work.
我甚至不知道这是否会工作的时候,当你的根,所以请后的结果!我的猜测是,它不会,如果你的手机不作为USB主机(只有一些可以)
I'm not even sure if it will work right when you are root, so please post the result! My guess is that it won't if your phone does not act as usb host (only some can)
这篇关于Android无法用说话来AVRDUDE Arduino的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!