Solved user can't access USB devices

Is there any guide how to set the user (operator group) to access specific USB devices ? not storage/printers/scanners as I read on some guides. I understand I need to have a config file under /usr/local/etc/devd . Do I need to put lines like
match "subsystem" "DEVICE"; (other guides say "INTERFACE" , this helps more my brainfsck ... thanks for any help...
 
Something I use for an USB arcade joystick in order to make it usable for my user account:
Code:
dice@williscorto:~ % cat /usr/local/etc/devd/dashine.conf
notify 100 {
  match "system"        "USB";
  match "subsystem"     "INTERFACE";
  match "type"          "ATTACH";
  match "vendor"        "0x045e";
  match "product"       "0x028e";
  action "chgrp operator /dev/$cdev; chmod 660 /dev/$cdev";
};
 
THANKSSSSSS! anyway as I read various config files like this on the web, some mention /dev/$ugen instead /dev/$cdev not sure what's the difference (cdev character device ?)
 
In my case a 'real' device (xb360gp(4)) gets attached to it and I need to set the permissions on that. In other cases there's no driver and software simply accesses the /dev/ugen?.? USB bus device directly. It depends on what you need.

Code:
root@williscorto:~ # usbconfig
ugen5.1: <Intel EHCI root HUB> at usbus5, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.1: <(0x1b6f) XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen1.1: <Intel UHCI root HUB> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen2.1: <Intel UHCI root HUB> at usbus2, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen4.1: <Intel UHCI root HUB> at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen3.1: <Intel UHCI root HUB> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen3.2: <vendor 0x8086 product 0x0189> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (0mA)
ugen0.2: <vendor 0x0738 EGO ARCADE STICK> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (500mA)

Code:
Jul 24 14:42:28 williscorto kernel: ugen0.2: <DASHINE XBOX For windows> at usbus0
Jul 24 14:42:29 williscorto kernel: usbhid0 on uhub1
Jul 24 14:42:29 williscorto kernel: usbhid0: <DASHINE XBOX For windows, rev 2.00/1.01, addr 5> on usbus0
Jul 24 14:42:29 williscorto kernel: hidbus0: <HID bus> on usbhid0
Jul 24 14:42:29 williscorto kernel: xb360gp0: <XBox 360 Gamepad> on hidbus0
 
I have the same problem (again) but chmod (devd or manual doesn't matter) didn't help. Even if chmod 666 was done to all usb device files (/dev/usb/1.2.*) my user didn't see any of the USB devices:
Code:
% usbconfig
No device match or lack of permissions

The problem were permissions of the /dev/usb/ folder!
before:
Code:
% \ls -lhd /dev/usb
drw-rw----  2 root wheel  512B Jul 30 21:12 /dev/usb
after:
Code:
# chmod 770 /dev/usb
% usbconfig
ugen1.1: <AMD XHCI root HUB> at usbus1, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen2.1: <AMD XHCI root HUB> at usbus2, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen0.1: <AMD XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
....
Now, when I finally fixed my USB tool, I will gonna go lose time with another thing which won't work 😬
 
Back
Top