AVRISP MKII 不适用于 Linux 上的 AVRDUDE
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5412727/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
AVRISP MKII doesn't work with AVRDUDE on Linux
提问by Katy Levinson
The system sees something is plugged in when I plug and unplug it:
当我插入和拔出它时,系统看到某些东西被插入:
bluehat@Matapan:/dev$ tail -f /var/log/syslog
Mar 23 15:36:35 Matapan kernel: [156082.112874] usb 7-1: new full speed USB device using uhci_hcd and address 6
Mar 23 15:47:19 Matapan kernel: [156726.248081] usb 7-1: USB disconnect, address 6
Mar 23 15:47:29 Matapan kernel: [156736.200148] usb 6-1: new full speed USB device using uhci_hcd and address 3
AVRISP MKII should rely on cdc-acm:
AVRISP MKII 应该依赖 cdc-acm:
bluehat@Matapan:/dev$ modinfo cdc-acm -V
module-init-tools version 3.12
So it should be able to see it just fine, and yet I am unable to write to it.
所以它应该能够很好地看到它,但我无法写信给它。
avrdude -p m1280 -c avrispmkII -P usb -U test.hex
Returns
退货
avrdude: usb_open(): cannot read serial number "error sending control message: Operation not permitted"
avrdude: usb_open(): cannot read product name "error sending control message: Operation not permitted"
avrdude: usbdev_open(): error setting configuration 1: could not set config 1: Operation not permitted
avrdude: usbdev_open(): did not find any USB device "usb"
采纳答案by Katy Levinson
It turns out that Ubuntu will acknowledge that the object is there but not play nicely with it until you fix up some of your udev rules. Thanks to http://steve.kargs.net/bacnet/avr-isp-mkii-on-ubuntu-hardy/which provided files that only needed a little updating.
事实证明,Ubuntu 会承认该对象在那里,但在您修复一些 udev 规则之前不会很好地使用它。感谢http://steve.kargs.net/bacnet/avr-isp-mkii-on-ubuntu-hardy/提供的文件只需要一点点更新。
Create new file /etc/udev/avrisp.rules
创建新文件 /etc/udev/avrisp.rules
SUBSYSTEM!="usb", ACTION!="add", GOTO="avrisp_end"
# Atmel Corp. JTAG ICE mkII
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2103", MODE="660", GROUP="dialout"
# Atmel Corp. AVRISP mkII
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2104", MODE="660", GROUP="dialout"
# Atmel Corp. Dragon
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2107", MODE="660", GROUP="dialout"
LABEL="avrisp_end"
Now create a virtual link to the file and give it a rule priority
现在创建文件的虚拟链接并为其指定规则优先级
cd /etc/udev/rules.d
sudo ln ../avrisp.rules 60-avrisp.rules
Check you're in the dialout group
检查您是否在拨出组中
groups
Restart udev
重启udev
sudo service udev restart
Hooray!
万岁!
回答by antler
For Ubuntu 12.04, there's a minor change that must be carried out to the configuration that Katy posted:
对于 Ubuntu 12.04,必须对 Katy 发布的配置进行小幅更改:
All occurrences of SYSFSshould be replaced with ATTR
所有出现的SYSFS都应替换为ATTR
Additionally, if you're still having problems, make sure you have installed all the required dependent libraries. I found that I had to install the uisppackage as well.
此外,如果您仍然遇到问题,请确保您已安装所有必需的依赖库。我发现我还必须安装uisp包。
If restarting udev doesn't make a difference, unplugging the programmer and plugging it in back in does.
如果重新启动 udev 没有任何区别,则拔掉编程器并将其重新插入。
回答by Horaz
Seems they changed it again in 12.10
The Subsystem is now "usb"
似乎他们在 12.10 中再次更改了
子系统现在是“usb”
I found a command which shows what you need. For that you just need to know the Bus and Device number from the plugged device (use lsusb)
我找到了一个显示您需要的命令。为此,您只需要知道插入设备的总线和设备编号(使用 lsusb)
Bus 003 Device 010: ID 03eb: lsusb
总线 003 设备 010:ID 03eb:lsusb
So my Bus number from the isp is 003 and Device is 010 (edit the end /003/010 to your needs)
所以我的来自 isp 的总线号是 003,设备是 010(根据您的需要编辑结尾 /003/010)
udevadm info --attribute-walk --name=bus/usb/003/010
udevadm 信息 --attribute-walk --name=bus/usb/003/010
shows among many other things
展示了许多其他东西
SUBSYSTEM=="usb"
ATTR{idVendor}=="03eb"
ATTR{idProduct}=="2104"
子系统==“usb”
ATTR{idVendor}=="03eb"
ATTR{idProduct}=="2104"
Replace/change the created rule above and everything should work
替换/更改上面创建的规则,一切正常
If there are other Problems the Command will show them to you, it checks the rules (found a typo that way :)) If there is no error it won't show anything (Didn't realise for some time)
如果有其他问题,命令会向您显示它们,它会检查规则(这样发现了一个错字:))如果没有错误,它不会显示任何内容(有一段时间没有意识到)
回答by Uberdaff
Updated rule that works for 13.10:
适用于 13.10 的更新规则:
SUBSYSTEM!="usb", ACTION!="add", GOTO="avrisp_end"
# Atmel Corp. JTAG ICE mkII
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2103", MODE="660", GROUP="dialout"
# Atmel Corp. AVRISP mkII
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2104", MODE="660", GROUP="dialout"
# Atmel Corp. Dragon
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2107", MODE="660", GROUP="dialout"
LABEL="avrisp_end"
Based on previous posts about changes.
基于之前关于更改的帖子。
回答by Stephan Korsholm
I used the following udev rules file to get it working on Fedora 19:
我使用以下 udev 规则文件使其在Fedora 19 上运行:
SUBSYSTEM!="usb", ACTION!="add", GOTO="avrisp_end"
# Atmel Corp. JTAG ICE mkII
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2103", MODE="660", GROUP="dialout"
# Atmel Corp. AVRISP mkII
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2104", MODE="660", GROUP="dialout"
# Atmel Corp. Dragon
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2107", MODE="660", GROUP="dialout"
LABEL="avrisp_end"
As you can see, some minor things are different from what is suggested above. Also I had to restart the computer. Using "udevadm control --reload" was not enough.
如您所见,一些小事情与上面建议的不同。另外我不得不重新启动计算机。使用“udevadm control --reload”是不够的。