On Thursday 06 April 2006 20.56, Roger Oberholtzer wrote:
On Thu, 2006-04-06 at 19:28 +0200, Goran wrote:
On Thursday 06 April 2006 18.31, Roger Oberholtzer wrote:
On Thursday 06 April 2006 18:24, Goran wrote:
Hi Roger, thanks for quick reply.
I would think that udev would be the way. You would beed a rule that would id the device and set the permissions accordingly.
How do I change my SuSE 9.3 setup to allow a user or a group to talk with this device?
Thanks, Göran
-- Roger Oberholtzer OPQ Systems AB
Yes, that probably pointed me in the right direction. But I probably don't understand it...
In /var/log/messages I get this line when I insert the device: Apr 6 19:12:31 ganymede kernel: hiddev96: USB HID v1.00 Device [Velleman USB K8055] on usb-0000:00:1d.2-1
I tried to add: KERNEL="hiddev96", NAME="%k", GROUP="uucp", MODE="660"
at the end of /etc/udev/rules.d/50-udev.rules without any success.
Is this the right way to do it?
First, I would make a new file in the rules.d directory instead of changing a supplied one. Something like 99-mystuff.rules. After editing this file, you must type (as root) 'rchal restart' for it to be used. Saves having to reboot.
OK. Tried that, as well as call it 11-mystuff.rules to see if it made any difference...
I think suse 9.3 had the lshal command. That lists all the devices and the various names they may have. These can be used in the rules. Also, there is a hidden directory in /dev called .usbdev, which also contains device names.
I have /dev/.udevdb and /dev/usb/ which are close to your description. /dev/usb contains devices, for instance: crw-rw---- 1 root root 180, 96 2005-03-19 20:36 hiddev0
Do I need to give any command to rebuild any database after modifying this file?
rchal restart
OK.
So I probably fail in describing the rules properly :-(
Here are some more output....
From "lshal --monitor" when I attach the device:
*** lshal: device_added, udi='/org/freedesktop/Hal/devices/usb_usb_device_10cf_5500_0_-1_noserial_0'
Dumping 47 device(s) from the Global Device List:
-------------------------------------------------
udi = '/org/freedesktop/Hal/devices/usb_usb_device_10cf_5500_0_-1_noserial_0'
info.udi = '/org/freedesktop/Hal/devices/usb_usb_device_10cf_5500_0_-1_noserial_0' (string)
info.product = 'USB HID Interface' (string)
usb.interface.subclass = 0 (0x0) (int)
usb.interface.protocol = 0 (0x0) (int)
usb.interface.number = 0 (0x0) (int)
usb.interface.class = 3 (0x3) (int)
usb.configuration_value = 1 (0x1) (int)
usb.device_class = 0 (0x0) (int)
usb.device_protocol = 0 (0x0) (int)
usb.device_subclass = 0 (0x0) (int)
usb.max_power = 100 (0x64) (int)
usb.num_configurations = 1 (0x1) (int)
usb.num_interfaces = 1 (0x1) (int)
usb.device_revision_bcd = 0 (0x0) (int)
usb.is_self_powered = false (bool)
usb.can_wake_up = false (bool)
usb.product_id = 21760 (0x5500) (int)
usb.vendor_id = 4303 (0x10cf) (int)
usb.vendor = 'Velleman Components, Inc.' (string)
usb.product = '8055 Experiment Interface Board (address=0)' (string)
usb.bus_number = 4 (0x4) (int)
usb.port_number = 1 (0x1) (int)
usb.level_number = 1 (0x1) (int)
usb.linux.device_number = 18 (0x12) (int)
usb.linux.parent_number = 18 (0x12) (int)
usb.num_ports = 0 (0x0) (int)
usb.speed_bcd = 336 (0x150) (int)
usb.version_bcd = 272 (0x110) (int)
info.parent = '/org/freedesktop/Hal/devices/usb_device_10cf_5500_0_-1_noserial' (string)
usb.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.2/usb4/4-1/4-1:1.0' (string)
linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:1d.2/usb4/4-1/4-1:1.0' (string)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.2/usb4/4-1/4-1:1.0' (string)
info.bus = 'usb' (string)
udi = '/org/freedesktop/Hal/devices/usb_device_10cf_5500_0_-1_noserial'
info.udi = '/org/freedesktop/Hal/devices/usb_device_10cf_5500_0_-1_noserial' (string)
linux.kernel_devname = 'usb-0000:00:1d.2-1' (string)
usb_device.version_bcd = 272 (0x110) (int)
usb_device.speed_bcd = 336 (0x150) (int)
usb_device.num_ports = 0 (0x0) (int)
usb_device.linux.parent_number = 18 (0x12) (int)
usb_device.linux.device_number = 18 (0x12) (int)
usb_device.level_number = 1 (0x1) (int)
usb_device.port_number = 1 (0x1) (int)
usb_device.bus_number = 4 (0x4) (int)
info.product = '8055 Experiment Interface Board (address=0)' (string)
usb_device.product = '8055 Experiment Interface Board (address=0)' (string)
info.vendor = 'Velleman Components, Inc.' (string)
usb_device.vendor = 'Velleman Components, Inc.' (string)
usb_device.vendor_id = 4303 (0x10cf) (int)
usb_device.product_id = 21760 (0x5500) (int)
usb_device.can_wake_up = false (bool)
usb_device.is_self_powered = false (bool)
usb_device.device_revision_bcd = 0 (0x0) (int)
usb_device.num_interfaces = 1 (0x1) (int)
usb_device.num_configurations = 1 (0x1) (int)
usb_device.max_power = 100 (0x64) (int)
usb_device.device_subclass = 0 (0x0) (int)
usb_device.device_protocol = 0 (0x0) (int)
usb_device.device_class = 0 (0x0) (int)
usb_device.configuration_value = 1 (0x1) (int)
info.parent = '/org/freedesktop/Hal/devices/usb_device_0_0_206_-1_0000:00:1d.2' (string)
usb_device.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.2/usb4/4-1' (string)
linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:1d.2/usb4/4-1' (string)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.2/usb4/4-1' (string)
info.bus = 'usb_device' (string)
At the same time, I do get this in /var/log/messages
Apr 6 22:15:30 ganymede kernel: usb 4-1: new low speed USB device using uhci_hcd and address 18
Apr 6 22:15:30 ganymede kernel: hiddev96: USB HID v1.00 Device [Velleman USB K8055] on usb-0000:00:1d.2-1
Apr 6 22:15:32 ganymede udev[18062]: configured rule in '/etc/udev/rules.d/41-usb.rules[12]' applied, 'hiddev0' becomes 'usb/%k'
Apr 6 22:15:32 ganymede udev[18062]: creating device node '/dev/usb/hiddev0'
Matching rule in /etc/udev/rules.d/41-usb.rules is this line (I think):
BUS="usb", KERNEL="hiddev[0-9]*", NAME="usb/%k", MODE="660"
I would like a rule that match the card regardless of which USB-port it is inserted in.
I can't figure out what rule to write to override the one in 41-usb.rules.
I also tried to cheat by changing group manually on /dev/usb/hiddev0 but that did not help, so I think this is not the device my program use...
The program have:
#include
(I hope I got this right. There are number of coexisting systems that I have been known to mix up.)
-- Roger
Any more suggestions are very much appreciated :-) /Göran