Ubuntu lsusb incorrect name
The solution was to create another permissions file which mounted the device for world access (I'm the only one on my PC - you could make it mount to a certain group and put yourself in that group). Working with hacked CVS one time use cameras I had a similar problem. It's also quite possible that the USB device is getting mounted as owned by root, particularly if this is a somewhat unique device. The Ubuntu developers are trying to protect users with the way things are setup not restrict you but just to protect you. Don't find a guide or listen to some knucklehead here and just change your login to "ROOT" and start using that as your account, as that has serious security implications and while in that type of login you can break your whole system in 1 second with the wrong command :-).
But in general when something wants to be started via sudo it is good to start it that way. If you ever try to write a script and have problems getting a command to work with sudo from within the script then PM me and I can help with that.
#Ubuntu lsusb incorrect name full
It is very unwise to try and enable your user account to have full root privileges all the time and therefore you should just use programs such as these with sudo type commands for safety's sake. Same with dev_id and INTERFACE= for network interfaces.When things require root access to use such as when they require sudo to work, they are not meant to run via a regular user account but instead require root privileges to run properly. Xargs sed -n -e s,DEVNAME=,/dev/,p -e s,INTERFACE=,pĪ) look through /sys/bus/usb/devices/*:* for a device interface which matches your vendor:product tuple - the uevent file in that directory contains a PRODUCT=vendor/product/revision (all in hex form without leading zeros).ī) look for any subdirectories which contain a dev file, then get the device name from the DEVNAME= entry from the uevent file in that subdirectory. # output order is random due to multiprocessing so sort resultsĮcho "$")" \ # wait then gives a chance for all of the iterations to complete )& # & here is causing all of these queries to run simultaneously $0 \"FTDI_FT232\" - will show /dev/ttyUSBX for a device usingįor sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev ) do With no arguments $0 prints information for allĮ.g. SearchString Print only /dev/ of matching output #!/bin/bashĮcho "Find which USB devices are associated with which /dev/ nodes I added shell process backgrounding to make it run a bit faster for lots of USB devices connected to a system (which when this is most useful). I found accepted answer regularly helpful and turned it into a bash script. More filtering of things that aren't actual devices.
#Ubuntu lsusb incorrect name code
This is also the reason why we wrap the code in the parenthesis, so that we use a subshell, and the variables get wiped on each loop.
The udevadm info -q property -export command lists all the device properties in a format that can be parsed by the shell into variables. The exit exits the subshell, which flows to the next iteration of the loop. Otherwise you'll get things like USB controllers & hubs. This filters out things which aren't actual devices. This gives us the path in /dev that corresponds to this /sys device. We want the directory path, so we strip off /dev. So we search for directories matching this criteria. dev/input/event4 - Logitech_HID_compliant_keyboardĮxplanation: find /sys/bus/usb/devices/usb*/ -name devĭevices which show up in /dev have a dev file in their /sys directory. dev/input/event3 - Logitech_HID_compliant_keyboard dev/input/mouse0 - Razer_Razer_Diamondback_3G dev/input/event2 - Razer_Razer_Diamondback_3G dev/input/mouse1 - Logitech_USB_Receiver dev/input/event5 - Logitech_USB_Receiver dev/sdb1 - Lexar_USB_Flash_Drive_AA26MYU15PJ5QFCL-0:0 dev/sdb - Lexar_USB_Flash_Drive_AA26MYU15PJ5QFCL-0:0 On my system, this results in the following: /dev/ttyACM0 - LG_Electronics_Inc._LGE_Android_Phone_VS930_4G-991c470 #!/bin/bashįor sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev) doĭevname="$(udevadm info -q name -p $syspath)"Įval "$(udevadm info -q property -export -p $syspath)" If we don't, you'll see a lot of things in the list that aren't physical devices. Typically only real USB devices will have this attribute, and so we can filter with it. So this answer is about finding the dev path for each device.īelow is a quick and dirty script which walks through devices in /sys looking for USB devices with a ID_SERIAL attribute.
You mention 'port' several times, but then in your example, you say the answer is /dev/ttyUSB0, which is a device dev path, not a port. I'm not quite certain what you're asking.