-
Notifications
You must be signed in to change notification settings - Fork 1.3k
WIndows 10 CIRCUITPY enumeration issues #1782
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
Comments
We've also just noticed something which looks like an USB enumeration issue on Windows 10, so I thought I'd post in this issue, rather than create a new one. @TheKitty could you test whether a CircuitPython build based on commit 5b0c1c8 works for you ? Background: today, when testing my attempt to rebase the top two commits from https://github.com/debrouxl/circuitpython/commits/master (my modified version targeting the TI-Python Adapter ~ Trinket M0), @critor noticed that after flashing the board with my firmware, the USB connection disappears: neither MSD, nor CDC are visible anymore from the computer. His Windows 10 computer states ~"This device cannot start (code 10)". There's no such issue with the official firmware, or the previous build of my firmware based on 5478610 - the USB connection capability is restored by switching back to either of these. I attempted to find the bad commit manually (since I'm applying patches on top of the circuitpython commits), then I entered the good/bad information produced by critor into
EDIT: critor says that the USB communication against a build produced from https://github.com/debrouxl/circuitpython/commits/master_with_tinyusb_revert works :) |
FWIW, for me, the first bad commit post-dates 4.0.0-beta.6 :) |
@siddacious - Possibly... This may be a timing issue. @hathach Take a look at the report above and let us know if you have any thoughts. |
@tannewt "This device cannot start (code 10)" is probably in the device manager of windows |
@debrouxl @TheKitty @siddacious If you're willing to run these and post the results here, I'd be grateful. If you want to prune the lists for privacy, that's fine. The downloads are listed at the bottom of each page. You probably want the 64-bit version when there's a choice. http://www.nirsoft.net/utils/installed_packages_view.html If you know of a similar utility, great. Belarc Advisor is not as thorough and does not include drivers. |
Another thing that would be helpful is a USB trace. This requires either some hardware (Beagle, usually), or else setting up Wireshark and USBPCap to capture the USB events. If you are familiar with this or have such a device, let us know. @siddacious Are you seeing the same errors as above, or is #1749 different? For instance, if you try before and after the commit @debrouxl has noted, do you see success on a build before that commit? I can make some test builds for you if it would save you time. |
@dhalbert I have seen the "things disappear after flashing" behavior previously with a different board but that wasn't what I've been seeing with my feather m0. I believe it was with my metro m4 when I flashed it with beta 7 to get a backtrace for the i2c issue I reported. I have the above reports but they're too large to inline here. I can give them to you on discord. I will try before and after the commit mentioned. I don't have a beagle but I suppose I could get one if you thought it would be worthwhile. In the meanwhile I can try and get wireshark going. |
@dhalbert was looking through the reports and found this which you had previously mentioned
|
It's very possible that I'm not seeing the same thing as @debrouxl |
@siddacious Thanks for all the info. Don't spend time on the Wireshark stuff for now. Let's see what the new Feather M0 shows. |
You can zip up all the reports in the reports and then include the .zip file here. |
@dhalbert I had already done a capture by the time I saw your comment, so I included captures of a failure and success in the above zip. |
@critor 's tests used a M0-class TI-Python Adapter platform, which was featured several times on the Adafruit blog, against Windows 10 1803 17134.706. AFAWCT, unsurprisingly, the TI-Python Adapter and various M0-based platforms have excellent compatibility: several Adafruit platforms and the Arduino Zero can run TI's firmware verbatim, and the TI-Python Adapter can run at least my improved build of CircuitPython featuring more math functions. Because the device <-> host communication issue is very reliable for him (if the tinyusb merge is part of circuitpython, then the device can never be detected by the computer, otherwise it can always be detected), I had started making the bisection inside tinyusb code, but he wasn't able to test my first build yet. |
@debrouxl I just want to understand clearly what's failing. Tell me if this is correct: You have seen this problem with regular (not just custom) CircuitPython builds at commit 9d43a25 and later. When a board (including several Adafruit boards) is running a CircuitPython build at or later than that commit, then it does not enumerate on your Windows 10 machine.
Yes, if you can get a USBPCap trace of the failure, that would be extremely helpful. Don't use a hub; a direct connection is better. Thanks very much. |
@TheKitty Does the problem happen if you do not use the hub? Does it happen with beta.7, with and without the hub? |
@siddacious |
@dhalbert OK I just saw "Smart Array" and SAS and though it might be related to the SMART issues you noticed earlier this week. |
@critor Could you post the .uf2 you are using, if it is not a CircuitPython build, and point to a GitHub repo commit that it was built from? Are you building off the latest master? You can zip it up and attach it here. What CPU chip is used in the Asus laptops: is it an AMD, or Intel, and what model? |
I'm not building the firmware myself, I've just been testing binaries provided by @debrouxl on my Trinket M0. So I'll let him clarify. |
Today's tests show that he can't reproduce the problem with pristine master (sorry, I should have checked earlier). However, he can reproduce at will with small changes in the USB ares on top of current adafruit/circuitpython master HEAD, which I've pushed at https://github.com/debrouxl/circuitpython/tree/trinketm0_usb_comm_broken_after_tinyusb_change . So it looks like I should have created a separate issue, sorry for polluting this one with what turns out to be probably unrelated. circuitpython_trinketm0_master_nousbhidmidi_20190420_0920_debrouxl.zip |
@debrouxl You have to remove the HID and MIDI devices from the USB descriptor as well. I did that: here's a diff from the branch you linked to above. My changes are the two I haven't tested this other than to see that
The USB stuff is relatively brittle right now. We are going to make it more configurable, but not in 4.0. Have you also disabled a bunch of other stuff to make room, like |
Thanks for pointing tools/gen_usb_descriptor.py, I had missed it :) I understand very well that the 4.0 release is nearing and that you don't want to delay it by spending time making USB more configurable for the benefit of infrequent people targeting an oddball I/O-less platform, and wanting to cram as much math functionality as possible into 184 KB of Flash, despite the usage of DPFP numbers, which are not even CircuitPython's main focus. I'd probably do the same if I were in your shoes ;) I have disabled miscellaneous stuff to save space, in a more or less hacky way. The two (merged) PRs I sent were a result of that work. Upstream changes made since early February have reduced the number of hacks I needed to get the code to build; maybe some of the hunks of the second commit in my branch pinpoint changes which could make sense upstream, but I've already unwittingly hijacked this issue for too long... |
@debrouxl I am impressed you got doubles and associated code into a small build! |
No recent reports of the origianl problem. Closing for now. |
I've had some issues with my CP devices lately.
Or it could be #2 is due to #1.
Issue logged per request of @dhalbert
The text was updated successfully, but these errors were encountered: