HiFive RevB USB not recognized by Linux

Hi,

I just received my HiFive1 RevB and excited to play with it!

However, when I plug it on my laptop on a USB port, it doesn’t get recognized by the host:

  • Running lsusb doesn’t show the HiFive.
  • Running journalctl -f while plugging in the HiFive doesn’t show anything happening.
  • I don’t see any /dev/ttyACM0 or /dev/ttyUSBx.

The D9 and D10 LEDs are on, and the LED next to the CPU does its rainbow thing, so the HiFive itself seems to be working fine.

I have tried multiple different USB cables, and multiple different USB ports, including through a USB hub or not, without any notable difference.

My distribution is Fedora, kernel version 5.4. Someone else reported issues with Linux 5.4 so I tried on an old machine also running Fedora but with kernel version 5.2, and it also doesn’t work in the same way.
I unfortunately don’t have any other machine at my disposal at the moment to try.

Thanks in advance.

Oh after trying with another cable I managed to get some logging from journalctl:

févr. 19 18:36:43 pierre-thinkpad kernel: usb 1-2: new full-speed USB device number 24 using xhci_hcd
févr. 19 18:36:43 pierre-thinkpad kernel: usb 1-2: device descriptor read/64, error -71
févr. 19 18:36:43 pierre-thinkpad kernel: usb 1-2: device descriptor read/64, error -71
févr. 19 18:36:43 pierre-thinkpad kernel: usb 1-2: new full-speed USB device number 25 using xhci_hcd
févr. 19 18:36:43 pierre-thinkpad kernel: usb 1-2: device descriptor read/64, error -71
févr. 19 18:36:44 pierre-thinkpad kernel: usb 1-2: device descriptor read/64, error -71
févr. 19 18:36:44 pierre-thinkpad kernel: usb usb1-port2: attempt power cycle
févr. 19 18:36:44 pierre-thinkpad kernel: usb 1-2: new full-speed USB device number 26 using xhci_hcd
févr. 19 18:36:44 pierre-thinkpad kernel: usb 1-2: Device not responding to setup address.
févr. 19 18:36:45 pierre-thinkpad kernel: usb 1-2: Device not responding to setup address.
févr. 19 18:36:45 pierre-thinkpad kernel: usb 1-2: device not accepting address 26, error -71
févr. 19 18:36:45 pierre-thinkpad kernel: usb 1-2: new full-speed USB device number 27 using xhci_hcd
févr. 19 18:36:45 pierre-thinkpad kernel: usb 1-2: Device not responding to setup address.
févr. 19 18:36:45 pierre-thinkpad kernel: usb 1-2: Device not responding to setup address.
févr. 19 18:36:45 pierre-thinkpad kernel: usb 1-2: device not accepting address 27, error -71
févr. 19 18:36:45 pierre-thinkpad kernel: usb usb1-port2: unable to enumerate USB device

Sadly this is what I get recently too. It’s not even Linux specific Windows fails as well. I suspect the USB connector on the hifive1 is half-broken off or something because it’s flakey.

I can sometimes get it to work if I twist the cable into funny positions. NOTE: I did try multitused of cables.

You can also try using a USB hub.

Since I’m pretty obtuse, I ordered a second one, brand new as well, and it exhibits the exact same problem.
I’m going to assume that it’s not me being unlucky or accidentally breaking the USB port of both devices, but rather a software issue.

Hello, sorry to hear you’re having trouble. I’ve also got a hifive rev b, and am running Fedora:

$ uname -r
5.5.5-200.fc31.x86_64

For me, whether connected through a hub (with and without power) I see the hifive device as follows:

$ lsusb 
<snip>
Bus 002 Device 005: ID 1366:1051 SEGGER J-Link

which makes sense - the board now features a Segger J-Link OCD. However, please note I installed the jlink RPM from Segger, available from their website. This writes down rules in udev, specifically /etc/udev/rules.d/99-jlink.rules, which is responsible for dynamic device node creation in linux (things in /dev “appear” because udev makes it so is the short story).

If you haven’t done this, I suggest downloading that rpm and then sudo dnf install ~/Downloads/JLink_Linux_V662b_x86_64.rpm or an appropriate version for your download.

If you have done this… I would suspect the USB cable. Some things you could try: power the board using the external J7 power supply (see the getting started guide) to eliminate the need to power the board over USB. In particular, if you don’t have green lights on your board, it doesn’t have power (and it won’t show up in lsusb). This can negate the effects of faulty hubs or power not working over cables and so on (although I tend to find these issues in USB-C cables more than micro-A).

If you have one of the Segger J-Link (or alternative compatible) JTAG external debuggers, the board also has a connection for this (again see getting started guide) which would allow you to see if the board itself functions when combined with external power. The main reason for the USB method is that it is more convenient (the external debuggers can be pricey).

The getting started guide for the rev b is available here

Has anyone solved this problem?
I’m running Arch Linux, I have the J-Link software installed and my hifive revb is not recognized at all.

I also have a Sparkfun Red-V Thing Plus, which is similar to the hifive revb (Uses the same build target in freedom-e-sdk), which also has the Segger J-Link OB module and it WORKS without issue. The Red-V board is USB-C though.

I was able to get my hifive revb working by using a name brand usb cable. I had tried 3 generic no-name cables before I wrote my first post in this thread.

Then I found a Samsung brand cable in my collection and it worked. Not sure exactly what the difference is, but this cable works every time. Maybe it’s a tighter fit? Maybe it’s down to the construction of the cable, not sure. But I wanted to reply in case anyone else was having this issue, they might be able to solve it the same way.

Good luck.

1 Like

Update: I’ve ordered a Samsung USB cable (specifically this one) and it’s working :tada: