You are not logged in.

#1 2008-03-05 11:18:30

neok
Member
From: Cyprus
Registered: 2003-12-14
Posts: 190
Website

My app cannot use USB when ordinary user

Hi,

I have written an application that controls a USB Phidget servo via libusb, but when I log is as an ordinary user my app cannot communicate with the servo. As far as I can tell the problem is that when an ordinary user, my app cannot use libusb. But I can generally use other USB devices like flash drives or digital cameras.

It may be a matter of adding my self to a group but can't figure out which (there seems to be no usb group in /etc/group.

Any ideas/hints please?

My thanks in advance.


Regards

Neoklis ... Ham Radio Call: 5B4AZ

Offline

#2 2008-03-05 12:26:36

whompus
Member
From: Durham. UK
Registered: 2005-08-09
Posts: 256

Re: My app cannot use USB when ordinary user

Create the group and add your users to it

groupadd usb
gpasswd -a <user> usb

Offline

#3 2008-03-05 14:54:21

neok
Member
From: Cyprus
Registered: 2003-12-14
Posts: 190
Website

Re: My app cannot use USB when ordinary user

whompus wrote:

Create the group and add your users to it

groupadd usb
gpasswd -a <user> usb

OK thanks whompus, I tried it but it doesn't work. Seems it something else, hope I have a good guess eventually...


Regards

Neoklis ... Ham Radio Call: 5B4AZ

Offline

#4 2008-03-05 17:04:53

whompus
Member
From: Durham. UK
Registered: 2005-08-09
Posts: 256

Re: My app cannot use USB when ordinary user

It might be a udev rules setting as I had to change a rule to access my mobile phone as a user, it's a usb phone but needed a tty rule (I think). I don't know enough about this to help you.

Offline

#5 2008-03-05 18:04:53

neok
Member
From: Cyprus
Registered: 2003-12-14
Posts: 190
Website

Re: My app cannot use USB when ordinary user

whompus wrote:

It might be a udev rules setting as I had to change a rule to access my mobile phone as a user, it's a usb phone but needed a tty rule (I think). I don't know enough about this to help you.

I know even less...;) but I found out what I did wrong, rather silly in retrospect but as I said, never had to fiddle with udev: I added the usb group but did not add GROUP="usb" to the udev usb_device rule. Now its OK, thank for the tip!


Regards

Neoklis ... Ham Radio Call: 5B4AZ

Offline

Board footer

Powered by FluxBB