This isn't the most elegant way, but it will work on almost any Linux variant. If you have hubs, you may probably need to increase maxdepth. You can echo the results to a file in /tmp/ and head -n1 or tail -n1 the lines accordingly. If the output matches, we will echo a string prefixed with "/dev/" in front of the USB? name.Īfaik the first or the usually the last (highest number) is the modem port for ZTE devices. Within the results we will search for a file named modalias and look for a string containing the vendor id "v" "19d2" and product id "p" 0016. I also ran a command which monitors system diagnostics and this is what I got: 942.718768 usb 1-2.1.4: USB disconnect, device. However it does show up when I run lsusb, so it is detected by the system. However, when I run ls /dev/tty it should show up as ACM0 but nothing is detected. ![]() This will loop through a list of files with filename ttyUSB*, including symlinks, in /sys/bus/usb/devices. Hello, I’m trying to access a VESC motor controller over serial comm plugged into my Jetson TX2 via USB. I am using Ubuntu 17.10 along a tty-to-USB adapter (adding more in future), thus intending to create a unique udev identifyier to the adapter. The following commands will give me list of ttyUSB device names that are associated with 19d2:0016 (which is the "modem mode" id of a ZTE MF831 LTE stick, yours may differ.): for i in $(find -L /sys/bus/usb/devices/ -maxdepth 2 -name "ttyUSB*") doĮgrep -i "v19d2p0016(.*)in02" $i/./modalias >/dev/null & echo "/dev/$"
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |