| Both sides previous revisionPrevious revisionNext revision | Previous revision | 
| bsd:notes:joystick [2024/09/13 21:32]  – [Joystick Research]  Sean Rhone | bsd:notes:joystick [2025/09/11 06:43] (current)  – external edit 127.0.0.1 | 
|---|
|   * :!: Joysticks on FreeBSD need to be at ''/dev/uhid#'' ((''flightgear'', ''neverball'', seemingly ''doomsday'' but it freezes on launch)) |   * :!: Joysticks on FreeBSD need to be at ''/dev/uhid#'' ((''flightgear'', ''neverball'', seemingly ''doomsday'' but it freezes on launch)) | 
|   * ''uhidd'' by-default does ''/dev/uvhid#'', that can be symlinked to ''/dev/uhid#'' or be done automatically with ''uhidd -H uhid'' ((it assigns a specific ''uhid#'' automatically)) |   * ''uhidd'' by-default does ''/dev/uvhid#'', that can be symlinked to ''/dev/uhid#'' or be done automatically with ''uhidd -H uhid'' ((it assigns a specific ''uhid#'' automatically)) | 
|   * ''uhidd'' has a lot of flags in examples for keyboard/mouse/consumer, but a joystick only needs the virtual generic interface with ''uhidd -h'' |   * ''uhidd'' has a lot of flags in examples for keyboard/mouse/consumer, but a joystick only needs the virtual generic interface with ''uhidd -h'' (not all of ''-kmohs'') | 
|   * ''uhidd'' has to unbind whatever kernel driver is on the joystick with ''uhidd -u'' to take it over |   * ''uhidd'' has to unbind whatever kernel driver is on the joystick with ''uhidd -u'' to take it over | 
|   * :?: Seemingly once ''uhidd'' takes control of the original ''/dev/input/event#'' device, if it had ''evdev'' or ''joystick'' forced through ''xorg.conf'' that driver gets unloaded according to ''Xorg.0.log'' ((it sounds like causing ''evdev'' to re-probe on the newly-created ''uhid#'' device could work? there's a ''cdev'' mention with ''devd -d'', but FlightGear shows buttons fine without joystick/evdev binding?)) |   * :?: Seemingly once ''uhidd'' takes control of the original ''/dev/input/event#'' device, if it had ''evdev'' or ''joystick'' forced through ''xorg.conf'' that driver gets unloaded according to ''Xorg.0.log'' ((it sounds like causing ''evdev'' to re-probe on the newly-created ''uhid#'' device could work? there's a ''cdev'' mention with ''devd -d'', but FlightGear shows buttons fine without joystick/evdev binding?)) | 
| ====== devd.conf ====== | ====== devd.conf ====== | 
 |  | 
|   * TODO: Move to main FreeBSD notes |   | 
|   * Last updated: 2024/09/13 |   * Last updated: 2024/09/13 | 
 |  | 
|         action "/usr/local/sbin/uhidd -h -H uhid -u /dev/$ugen"; |         action "/usr/local/sbin/uhidd -h -H uhid -u /dev/$ugen"; | 
| };</code> | };</code> | 
|   |  | 
|   | ===== TODO ===== | 
|   |  | 
|   |   * ''ld-elf.so.1 %LIBCUSE%'' error ([[https://forums.freebsd.org/threads/ld-elf-so-1-shared-object-libcuse-not-found.86293/|thread]]) | 
|   |  | 
|   |   su -l | 
|   |  | 
|   |   mv '/usr/local/etc/devd/uhidd-devd.conf' '/usr/local/etc/devd/uhidd-devd.conf~' | 
|   |  | 
|   | ===== TODO 2 ===== | 
|   |  | 
|   |   * This avoids needing ''uhidd'' (connect joystick within 3 seconds) | 
|   |   * TODO: USB device reset command and devd | 
|   |  | 
|   |   su - root -c "sysctl 'hw.usb.usbhid.enable=0' && sleep '3' && sysctl 'hw.usb.usbhid.enable=1'" | 
|   |  | 
|   | ==== Solo Key ==== | 
|   |  | 
|   | **** | 
|   |  | 
|   |   su - root -c "sysctl 'hw.usb.usbhid.enable=0' && sleep '3' && sysctl 'hw.usb.usbhid.enable=1' && chmod '060' '/dev/uhid0'" | 
 |  |