Score:0

"lsusb" command is not showing the details of all connected devices to usb port

gr flag

i am using joystick for my project(desktop application). to check whether the joystick is connected or not i am using lsusb command. basically if joystick is connected this command will show the model name of joystick (example "SHANWAN Android Gamepad" and "DragonRise Inc. PC TWIN SHOCK Gamepad" )

when i connect two joystick to system("SHANWAN Android Gamepad" and "DragonRise Inc. PC TWIN SHOCK Gamepad" ) for some systems this command is giving the info about all devices connected like this

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 413c:2113 Dell Computer Corp. Dell KB216 Wired Keyboard
Bus 001 Device 002: ID 413c:301a Dell Computer Corp. Dell MS116 USB Optical Mouse
Bus 001 Device 028: ID 2563:0526 **SHANWAN Android Gamepad**
Bus 001 Device 029: ID 0079:0006 **DragonRise Inc. PC TWIN SHOCK Gamepad**
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

and for some system it is showing a blank like this

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 413c:2113 Dell Computer Corp. Dell KB216 Wired Keyboard
Bus 001 Device 002: ID 413c:301a Dell Computer Corp. Dell MS116 USB Optical Mouse
Bus 001 Device 028: ID 2563:0526 
Bus 001 Device 029: ID 0079:0006 **DragonRise Inc. PC TWIN SHOCK Gamepad**
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

this above info shows that both joystick are connected but the model name of SHANWAN is not showing. how to solve this?

Terrance avatar
id flag
Looks like the file of `/lib/udev/hwdb.d/20-usb-vendor-model.hwdb` is missing the lines of `usb:v2563p0526* ID_MODEL_FROM_DATABASE=Android Gamepad` which should allow for proper identification of the controller. If the proper drivers are available could be a whole other story.
Score:1
br flag

The command lsusb combines the data from the system (/sys/bus/usb/devices) with the hardware database (/lib/udev/hwdb.bin) to produce a human readable output (see man hwdb).

Whatever is not found in hwdb can not be displayed.

Seems some of your systems don't have your "SHANWAN Android Gamepad" in the hwdb.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.