PyBadge - unable to enumerate USB device

Play with it! Please tell us which board you're using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
memfault
 
Posts: 28
Joined: Fri Apr 16, 2021 5:33 am

Re: PyBadge - unable to enumerate USB device

Post by memfault »

adafruit_support_carter wrote:Thanks. Now repeat same process for PyBage #1.
I've missed your reply. Recently took both and tried to connect them, with identical results(like before)

Like I've stated before, dmesg is identical in case of both devices.

One starts CircuitPython, the other one starts simple game I've done quickly in MakeCodeArcade, like I've stated before.

The problem is none of them works over USB (USB LED stays RED, both in normal and bootloader upgrade mode[by pressing 'reset' button).
Both are LC versions, one unit got LC bootloader, the other one got 'normal' (non-LC) bootloader. But it shouldn't matter, because both worked after updating bootloader code for month(or maybe two), few times I've played with it, with my daughter.

Devices shouldn't brick like that, because 'smartctl -a' dumps S.M.A.R.T. data to json file, or sdparm changes APM mode (to prolong like of HDDs, or save-power on SSD drives).

This is the udev rule, I needed to comment, that caused hangs of PyBadges, before they USB connection failed totally:

Code: Select all

 60-hddapm-badpixel.rules:#ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1",  RUN+="/usr/bin/hdparm -B 254 /dev/$name" # causes problems with PyBadge 
.

It's very said that for me, that both PyBadges bricked so quickly, and Adafruit Devs have no clue, how to unbrick them, because both me and daughter really likes the form factor of it (and educational purpose).
Maybe I could try flashing them directly by STLINK v2 clone, or maybe there's some build-up of static electricity(and using jumper on some PINS, when powered-off, would help?)

Please help me, I really love this small devices :-(

User avatar
adafruit_support_carter
 
Posts: 29154
Joined: Tue Nov 29, 2016 2:45 pm

Re: PyBadge - unable to enumerate USB device

Post by adafruit_support_carter »

Devices shouldn't brick like that, because 'smartctl -a' dumps S.M.A.R.T. data to json file, or sdparm changes APM mode (to prolong like of HDDs, or save-power on SSD drives).
Not sure what you were trying here? The storage on the PyBadges does not have SMART capability.

What dmesg output do you get from the second PyBadge?

User avatar
memfault
 
Posts: 28
Joined: Fri Apr 16, 2021 5:33 am

Re: PyBadge - unable to enumerate USB device

Post by memfault »

adafruit_support_carter wrote:
Devices shouldn't brick like that, because 'smartctl -a' dumps S.M.A.R.T. data to json file, or sdparm changes APM mode (to prolong like of HDDs, or save-power on SSD drives).
Not sure what you were trying here? The storage on the PyBadges does not have SMART capability.

What dmesg output do you get from the second PyBadge?
I got inentical USB enumaration errors on both units. I've already tried many comuters with defferents operating systems half year ago.
If I will not forgot, I will get them tomorrow to my workplace, where's mnany windows machines.

And about smartctl/hdparm, they are started automatically as udev rule, when any mass storage is connected. Smartctl is run by KDE Plasma service additionaly, to show desktop notifications (in case of badblocks or something, to warn user befere total failure),

User avatar
memfault
 
Posts: 28
Joined: Fri Apr 16, 2021 5:33 am

Re: PyBadge - unable to enumerate USB device

Post by memfault »

CircuitPython's device:

Code: Select all

[ 8632.793025] usb 2-1.1.1.1.4: new full-speed USB device number 17 using xhci_hcd
[ 8632.869039] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8633.054053] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8633.238043] usb 2-1.1.1.1.4: new full-speed USB device number 18 using xhci_hcd
[ 8633.314051] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8633.494052] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8633.602199] usb 2-1.1.1.1-port4: attempt power cycle
[ 8634.198011] usb 2-1.1.1.1.4: new full-speed USB device number 19 using xhci_hcd
[ 8634.198080] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8634.402138] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8634.610028] usb 2-1.1.1.1.4: device not accepting address 19, error -71
[ 8634.686036] usb 2-1.1.1.1.4: new full-speed USB device number 20 using xhci_hcd
[ 8634.686128] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8634.890095] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8635.098045] usb 2-1.1.1.1.4: device not accepting address 20, error -71
[ 8635.098126] usb 2-1.1.1.1-port4: unable to enumerate USB device
after pressing 'reset' button:

Code: Select all

[ 8707.290038] usb 2-1.1.1.1.4: new full-speed USB device number 21 using xhci_hcd
[ 8707.366049] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8707.551047] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8707.734036] usb 2-1.1.1.1.4: new full-speed USB device number 22 using xhci_hcd
[ 8707.811029] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8707.990052] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8708.098104] usb 2-1.1.1.1-port4: attempt power cycle
[ 8708.694014] usb 2-1.1.1.1.4: new full-speed USB device number 23 using xhci_hcd
[ 8708.694083] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8708.898079] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8709.106035] usb 2-1.1.1.1.4: device not accepting address 23, error -71
[ 8709.182037] usb 2-1.1.1.1.4: new full-speed USB device number 24 using xhci_hcd
[ 8709.182134] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8709.386132] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8709.594028] usb 2-1.1.1.1.4: device not accepting address 24, error -71
[ 8709.594076] usb 2-1.1.1.1-port4: unable to enumerate USB device

User avatar
memfault
 
Posts: 28
Joined: Fri Apr 16, 2021 5:33 am

Re: PyBadge - unable to enumerate USB device

Post by memfault »

Pybadge with custom Makecode game after starting:

Code: Select all

[ 8825.561032] usb 2-1.1.1.1.4: new full-speed USB device number 25 using xhci_hcd
[ 8825.637043] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8825.823050] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8826.006011] usb 2-1.1.1.1.4: new full-speed USB device number 26 using xhci_hcd
[ 8826.082021] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8826.262050] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8826.370155] usb 2-1.1.1.1-port4: attempt power cycle
[ 8826.966030] usb 2-1.1.1.1.4: new full-speed USB device number 27 using xhci_hcd
[ 8826.966110] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8827.170125] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8827.378034] usb 2-1.1.1.1.4: device not accepting address 27, error -71
[ 8827.454034] usb 2-1.1.1.1.4: new full-speed USB device number 28 using xhci_hcd
[ 8827.454129] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8827.658161] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8827.866039] usb 2-1.1.1.1.4: device not accepting address 28, error -71
[ 8827.866135] usb 2-1.1.1.1-port4: unable to enumerate USB device
[ 8830.681018] usb 2-1.1.1.1.4: new full-speed USB device number 29 using xhci_hcd
[ 8830.757019] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8830.942020] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8831.128032] usb 2-1.1.1.1.4: new full-speed USB device number 30 using xhci_hcd
[ 8831.205039] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8831.390042] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8831.498107] usb 2-1.1.1.1-port4: attempt power cycle
[ 8832.095013] usb 2-1.1.1.1.4: new full-speed USB device number 31 using xhci_hcd
[ 8832.095080] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8832.298122] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8832.507019] usb 2-1.1.1.1.4: device not accepting address 31, error -71
[ 8832.584014] usb 2-1.1.1.1.4: new full-speed USB device number 32 using xhci_hcd
[ 8832.584122] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8832.786089] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8832.994022] usb 2-1.1.1.1.4: device not accepting address 32, error -71
[ 8832.994077] usb 2-1.1.1.1-port4: unable to enumerate USB device
After pressing 'reset' button:

Code: Select all

[ 8877.639037] usb 2-1.1.1.1.4: new full-speed USB device number 33 using xhci_hcd
[ 8877.715037] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8877.894042] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8878.078043] usb 2-1.1.1.1.4: new full-speed USB device number 34 using xhci_hcd
[ 8878.154036] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8878.334024] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8878.443051] usb 2-1.1.1.1-port4: attempt power cycle
[ 8879.038033] usb 2-1.1.1.1.4: new full-speed USB device number 35 using xhci_hcd
[ 8879.038130] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8879.242141] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8879.451035] usb 2-1.1.1.1.4: device not accepting address 35, error -71
[ 8879.527038] usb 2-1.1.1.1.4: new full-speed USB device number 36 using xhci_hcd
[ 8879.527145] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8879.730099] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8879.938004] usb 2-1.1.1.1.4: device not accepting address 36, error -71
[ 8879.938071] usb 2-1.1.1.1-port4: unable to enumerate USB device
[ 8882.906023] usb 2-1.1.1.1.4: new full-speed USB device number 37 using xhci_hcd
[ 8882.982046] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8883.167015] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8883.350007] usb 2-1.1.1.1.4: new full-speed USB device number 38 using xhci_hcd
[ 8883.426087] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8883.607074] usb 2-1.1.1.1.4: device descriptor read/64, error -32
[ 8883.714088] usb 2-1.1.1.1-port4: attempt power cycle
[ 8884.310042] usb 2-1.1.1.1.4: new full-speed USB device number 39 using xhci_hcd
[ 8884.310142] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8884.514082] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8884.722013] usb 2-1.1.1.1.4: device not accepting address 39, error -71
[ 8884.798030] usb 2-1.1.1.1.4: new full-speed USB device number 40 using xhci_hcd
[ 8884.798116] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8885.002071] usb 2-1.1.1.1.4: Device not responding to setup address.
[ 8885.210034] usb 2-1.1.1.1.4: device not accepting address 40, error -71
[ 8885.210120] usb 2-1.1.1.1-port4: unable to enumerate USB device 
It shows black screen and red LED for few seconds, and starts MakeCodeArcade game again

So I cannot show bootloader screen on both of them...

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: PyBadge - unable to enumerate USB device

Post by adafruit2 »

hi - ok one thing - for the makecode one you probably only have to single click to go into bootloader mode
for circuipython, what version is it running?
second, if possible, can you find a windows computer? just because linux always adds complexity - also its worth trying various ports and cables.
if you're running code, its not bricked, we just have to figure out why its being finicky

User avatar
memfault
 
Posts: 28
Joined: Fri Apr 16, 2021 5:33 am

Re: PyBadge - unable to enumerate USB device

Post by memfault »

For some reason I'm not getting mail notifications about reply :-/

I will play with windows machines more, but I've played in the past with many machines(including windows one) and cables(including new, hi-quality ones) without much success.
I think the problem lays in device(I wonder that).

About CircuitPython firmware, it's probably 6.2.0 (or 6.1.0 or 6.2.0beta), because that's all I've got on HDD

For bootloader one got 3.13.0 pybadge, while the other pybadge_lc (both are LC units)
Not sure if *.bin fiels or '*.uf2' were flashed, but all I've got on HDD is:
bootloader-arcade_pybadge-v3.13.0.bin
bootloader-arcade_pybadge_lc-v3.13.0.bin
update-bootloader-arcade_pybadge-v3.13.0.uf2
update-bootloader-arcade_pybadge_lc-v3.13.0.uf2

Like I've stated before both were running for two weeks OK (remote education, so I've tried to learn 8yo daughter to 'program' ;-), later were put for few months on the shelve, and after taking out and connecting them is were problems started(you can read whole story in previous posts).

I do wonder what kind of flash memory you've used, because maybe it's QLC and needs reflashing by using programmer?

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: PyBadge - unable to enumerate USB device

Post by adafruit2 »

id you can get into the bootloader (BADGEBOOT drive) to show up, the board is not bricked. try single or double click.

User avatar
memfault
 
Posts: 28
Joined: Fri Apr 16, 2021 5:33 am

Re: PyBadge - unable to enumerate USB device

Post by memfault »

adafruit2 wrote:id you can get into the bootloader (BADGEBOOT drive) to show up, the board is not bricked. try single or double click.
The problem is I cannot. They showed a few times when I've played with them few months ago, but rarely and usually for short time. It would be nice from your side, if you would read few of my first posts. I've explained there everything. It doesn't make sense for me to write it over and over again.

cheers

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: PyBadge - unable to enumerate USB device

Post by adafruit2 »

did you end up trying to connect them to the win10 computer at work? it never shows up on usb? can you look at the USB connector? the board isnt bricked...something is broken with the USB connector

User avatar
memfault
 
Posts: 28
Joined: Fri Apr 16, 2021 5:33 am

Re: PyBadge - unable to enumerate USB device

Post by memfault »

Windows 10 as requested
Attachments
windows-device_descriptor_request_failed.png
windows-device_descriptor_request_failed.png (208.64 KiB) Viewed 198 times

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: PyBadge - unable to enumerate USB device

Post by adafruit2 »

very weird. ok lets try replacing them - email [email protected] - try updating the booloader as soon as you get them.

User avatar
memfault
 
Posts: 28
Joined: Fri Apr 16, 2021 5:33 am

Re: PyBadge - unable to enumerate USB device

Post by memfault »

Doesn't sound as good idea to 'replace' them, because I'm located in Poland, and shipping between USA and Poland is very pricy (+possible import fees, toll and VAT.).

I don't think they can be physically damaged, because I've connected them no more then 20x each, before problem appeared, and used special care (like with every connector I use)
And as I stated I got popular STM32 programmer (pendrive-sized clone), so maybe all I need is to re-flash them?

BTW, nobody has ever reported similar problems with their PyBadge/PyGamer/EdgeBadge devices before?

While now it happens for me, only for usb drives and wearied USB cables, few decades ago I've got reversed problem. I got identical behaviour with every second USB gadget (controller, mouse) I've tried connecting to my VIA Apollo KT266 and later KT333 Chipset(I started to hate VIA then it was AthlonXP times). It was not dependant on cables or motherboard ports. Devices were usually BANNED Logitech ones, and worked on every other machine, that got Intel chipset.

But because it worked before, and later only sometimes, I've got inly 3 ideas:
1) Cheap flash memory(maybe QLC), so needs reflash(easy to do I guess).
2) Solder oxidation/degradation (should be doable by me, or some electronics friends
3) Some component's degradation (if there's is something on data-lines between CPU and USB port, because powering-on works perfectly.[I can play with cable, and it never resets itself by this. I've never bought battery, so it would be perfectly visible]).

4) USB port being broken is very unlikely because I've got two units behaving like this and both were very lightly used only few times, before being put in the box( for a longer time).

Both were stored in box in clean and dry environment, so any problem above must be some bit-flips in flash-memory or manufacturing defect.

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: PyBadge - unable to enumerate USB device

Post by adafruit2 »

you can definitely try to re-flash the bootloader, you'll need an stlink or atmel ICE
https://learn.adafruit.com/how-to-progr ... ootloaders

User avatar
memfault
 
Posts: 28
Joined: Fri Apr 16, 2021 5:33 am

Re: PyBadge - unable to enumerate USB device

Post by memfault »

Thanks. That's the answer I wanted to hear from the beginning.

This awful windows tool takes 999MB (and Adafruit states to use it under Linux in VM). I guess that native CLI tool takes 0.5MB.

What doesn't grow my confidence is that (as I assume) the latest firmware file I must burn:
bootloader-arcade_pybadge_lc-v3.13.0.bin
is exactly what I already got in my archive (it means that my PyBadges already were upgraded to that version, and even that, they self-bricked :/


Abut hardware, sounds easy, (except last point):
1) I've already got STM32 programmer clone

2) I can buy SWD-SWD cable in Poland
https://kamami.pl/en/idc-cables/562384- ... 27-mm.html

3) I can buy JTAG<=>SWD adapter in Poland
https://kamami.pl/en/jtag-accessories/5 ... board.html

4) I can not buy SWD / IDC10 with 1.27mm pitch(only 2.5mm) in Poland, so must probably import it from China (at least it's on Aliexpress, so it will take weeks):
https://www.aliexpress.com/item/3268230 ... 5420f120-0

I will try to find that SWD connector in local shops.

Locked
Please be positive and constructive with your questions and comments.

Return to “Circuit Playground Classic, Circuit Playground Express, Circuit Playground Bluefruit”