Hi,
Alan Stern <[EMAIL PROTECTED]> írta:
> On Wed, 4 Apr 2007, sza2 wrote:
>
> > Hi All,
> >
> > I made an USB device (Cypress based) which was working
> > correctly over years with my user space driver.
> >
> > However a few months ago I updated my system(s) to Debian
> > Etch and kernel 2.6.19+.
> >
> > Currently I'm unable to use my soft as normal user it is
> > only possible with root privileges.
>
> How do you know that? What error message do you get?
What are the file
> permissions on the /proc/bus/usb/BBB/DDD file?
See below (/proc/bus/usb/xxx/xxx have permission 666)
>
> > The changing point can be the hotplug -> udev. I setup udev
> > rules, so the /proc/bus/usb/xxx/xxx have permission 666.
> > However it is not work.
>
> Another thing that has changed is the way
Set-Configuration requests are
> handled. Does your program try to do one of them?
Maybe this can help to help:-)
usb_dev_handle *usb_control_init(int idVendor, int
idProduct, int bcdDevice) {
struct usb_dev_handle *insp = NULL;
struct usb_bus *bus;
struct usb_device *device;
int usb_found = 0;
usb_init();
usb_find_busses();
usb_find_devices();
for(bus = usb_get_busses(); bus; bus = bus->next) {
for(device = bus->devices; device; device = device->next) {
if(
(device->descriptor.idVendor == idVendor) &&
(device->descriptor.idProduct == idProduct) &&
(device->descriptor.bcdDevice == bcdDevice)
){
if(!(insp = usb_open(device))) {
printf("Error: usb_control_init: Open
device\n");
return NULL;
} else {
printf("Info: usb_control_init: device
found:"
" V:0x%04x P:0x%04x D:0x%04x\n",
device->descriptor.idVendor,
device->descriptor.idProduct,
device->descriptor.bcdDevice);
usb_found = 1;
}
}
}
}
if(!usb_found) {
printf("Error: usb_control_init: Device not found\n");
return NULL;
}
// printf("Info: usb_control_init: Device found\n");
if (usb_claim_interface(insp, 0) < 0) {
printf("Error: usb_control_init: could not claim
interface: %s\n", strerror(errno));
return NULL;
}
// printf("Info: usb_control_init: Device claimed\n");
if (usb_set_altinterface(insp, 0) < 0) {
printf("Error: usb_control_init: could not set alternate
setting, %s\n", strerror (errno));
return NULL;
}
return insp;
}
>
> Alan Stern
>
>
___________________________________________________________________________________________________________________
Mikroköltségek mikrovállalatoknak! Számlavezetési díj havi 490 Ft! - [origo]
klikkbank mikrovállalati számlacsomag
http://cthandler.adverticum.net/?cturl=http%3A%2F%2Fwww.klikkbank.hu%2Fvallalati%2Ftermekek%2Fszamlacsomag%2Findex.html%3Flevelalja
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users