Unknown USB Device (Device Descriptor Request Failed): Longan Nano USB connection fails

Last week I had successfully installed WinUSB in Windows 10 64-bit via Zadig, and it was possible to upload programs from PlatformIO to my Longan Nano. When I installed WinUSB, the Longan Nano had appeared as “Unknown USB Device”.

Today uploading to the Longan Nano suddenly stopped working. After I tried to reinstall the WinUSB driver, the Longan Nano is now reported as “Unknown USB Device (Device Descriptor Request Failed)” in Windows Device Manager (“Unbekanntes USB-Gerät (Fehler beim Anfordern einer Gerätebeschreibung” in German), and reinstallation of the WinUSB driver now fails repeatedly.

Did I brick the Longan Nano? Can this be fixed somehow?

I have attached the log file from Zadig for the failed reinstallation: Zadig.log.pdf (66,5 KB)

When you say ‘stopped working’, do you mean there’s no LED or backlight, or is it just the USB that stopped working? Also, are you using the same cable as used last week?

If it’s just that USB is not responding, you might try squeezing the connector to the board while resetting to see if it has become physically damaged (e.g. weak solder joint).

If you have a USB-TTL UART available (3.3V compatible), then you could see if the board responds via serial.

If the board seems completely dead, then you will need a multimeter at least if you want to diagnose.

Also, if you have a Linux LiveCD (or dual boot), check dmesg as you connect the USB - this would be the simplest way to rule out software problems.

It’s just flashing by USB that stopped working. The board itself is working correctly in the sense that the most recent program that I was able to upload before the problem appeared today is running fine. So “bricked” is probably the wrong description, as the board is not completely dead, I just can’t upload new programs anymore.

I can initiate the flash mode with BOOT and RESET, and the Windows 10 machine recognizes an USB device, but as I said with the “Device Descriptor Request Failed” message. So I don’t think that there’s a problem with the hardware itself.

I have an USB to TTL Serial Cable that I use to flash ESP8266 devices like the Adafruit Huzzah. Should that work with the Longan Nano? And do I understand it correctly that I would initiate the upload process in the same manner as with USB, only that I connect the USB to TTL cable to the pins at the opposite end of the board?

@kevin: Uploading over the serial cable is actually working now, thanks for the suggestion!

But of course I would be eager to restore the USB upload method. I would be grateful for any hints how to do that…

So that suggests the board is working and the bootloader firmware is still available.

Really, I recommend you check what the device looks like to a Linux kernel - keep a live-boot or a VM handy if you normally work in Windows.

Also, the SDK’s DFU example in GD32VF103_Firmware_Library/Examples/USBFS/USB_Device/DFU might be useful in seeing how USB is negotiating with your Windows PC.

This is what appears in dmesg when I connect the Longan Nano to a Linux machine and switch it to upload mode:

[   79.248308] usb 5-1: new full-speed USB device number 2 using ohci-pci
[   79.400327] usb 5-1: device descriptor read/64, error -62
[   79.660316] usb 5-1: device descriptor read/64, error -62
[   79.944338] usb 5-1: new full-speed USB device number 3 using ohci-pci
[   80.096296] usb 5-1: device descriptor read/64, error -62
[   80.356267] usb 5-1: device descriptor read/64, error -62
[   80.464341] usb usb5-port1: attempt power cycle
[   80.956265] usb 5-1: new full-speed USB device number 4 using ohci-pci
[   81.372246] usb 5-1: device not accepting address 4, error -62
[   81.548237] usb 5-1: new full-speed USB device number 5 using ohci-pci
[   81.964217] usb 5-1: device not accepting address 5, error -62
[   81.964291] usb usb5-port1: unable to enumerate USB device

I would check wiring/continuity now:

  1. check the cable works in the same PC USB port, but with a different device (i.e. confirm it enumerates properly), or else a known-good cable in a different PC USB port, with the Nano connected.

  2. do whatever you can to apply a little pressure to the Nano USB socket onto the board, and the USB connector pins onto the socket while resetting to the bootloader. What I am thinking is that the Nano’s USB socket may have weak solder joints, or the USB C connector may not be making good contact in the socket.

Watch dmesg while doing this to see if there’s variation in the error message (-62 is a timeout, I think referring to the 1ms tick of the USB stack, so a few ms of good connection should yield different messages).

1 Like

Thanks @kevin, you are probably right: I tested the USB cable with the original device (the mobile phone with which I got it), and I’m seeing the same kind of errors when I try to connect the phone to a Windows 10 or Linux machine. So the cable is probably broken.
Unfortunately this is the only USB-C cable that I own, so I will have to get a new one. I will report back whether that helps…

And after all I actually do have another USB-C cable, and with that one now upload over USB works again.

Thanks, @kevin, I never would have thought that this could be a hardware problem.