On Wed, 25 Oct 2006, Alex Litvin wrote:

> Hello, Alan and thahks for your reply.
> The code has been run on Ubuntu Linux 6.06
> Here's console output that I get:
> 
> found argox_PT dev-004 on bus-001
> usb_set_altinterface  fail error 25 Inappropriate ioctl for device
> - Manufacturer : Argox Informations
> - Product : CRD -10
> - Serial Number: 60227075
> device claimed!
> WRITE TO 02h READ FROM 82h
>   SIZEIN 64 SIZEOUT 64
>   PTS 1
> buf=1b, transfered 1 bytes
> buf=1c, transfered 1 bytes
> buf=1d, transfered 1 bytes
> buf=1e, transfered 1 bytes
> buf=1f, transfered 1 bytes
> buf=20, transfered 1 bytes
> buf=21, transfered 1 bytes
> buf=22, transfered 1 bytes
> buf=23, transfered 1 bytes
> buf=24, transfered 1 bytes
> buf=25, transfered 1 bytes
> buf=26, transfered 1 bytes
> buf=27, transfered 1 bytes
> buf=28, transfered 1 bytes
> open error 11 Resource temporarily unavailable
> open error 11 Resource temporarily unavailable
> open error 11 Resource temporarily unavailable
> open error 11 Resource temporarily unavailable
> open error 11 Resource temporarily unavailable
> open error 11 Resource temporarily unavailable
> open error 11 Resource temporarily unavailable
> open error 11 Resource temporarily unavailable
> open error 11 Resource temporarily unavailable
> open error 11 Resource temporarily unavailable
> open error 11 Resource temporarily unavailable
> open error 11 Resource temporarily unavailable
> open error 11 Resource temporarily unavailable
> open error 11 Resource temporarily unavailable

If you have any other USB devices plugged in, try unplugging them.

> Here is the commented source:

These two lines look a little strange:

>               char * buff = new char[10];
>               delete [] buff;                 // read\write buffer

What point is there in allocating a buffer and then immediately 
deallocating it?  Especially if you are going to use that buffer later?

> From console output I see that writing to device succeeds, the device
> actually receives the information sent. Unfortunately writing fails.
> All the 14 times i get "open error 11 Resource temporarily
> unavailable".
> 
> As far as I understand, setting configuration by usb_set_configuration
> can be performed after disconnection of a system-assigned driver as
> well, right?

It can be performed at any time.  But there's no reason to disconnect a 
system-assigned driver just before calling usb_set_configuration, since 
usb_set_configuration will automatically do the disconnect for you.

> By default the device is recognized as hiddev. If trying to set config
> and disconnect driver only after that, I get exactly the same.
> Could you provide with any ideas of how to sort this out, please?

Try setting the usbfs_snoop=y module option for usbcore, and then see what 
shows up in the system log.

Alan Stern


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to