AVRISP MKII 无法与 Linux 上的 AVRDUDE 配合使用
当我插拔它时,系统会看到有东西已插入:
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 应该依赖于 cdc-acm:
bluehat@Matapan:/dev$ modinfo cdc-acm -V
module-init-tools version 3.12
所以它应该能够很好地看到它,但我无法写入它。
avrdude -p m1280 -c avrispmkII -P usb -U test.hex
退货
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"
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:
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"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
事实证明,Ubuntu 会承认该对象存在,但在您修复一些 udev 规则之前无法很好地使用它。感谢 http://steve.kargs.net/bacnet/avr-isp-mkii -on-ubuntu-hardy/ 提供只需要一点更新的文件。
创建新文件 /etc/udev/avrisp.rules
现在创建该文件的虚拟链接并为其指定规则优先级
检查您是否在拨出组中
重新启动 udev
万岁!
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.
Create new file /etc/udev/avrisp.rules
Now create a virtual link to the file and give it a rule priority
Check you're in the dialout group
Restart udev
Hooray!
对于 Ubuntu 12.04,必须对 Katy 发布的配置进行一个小更改:
所有出现的 SYSFS 都应替换为 ATTR
另外,如果您仍然如果出现问题,请确保您已安装所有必需的依赖库。我发现我还必须安装 uisp 软件包。
如果重新启动 udev 没有产生任何影响,则拔掉编程器的插头并重新插入就会产生影响。
For Ubuntu 12.04, there's a minor change that must be carried out to the configuration that Katy posted:
All occurrences of SYSFS should be replaced with 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 uisp package as well.
If restarting udev doesn't make a difference, unplugging the programmer and plugging it in back in does.
适用于 13.10 的更新规则:
基于之前有关更改的帖子。
Updated rule that works for 13.10:
Based on previous posts about changes.
好像12.10又改了
子系统现在是“usb”
我找到了一个显示您需要的命令。
为此,您只需要知道插入设备的总线和设备编号
(使用lsusb)
所以我来自 isp 的总线编号是 003,设备编号是 010
(根据您的需要编辑结尾 /003/010)
显示了许多其他内容
替换/更改上面创建的规则,一切都应该正常
如果还有其他问题,命令会向您显示,它会检查规则(这样发现了一个拼写错误:))
如果没有错误,它不会显示任何内容(有一段时间没有意识到)
Seems they changed it again in 12.10
The Subsystem is now "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)
So my Bus number from the isp is 003 and Device is 010
(edit the end /003/010 to your needs)
shows among many other things
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)
我使用以下 udev 规则文件使其在 Fedora 19 上运行:
如您所见,一些小事情与上面建议的有所不同。我还必须重新启动计算机。使用“udevadm control --reload”是不够的。
I used the following udev rules file to get it working on Fedora 19:
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.