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?