Re: usb hid

From: roswell (roswel_ajf_at_hotmail.com)
Date: 05/10/04


Date: 10 May 2004 11:43:00 -0700

Gyger Jean-Luc <jean-luc.gyger@omega-electronics.ch> wrote in message news:<pan.2004.04.27.12.30.26.471329@omega-electronics.ch>...
> Hi,
>
> I would like to know how I can communicate with a HID device. This device
> is not a keyboard or mouse but it use the HID driver.
>
> I try different way, but nothing.
>
>
> 1. Using hiddev
> if ((fd = open("/dev/usb/hid/hiddev0", O_RDWR)) < 0) {
> perror("hiddev open");
> exit(1);
> }
> char buff[9];
> int n = read(fd,buff, 9);
>
> 2. Using libusb
>
> usb_init();
>
>
> usb_find_busses();
> usb_find_devices();
>
> for (bus = usb_busses; bus; bus = bus->next)
> {
> for (dev = bus->devices; dev; dev = dev->next)
> {
> int ret, i;
> char string[256];
>
> if(dev->descriptor.idVendor == 0x925 &&
> dev->descriptor.idProduct == 0x1234 )
> {
> udev = usb_open(dev);
> if(udev)
> {
> if (usb_claim_interface(udev, 0) < 0) {
> printf("usb_claim_interface 1: %s\n",usb_strerror());
> usb_close(udev);
> udev = NULL;
> return false;
> }
> }
>
> }
> }
> }
>
> Here, the funntion usb_claim_interface return: device busy.
>
> I would appreciate any help. If you need any further
> information, please let me know.
>
>
> Jlg

Hi, i am having the same problem, any help would eb great. i have
kernel 2.4, trying to just open() device file for HID/smartcardreader,
but no luck. not even sure which devfile to use? any idea?



Relevant Pages

  • Re: User-level (application not driver) HID device interface
    ... application to communicate with a HID device. ... client driver that exposes IOCTLs that an application can call. ... > clarification or a working sample. ...
    (microsoft.public.windowsce.platbuilder)
  • usb hid
    ... I would like to know how I can communicate with a HID device. ... is not a keyboard or mouse but it use the HID driver. ...
    (comp.os.linux.development.apps)
  • Re: Sending private data to a USB HID Keyboard
    ... you can then open the HID device in user mode ... I have a client that's building a USB HID Keyboard. ... API visible to User Mode programs. ... PS/2 to USB thingie so that kinda implies the private messages are just ...
    (microsoft.public.development.device.drivers)
  • Re: Help! No keyboard & Secure Log-on
    ... Your pals at microsoft will disable your ... > activation site within 7 days. ... > keyboard perhaps as a hid device. ...
    (microsoft.public.windowsxp.security_admin)
  • HID support
    ... FreeBSD (my opinion based on mailing lists archives). ... Mouse and keyboard must thought ... mouse set as with one HID device? ...
    (freebsd-questions)