> a. how to check the attached device is HID device? While "HID device" is common in referring to such devices, technically it is each device interface that implements the HID class.
So you should check the device's interface(s), the interface descriptor for each interface will have a class. If that class is HID, then the interface supports the HID protocol. See the javax.usb API, specifically the UsbInterface and UsbInterfaceDescriptor. The API is part of the source code or on the website: http://javax-usb.org/jdoc/ > b. do u have any example to show us about implementing USB<->HID translation > on top of javax.usb? No, not really. HID is actually not nearly as complicated as most other protocols, but it's still fairly complicated. However, for many HID devices, there is a very limited number of reports that they use, so many times you don't have to actually implement the entire HID spec, and if you're just talking to this one device that you know the specific HID Report descriptors to (i.e. you know all its reports), then you can "fake" talking HID to it. For example, you can parse the device's HID report descriptor(s) manually (i.e., read the binary yourself and parse it) and then you know the specific reports the device will send/receive. You then don't need to implement a HID parser, because you're only talking to the one HID device and you can code directly to what its HID reports will look like. > c. if you do not have examples handy, so what is the approach/advise/steps > to implement USB<->HID? > d. where i can find more info about HID protocol specfication? First you will need to read the HID spec. If you haven't read the USB spec either, you need to read that too, Chapter 5 and 9 I think (not sure) are the relevant parts. The HID and USB specs are both available from http://usb.org > e. javax-usb support both USB 1.x and USB 2.x? What specifically do you mean by "support"? Do you mean, will USB 2.0 devices work with javax.usb? Yes, they will. On Tue, Mar 17, 2009 at 5:39 PM, wind sh <[email protected]> wrote: > > I asked you the question regarding zigbee device last week, and get lots of > help from you... > > today i received the actual device, and was told that it is HID device..and > this HID device received remote data by zigbee protocol... > > i reviewed your site's FAQ again, it says the following: > > HID is a protocol layered on top of USB, so you can use any HID device with > javax.usb. However you will need to implement USB<->HID translation on top > of javax.usb. You will need to be familiar with the HID specification to do > this. > > then, i have the following as the following: > > a. how to check the attached device is HID device? > > b. do u have any example to show us about implementing USB<->HID translation > on top of javax.usb? > > c. if you do not have examples handy, so what is the approach/advise/steps > to implement USB<->HID? > > d. where i can find more info about HID protocol specfication? > > e. javax-usb support both USB 1.x and USB 2.x? > > tks in advance, your comments is really helpful. > > john > ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ javax-usb-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/javax-usb-devel
