I have two identical USB serial adapters attached to a Raspberry Pi. One of them regularly crashes (no idea why, maybe a kernel bug – the hardware was already replaced) but it seems to work again after resetting that USB device.

So these are the file system paths that I know:

  • /dev/ttyUSB0
  • /dev/ttyUSB1

I need the first one. Then I can reset it with this command:

sudo usbreset 001/004

The two numbers are the bus and device number of the USB device. I can find them in very long listings from very long udevadm commands. But it's a complicated task. I'm looking for a way of getting information like that:

  • /dev/ttyUSB0 -> 001/004
  • /dev/ttyUSB1 -> 001/005

How can I get such simple information? The numbers change after resetting the device so I need to determine them freshly every time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.