hw-boot-selection icon indicating copy to clipboard operation
hw-boot-selection copied to clipboard

Linux can't find USB device

Open veronduh opened this issue 3 years ago • 2 comments

I recognize there's a similar issue that's already closed, but I have been unable to resolve the issue. I'll provide the same information.

  • I'm using the stm32f103c8 "blue pill".
  • I am using a st-link v2 cloner to flash. I was unable to flash using stlink, but i am able to successfully flash using st-flash. However, I cannot get ubuntu (let alone grub) to recognize the device in any way.
  • Printing lsusb, does not list the device. Nor does blkid.
  • The only things listed in the grub menu are my actual harddrives.
  • I am able to reformat a flashdrive as FAT12 and both ubuntu and grub recognize it as such.
  • grub version: grub-install (GRUB) 2.06-2ubuntu7
  • search --fs-uuid 55AA-6922 returns device not found
  • I am able to flash a blinking led program with success

My only thoughts are something has changed in the libopencm3 api making the usb initialization is not work?

Only warning i get when flashing is regarding nRST and i assume that is not related.

Let me know if anyone has any thoughts, thanks!

veronduh avatar Jul 20 '22 19:07 veronduh

Can you check for relevant messages in the the kernel logs when you plug it in?

sudo dmesg -w

Success looks like this:

image

If the computer's hardware detects that a device was connected but it's not responding, you'll get the following kind of messages. The blue-pill board I have uses external pull-ups on the USB data lines, so it shows like this any time it's plugged in with a blinky program loaded, or when the reset button is held down:

image

if you don't see any messages, that suggests the computer isn't seeing the required pull-up on the USB data lines, which might be a physical issue (eg. bad cable, damaged micro USB port on the board, etc)

stecman avatar Jul 26 '22 07:07 stecman

Hmm, seems it might be a physical issue then. I've tried multiple cables. I'll order a new board and come back to this issue asap. Thanks!

Update: Turns out the cable I used was power only, no data transfer. After getting a new data transfer cable it worked. Ticket can be closed!

veronduh avatar Jul 27 '22 01:07 veronduh