Open probonopd opened 8 years ago
I'm having the same problem.
I've got the same problem on Fedora 23, any luck resolving this?
uname -a Linux mythbox.localdomain 4.2.3-300.fc23.x86_64 #1 SMP Mon Oct 5 15:42:54 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
+1, same issue
+1, Same thing on openSUSE Leap 42.1
uname -a Linux chameleon 4.1.21-14-default #1 SMP PREEMPT Sun Apr 17 07:27:45 UTC 2016 (fc187c1) x86_64 x86_64 x86_64 GNU/Linux
+1 uname -a Linux desktop 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux
Maybe someone can use this technique to debug this: https://m.youtube.com/watch?v=-NxoNdTj_7U
I think I found what is an issue here. DigisparkCDC is using three endpoints and bulk transfer on low-speed device, which violates USB protocol (via http://www.recursion.jp/prose/avrcdc/).
Thanks @paulfantom can you propose a fix?
I was searching for a fix, but I came with nothing. Also programming USB shenanigans is way out of my knowledge.
I think i found solution.
DigiCDC is configured to create 1 interrupt endpoint, and 2 bulk endpoints. Bulk endpoints are forbidden for low speed usb (1,5Mbit/s). So this is a bug. Until now Linux kernel was forgiving, because some older hardware had the same bug in theirs firmware.
It seems it's enough to change two exact same lines in DigiCDC.cpp.
from 0x02, /* attrib: Bulk endpoint */
to 0x03, /* attrib: Interrupt endpoint */
I don't know if this change is sufficient for full compliance with USB standard, but i have no more errors in linux logs :) Unfortunately there is possibility, that windows drivers should be also altered. I didn't tested that yet.
Also interesting informations are here: http://www.recursion.jp/prose/avrcdc/driver.html
Where do I find DigiCDC.cpp? I can't find it using the search for this repo.
DigiCDC.cpp is part of DigiCDC library and it is installed somewhere in Arduino's directories. On windows xp i have it in: C:\Documents and Settings\My user\Local settings\appdata\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\DigisparkCDC\
On which system is this working for you? On Ubuntu 16.04 I get immediate kernel module crashes in dmesg when I plug the device in and it loads the user program.
Ok, you're right. After longer period of testing i see, that this changes in the code aren't sufficient.
Update: I'll give up. I see no way to run CDC on two endpoints and without that there is no way to make it compatible with usb standards :/ So if you have older hardware you have to use old kernel. If you can modify firmware of device then better option is to write it with usb-hid class (so still based on V-usb).
I've successfully tested this on windows: https://learn.adafruit.com/trinket-fake-usb-serial/overview
+1
@cnlohr to the rescue ;-)
What? Not sure what I'm supposed to be doing here :-p
AFAIK you aren't "allowed" to do a CDC device over low speed.
Not sure where the DigisparkCDC project "lives", so posting this here.
I keep getting (lots of) "BOGUS urb xfer, pipe 3 != type 1" in dmesg on Linux. When running the
DigisparkCDC > Print
sketch, then the characters on the pseudo-serial console are often garbled, the output looks likePossibly this is caused by something crashing the kernel module?