Hi,
I am using a USB RFID Reader to read the EPC code associated with a RFID tag
on a Linux platform(using JSR80). The device uses ByteStream Protocol to
communicate with the host. This protocol requires use of HID Report number
1.
The read tag command as provided in the device specification is :
<01><00><06><22><A0><85><00>
I believe I have to use SET_REPORT(to send control) and GET_REPORT(to
recieve data) to enable communication.
In order to issue the read tag command, i am using the following header
values(from the usb 1.1 HID specification):
bmRequestType: 0x21
bRequest: 0x09 (*SET_REPORT, to the device*)
wValue: 0x0201 (<I/O Type><Report Number>)
wIndex: 0x0000 (Interface number)
wLength: 0x07 (Number of Bytes to send to the device)
Data: <01><00><06><22><A0><85><00>
I wrap this data in a *UsbControlIrp*, and send it to the device using
*syncSubmit
*method.
Later i have to read the report from the device using GET_REPORT. For this I
would use the headers as follows:
(The INPUT Report from the device would be of size 22 bytes)
bmRequestType: 0xA1
bRequest: 0x01 (*GET_REPORT, from the device*)
wValue: 0x0101 (<I/O Type><Report Number>)
wIndex: 0x0000 (Interface number)
wLength: 0x16 (Number of Bytes to be recieved from the device,
22 in HEX)
Data: <empty> < I assume the data read from the device
will be stored here>
I again wrap this data in a UsbControlIrp and send it to the device using
syncSubmit method.
Is my approach correct or am I going wrong somewhere?
Please let me know!
Thank You
Regards
Rahul Bourothu
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel