OpenWrt Forum Archive

Topic: USB-Hid on WL-500GD

The content of this topic has been archived on 23 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all, I'm having trouble with my WL-500GD (2.4). I want my ASUS to get data from weather station Watson W-8681, unfortunately this WS is connected via USB as HID device
Hardware identification:

usb 2-8: new low speed USB device using ohci_hcd and address 2
usb 2-8: configuration #1 chosen from 1 choice
hiddev96hidraw0: USB HID v1.00 Device [HID 1941:8021] on usb-0000:00:02.0-8
usb 2-8: New USB device found, idVendor=1941, idProduct=8021
usb 2-8: New USB device strings: Mfr=0, Product=0, SerialNumber=0

I was running trunk version of Openwrt revision 7880, this revision without hid module doesn't recognize station, so I have decided to build new image. I had downloaded the latest trunk version, updated kernel_menuconfig (enable HID and input devices), build and installed new image. Asus now recognizes device. After the device is connected in dmesg i got information, that new HID device was connected.
New nod /dev/usb/hid/hiddev0 is created.
dmesg:

hub.c: new USB device 01:02.0-2.4, assigned address 6
hiddev0: USB HID v1.00 Device [1941:8021] on usb1:6.0

Then I have cross-compiled script for the weather s. – http://meteolinger.lowlevel.cz/tracker ( http://meteolinger.lowlevel.cz/anonsvn/driver/wwsr.c ).

Mipsel cross compile:
./staging_dir_mipsel/bin/mipsel-linux-uclibc-gcc -I ./staging_dir_mipsel/include/ -I ./staging_dir_mipsel/usr/include/ -L ./staging_dir_mipsel/usr/lib/ -lusb -O2 -Wall wwsr.c -o wwsr

Classic PC compile:
gcc /usr/lib/libusb.so wwsr.c -o wwsr

When is this script launched, on the output they displayed faulty values and the nod /dev/usb/hid/hiddev0 is dropped and does'n exists until the USB device is reconnected.

dmesg errors:

usbdevfs: usb_submit_urb returned -22
usbdevfs: usb_submit_urb returned -22
usbdevfs: usb_submit_urb returned -22
usbdevfs: usb_submit_urb returned -22
usbdevfs: usb_submit_urb returned -22
usbdevfs: usb_submit_urb returned -22
usbdevfs: usb_submit_urb returned -22
usbdevfs: usb_submit_urb returned -22
usbdevfs: usb_submit_urb returned -22
usbdevfs: usb_submit_urb returned -22

Where should be mistake? Thanks in advance for any ideas (and sorry for my bad English – http://www.virtualnipraha.cz/images/flag_cs.jpg) smile

(Last edited by jirin.sv on 28 Dec 2008, 20:16)

Nobody has an idea how to solve it?

The discussion might have continued from here.