Sorry for cluttering the list, but I just woudl like to make this work ... <br><br><font style="font-family: courier new,monospace;" size="1">jordi@puigmal:~$ dmesg | grep usb<br>[ 0.602419] usbcore: registered new interface driver usbfs<br>
[ 0.602419] usbcore: registered new interface driver hub<br>[ 0.602419] usbcore: registered new device driver usb<br>[ 3.524080] usb usb1: configuration #1 chosen from 1 choice<br>[ 3.544076] usb usb2: configuration #1 chosen from 1 choice<br>
[ 3.544430] usb usb3: configuration #1 chosen from 1 choice<br>[ 3.544714] usb usb4: configuration #1 chosen from 1 choice<br>[ 3.544998] usb usb5: configuration #1 chosen from 1 choice<br>[ 3.545283] usb usb6: configuration #1 chosen from 1 choice<br>
[ 4.140028] usb 3-1: new full speed USB device using uhci_hcd and address 2<br>[ 4.306669] usb 3-1: configuration #1 chosen from 1 choice<br>[ 4.548452] usb 4-2: new low speed USB device using uhci_hcd and address 2<br>
[ 4.702786] usb 4-2: configuration #1 chosen from 1 choice<br>[ 10.772854] usbcore: registered new interface driver btusb<br>[ 11.110766] usbcore: registered new interface driver hiddev<br>[ 11.123978] input: HID 047d:1062 as /devices/pci0000:00/0000:00:1d.0/usb4/4-2/4-2:1.0/input/input5<br>
[ 11.125694] generic-usb 0003:047D:1062.0001: input,hidraw0: USB HID v1.00 Mouse [HID 047d:1062] on usb-0000:00:1d.0-2/input0<br>[ 11.125715] usbcore: registered new interface driver usbhid<br>[ 11.125718] usbhid: v2.6:USB HID core driver<br>
<span style="color: rgb(255, 0, 0);">[ 78.544058] usb 4-1: new low speed USB device using uhci_hcd and address 3</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">[ 78.718640] usb 4-1: configuration #1 chosen from 1 choice</span><br style="color: rgb(255, 0, 0);">
<span style="color: rgb(255, 0, 0);">[ 78.735138] generic-usb 0003:0FDE:CA01.0002: hiddev96,hidraw1: USB HID v1.10 Device [Universal Bridge] on usb-0000:00:1d.0-1/input0</span><br></font><br>The last three lines appear when the weather station is plugged in the computer. Someone has pointed me out that in Ubuntu Jaunty the usbserial is built-in in the kernel, however I don't see it in dmesg. I suppose that is not the problem.<br>
<br>Jordi.<br><br><div class="gmail_quote">2009/7/30 Jordi Puigsegur <span dir="ltr"><<a href="mailto:jordi.puigsegur@gmail.com">jordi.puigsegur@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I found another directory under sys/bus where the device does appear:<br><br><font size="1"><span style="font-family: courier new,monospace;">root@puigmal:/sys/bus/hid/drivers/generic-usb$ ls</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">0003:047D:1062.0002 0003:0FDE:CA01.0001 bind module uevent unbind</span><br style="font-family: courier new,monospace;"></font><br>However, after doing the unbind, libhid returns the same error<br>
<font style="font-family: courier new,monospace;" size="1"><br>root@puigmal:/sys/bus/hid/drivers/generic-usb# echo -n "0003:0FDE:CA01.0001" > unbind<br>root@puigmal:/sys/bus/hid/drivers/generic-usb# ls<br>0003:047D:1062.0002 bind module uevent unbind</font><br>
<br><font size="1"><span style="font-family: courier new,monospace;">jordi@puigmal:~/workspace/prova1/Debug$ sudo ./prova1</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">[...]</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> NOTICE: hid_force_open(): successfully opened USB device 004/002[0].</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">[...]</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">WARNING: hid_interrupt_read(): failed to get interrupt read from device 004/002[0]: could not claim interface 0: Device or resource busy</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">hid_interrupt_read failed with return code 21</span><br style="font-family: courier new,monospace;"></font><br>I'll keep trying. <br>I am using ubuntu Jaunty and I just read there are issues with usbserial. Seems that this module has been added to the kernel and has caused some trouble. I'll try to investigate that..<br>
<br>Thanks,<br>Jordi.<br><br><div class="gmail_quote">2009/7/29 Jordi Puigsegur <span dir="ltr"><<a href="mailto:jordi.puigsegur@gmail.com" target="_blank">jordi.puigsegur@gmail.com</a>></span><div><div></div><div class="h5">
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br> <div class="gmail_quote"><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">When I was doing some libusb work, I found that I needed to unbind the<br>
interface from the driver before I could claim it with libusb. The<br>
interface will remain unclaimed until the device is connected again. I<br>
currently run the following commands to unbind the interface whenever<br>
I need to use the device and libusb can't claim the interface.<br>
<br>
# cd /sys/bus/usb/drivers/usbhid<br>
# echo -n interface > unbind<br>
"interface" is the name of the interface in the<br>
/sys/bus/usb/drivers/usbhid folder. For my device, it was something<br>
like "6-2:1.0". It will look similar for your device. From your lsusb<br>
output, I'd guess that your interface would have the identifier<br>
"4-2:1.0". The first part of that identifier varies based on which bus<br>
and port number your device is plugged into and the second part varies<br>
with the configuration number (usually always 1) and the interface<br>
number.<br>
</blockquote></div><div><br>I tried that, and the device doesn't appear in /sys/bus/usb/drivers/usbhid. Nor does it appear under any /sys/bus/usb/drivers directory:<br><br>root@puigmal:/sys/bus/usb# ls -R<br>.:<br>devices drivers drivers_autoprobe drivers_probe uevent<br>
<br>./devices:<br>1-0:1.0 3-1 3-1:1.2 4-1 4-2:1.0 usb1 usb4<br>2-0:1.0 3-1:1.0 3-1:1.3 4-1:1.0 5-0:1.0 usb2 usb5<br>3-0:1.0 3-1:1.1 4-0:1.0 4-2 6-0:1.0 usb3 usb6<br><br>./drivers:<br>btusb hiddev hub usb usbfs usbhid<br>
<br>./drivers/btusb:<br>3-1:1.0 3-1:1.1 bind module new_id uevent unbind<br><br>./drivers/hiddev:<br>bind module new_id uevent unbind<br><br>./drivers/hub:<br>1-0:1.0 3-0:1.0 5-0:1.0 bind new_id unbind<br>
2-0:1.0 4-0:1.0 6-0:1.0 module uevent<br><br>./drivers/usb:<br>3-1 4-1 4-2 bind uevent unbind usb1 usb2 usb3 usb4 usb5 usb6<br><br>./drivers/usbfs:<br>bind module new_id uevent unbind<br><br>./drivers/usbhid:<br>
4-1:1.0 4-2:1.0 bind module new_id uevent unbind<br><br>root@puigmal:/sys/bus/usb# lsusb<br>Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br>Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br>
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br>Bus 004 Device 004: ID 047d:1062 Kensington PocketMouse Max<br>Bus 004 Device 003: ID 0fde:ca01 <br>Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br>
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br>Bus 003 Device 002: ID 03f0:171d Hewlett-Packard Wireless (Bluetooth + WLAN) Interface [Integrated Module]<br>Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub<br>
<br><br>This was done just after starting the computer and plugging in the weather station, before running any C program. <br><br> Might there be any other program claiming the interface? How could I check that?<br> <br>
Thanks,<br>
Jordi<br></div></div><br>
</blockquote></div></div></div><br>
</blockquote></div><br>