> So i decided to issue the same commands under linux using a skeleton driver i
> have written (a char device which send and receive data from the device) and
> i have got a different answer! which is:
> 02 00 00 00 00 00 01 01 00 01 00 00 01 01 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> and
> 00 00 00 ec 76 ff 01 01 00 01 00 00 01 01 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 
> Is there any reason for this different behaviour in Linux?
> I run every test after unplugging/turning off/turning on/puggling again the
> device...
> Please note before receiving the data from the device i always memset to 0 the
> entire receive buffer, so maybe the difference between all those "ff" and the
> "00" is a shorted data transferred form the device.

So memset to a different value for a test and you'll know.
 
> If this is the case, i have a question to ask you: how can i konw how much
> data will the device send me? Or how can i know how much data the device
> actually sent me? (i already consider urbp->actual_length which says 0x40
> bytes after the usb_submit_urb)

You'll know only after the URB has completed.
Also you should read the section on error codes in the documentation.

In addition you should check whether Windows uses another altsetting or
configuration than Linux.

        HTH
                Oliver



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to