GetControlerName() return the device_name field handed by the kernel device, which is usb_hid.
Seems that this fiield is not set anymore, which will be a bug introduced when usb_joy was deprecated maybe.
How looks the Joystick preference window with this controler detected ?
usb_joy was the old driver for joysticks, it was replaced by the new usb_hid driver which implements the same device interface. BJoystick works with either, as well as old-style gameport joysticks where available.
The joystick preferences is not included in the default image. I tried to build it but it did not seem to work with my USB gamepad (it lists the port, but seems to thnk it should run a âdetectionâ process to use a specific driver for each type of joystick, as was the case on gameports).
IIRC, one have to edit some joystick description file, which is loaded by JoystickTweaker to enhance and set more user-friendly and defined names to device features.
EDIT: giving a look to JoystickTwearker source, it show that indeed the device name (which GetControllerName() returns) and others descriptions are loaded, when found, from a joystick description file that should be located in /boot/home/config/settings/joysticks/ (for an USB joysticks, that would be âŚ/joysticks/usb/0 etc), with a syntax like this:
module =
(only usefull for old gameport-based joystick, usb sticks are dynamically detected by usb_hid kernel module
gadget =
(thatâs your ControllerName string, by default a â2-axisâ should be returned according API spec, but itâs not the case)
and those below, to statically declare stick features for gameport-based joysticks.
Itâs useless for USB sticks are there info are dynamically retrieved from USB HID report
num_axes =
num_hats =
num_buttons =
num_sticks =
So, @dragon, try to create a /boot/home/config/settings/joysticks/usb/0 file with this content:
module = usb_hid
gadget = Here your gamepad controller name
(Beware, code expect gadget=<valueâŚ>, so space around the equal are mandatory)
In my experience the joystick just disconnect randomly.
Sometimes it work, sometimes it dont work. And the other bug i see, sometimes it just dont show when you press a button, seems like it cant put a character in the configurator and it is just blind.