-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cdc-acm example: port disabled by hub #2
Comments
That's quite strange. Can you capture a log with wireshark? I don't have any ideas offhand. |
The Numato Opsis is a little strange in that it has a setup where; This is done so; What could be happening is that the FX2 is somehow causing the FPGA to reset which in turn resets the FX2. There is a jump you can remove which prevents the FPGA from being able to do this reset. I think it's call JRST or something? There is some info at https://opsis.hdmi2usb.tv/features/usb-peripheral.html but there are also some lies I have never got around to fixing. |
Yeah, I was wondering if something like that was happening. That sounds like the most likely explanation. |
Ok, thanks, this may be the problem. I'll test as soon as possible, so most likely on Monday. |
I tried removing the JFX2-RST jumper but it didn't fix the problem, so most likely this is not the FPGA resetting the FX2. I checked the USB traffic using usbmon and Wireshark. I can see multiple BULK IN transfers (EP6) with responses from FX2 resulting in -EOVERFLOW, which in theory means too long data packet, but is probably related to random data on the line. I also tried disabling all the code available for responding on endpoint 6 in cdc example, but the problem still occurs. The So this looks like some interference on the line, but the firmware from hdmi2usb works without a problem on the same hardware and I wonder what makes this CDC example fail. As Wireshark shows only whole transfers, some random data may be sent which causes the hub to consider it as EMI. The problem seems similar to this one, which may suggest that it is somehow linux-specific, but I haven't tested it under Windows. Another strange behavior is that when I switched kernel to older version (5.3.5 -> 4.19.78) usbtest driver gets loaded for the device. On 5.3.5 cdc_acm was being loaded correctly at first, but now after switching back to 5.3.5 from 4.19.78 usbtest is being loaded each time. After manually unbinding the driver and switching it to cdc_acm, the problem happens in the same way (but after restarting the hub usbtest gets loaded again). In case this could be helpful I attach files with:
|
I have an OpenVizsla and a Numato Opsis. I'm fairly busy right now, but if @mithro wants we could arrange something to prioritize this issue. |
Indeed the problem was specific to Numato Opsis and it was the jumper, but it is somehow necessary to remove it before powering on the board, which I didn't suspect as the the problems happens only on a CDC data transfer, so it would seem that jumper could as well be removed after power-up. Anyway the problem is not related to libfx2, so the issue can be closed. |
I tried to start the cdc-acm example on Numato Opsis board. It results in the device being enumerated correctly but when I try to read or write to to serial at /dev/ttyACM0 the kernel disables the device:
It then gets enumerated correctly again, e.g.
I wonder if you have any idea why this would happen. It seems like the device is sending
something when it shouldn't? However I haven't been able to find out which transfer is causing the problem.
The text was updated successfully, but these errors were encountered: