# USB Joystick uhidd



## pcbsd64 (Apr 19, 2012)

I'm trying to get my USB joystick working with the uhidd daemon. I know that the linux-js port is broken and won't build, but I have seen forum posts that suggest I use the uhidd daemon to enable a USB controller.

*F*rom /var/log/dmesg:

```
ugen0.2: <awecades.com> at usbus0
uhid0: <awecades.com USB Classic Crystal, class 0/0, rev 1.10/1.00, addr 2> on usbus0
```



```
[pcbsd64@pcbsd64] ~> uhidd -vvv -kmoh /dev/ugen0.2
uhidd[8270]: cannot open or create pidfile
uhidd[8270]: open /usr/local/etc/uhidd.conf failed: No such file or directory
uhidd[8270]: proceed without configuration file
ugen0.2[0]-> HID interface
ugen0.2[0]-> Report descriptor size = 43
ugen0.2[0]-> Find IN interrupt ep: 0x81 packet_size=0x8
HID APPLICATION COLLECTION (Game Pad) size(43)
  HID REPORT: ID 0
    INPUT: 
      POS:0 SIZE:8 COUNT:2 [VARIABLE]
        USAGE X
        USAGE Y
      POS:16 SIZE:1 COUNT:8 [VARIABLE]
        USAGE Button1
        USAGE Button2
        USAGE Button3
        USAGE Button4
        USAGE Button5
        USAGE Button6
        USAGE Button7
        USAGE Button8
uhidd[8270]: ugen0.2[0] could not open /dev/uvhidctl: Permission denied
uhidd[8270]: terminated
```

*F*rom /etc/X11/xorg.conf:

```
Section "InputDevice"
    Identifier     "USB Classic Crystal"
    Option         "Vendor" "awecades.com"
    Driver         "joystick"
    Option         "Path" "/dev/uhid0"
    Option         "Device" "/dev/uhid0"
EndSection
```

*F*rom /etc/rc.conf:

```
uhidd_enable="YES"
```

If I add 

```
uhidd_flags="-kmohs"
```
to /etc/rc.conf
the joystick isn't recognized by DOSbox and my keyboard runs away with key presses.

Should I just wait until somebody rewrites linux-js or can I fix/edit something to get uhidd to recognize my USB joystick?


----------



## kaiw@ (May 14, 2012)

I guess you want a /dev/input/jsX interface attached for your joystick? In that case uhidd won't help since it doesn't have support for linux js driver emulation currently. A future release might add support for that.


----------



## serjsk8 (May 29, 2012)

Hello,

Maybe this HOWTO will be useful to you:
http://forums.freebsd.org/showthread.php?t=18454&highlight=gamepad


----------

