linux: test if radarbox is connected?

Started by ivo, November 02, 2023, 06:27:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ivo


I am trying to ascertain whether the radarbox USB device is connected on linux.  I want to check this to detect in my perl program whether someone has pulled the device from its USB socket.

when I first insert it into the USB port, a `/dev/swradio0` is created.  however, that device disappears at some point, even though the radarbox usb stick is still connected and working well.

is there a simple file system check to accomplish this?

pedrão18

Maybe you can use the lsusb command in a time interval to detect whether stick is connected.

To get just the device you want, you can use the command lsusb -d yyyy.zzzz

If this command returns empty, the USB is probably not connected.

Remember to replace yyyy.zzzz with the USB id found in the command lsusb