libusb usb_interrupt_read hangs under FreeBSD

Xiaofan Chen xiaofanc at gmail.com
Tue Apr 3 13:35:02 UTC 2007


On 4/3/07, Hans Petter Selasky <hselasky at c2i.net> wrote:
> On Tuesday 03 April 2007 13:27, Xiaofan Chen wrote:
> > I was redirected to this list as per the suggestion from the
> > libusb mailing list.
> >
> > It will be greatly appreciated that someone can suggest
> > how to debug this problem?
>
> With the new USB stack installed, do like this:
>
> sysctl hw.usb.debug=15
>
> Then run you program.
>
> Then get all the lines with "ugen()" in the debug output.
>
> sysctl hw.usb.debug=0
>
> --HPS

Thanks for the fast reply.

===[mcuee] ~/Desktop/build/mypk2 # sudo sysctl hw.usb.debug=15
Password:
hw.usb.debug: 0 -> 15

===[mcuee] ~/Desktop/build/mypk2 # sudo python testpk2.py
usb_set_debug: Setting debugging level to 255 (on)
usb_os_find_busses: Found /dev/usb0
usb_os_find_busses: Found /dev/usb1
usb_os_find_busses: Found /dev/usb2
usb_os_find_devices: Found /dev/ugen0 on /dev/usb1
usb_control_msg: 128 6 512 0 0xbfbfe2e8 8 1000
usb_control_msg: 128 6 512 0 0x81222c0 41 1000
skipped 1 class/vendor specific interface descriptors
usb_control_msg: 128 6 513 0 0xbfbfe2e8 8 1000
usb_control_msg: 128 6 513 0 0x8116900 32 1000
setConfiguration params:
       configuration: 1
set Configuration 1
claimInterface params:
       interfaceNumber: 0
claim Interface 0
Turing power on by USB interrupt write
interruptWrite params:
       endpoint: 1
       timeout: 1000
interruptWrite buffer param:
56 31 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a
5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a
5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a
5a 5a 5a
Sending version command by USB interrupt write
interruptWrite params:
       endpoint: 1
       timeout: 1000
interruptWrite buffer param:
76 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a
5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a
5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a
5a 5a 5a
Getting version command by USB interrupt read
interruptRead params:
       endpoint: 1
       size: 64
       timeout: 1000
^CUSB error: error reading from interrupt endpoint /dev/ugen0.1:
Interrupted system call
Traceback (most recent call last):
 File "testpk2.py", line 43, in ?
   r=dh.interruptRead(1,64,1000)
usb_os_close: closing endpoint 4

===[mcuee] ~ # dmesg | grep ugen
ugen0: <Microchip Technology Inc. PICkit 2 Microcontroller Programmer,
class 0/0, rev 2.00/0.01, addr 126>
ugenopen: flag=1, mode=8192
ugenioctl: cmd=40125569
ugenclose: flag=1, mode=8192
ugenopen: flag=3, mode=8192
ugenioctl: cmd=80045572
ugenioctl: cmd=c018556f
ugenioctl: cmd=80045572
ugenioctl: cmd=c018556f
ugenioctl: cmd=80045572
ugenioctl: cmd=c018556f
ugenioctl: cmd=80045572
ugenioctl: cmd=c018556f
ugenclose: flag=3, mode=8192
ugenopen: flag=3, mode=8192
ugenioctl: cmd=80045565
ugen_set_config: configno 1, sc=0xc31ad800
ugenclose: flag=0, mode=0
ugenopen: flag=3, mode=8192
ugenioctl: cmd=80045572
ugenwrite:
ugenwrite: transferred 64 bytes
ugenioctl: cmd=80045572
ugenwrite:
ugenwrite: transferred 64 bytes
ugenioctl: cmd=80045572
ugenioctl: cmd=80045571
ugenread:
ugen_open_pipe_read: interrupt open done
ugenclose: flag=3, mode=8192
ugenclose: flag=3, mode=8192

Regards,
Xiaofan


More information about the freebsd-usb mailing list