libusbx v1.0.9-rc4 is now available
Xiaofan Chen
xiaofanc at gmail.com
Fri Mar 30 09:12:15 EDT 2012
On Fri, Mar 30, 2012 at 9:08 PM, Xiaofan Chen <xiaofanc at gmail.com> wrote:
> On Fri, Mar 30, 2012 at 8:49 PM, Pete Batard <pete at akeo.ie> wrote:
>> On 2012.03.30 10:34, Xiaofan Chen wrote:
>>> 2) not so sure why xusb example default to debug log mode.
>>
>>> libusb:info [process_new_device] allocating new device for location
>>> 0xfa000000
>>> libusb:info [darwin_check_configuration] active config: 1, first config: 1
>>> libusb:info [process_new_device] found device with address 1 at
>>> 001-05ac-8006-09-00
>>> libusb:info [process_new_device] allocating new device for location
>>> 0xfa100000
>>> libusb:info [darwin_check_configuration] active config: 1, first config: 1
>>> libusb:info [process_new_device] found device with address 2 at
>>
>>
>> Looks to me like you are getting info messages, which is unrelated to
>> enabling debug. I don't think these messages should be info, as there are
>> quite a lot of them. May want to fix that for 1.0.10. I just logged trac
>> issue #1 against this (so that we can test trac as well).
>>
>
> On the other hand, I think it is better to fix xusb not to use
> debug level 3 as default.
>
> Just change line 871-872 should be good to go.
> #871 // Info = 3, Debug = 4
> #872 libusb_set_debug(NULL, debug_mode?4:3);
>
> Just change to the following and it will be fine.
> // Debug = 4
> libusb_set_debug(NULL, debug_mode?4:0);
With the above changes, then the output of xusb is
in line with my expectation.
mymacmini:examples xiaofanc$ ./xusb 04d8:fa2e
Opening device...
speed: 12 Mbit/s (USB 1.0 FullSpeed)
Reading device descriptor:
length: 18
device class: 0
S/N: 3
VID:PID: 04D8:FA2E
bcdDevice: 0001
iMan:iProd:iSer: 1:2:3
nb confs: 1
Reading configuration descriptors:
nb interfaces: 1
interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 2
Class.SubClass.Protocol: 00.00.00
endpoint[0].address: 01
max packet size: 0020
polling interval: 00
endpoint[1].address: 81
max packet size: 0020
polling interval: 00
interface[0].altsetting[1]: num endpoints = 2
Class.SubClass.Protocol: 00.00.00
endpoint[0].address: 01
max packet size: 0040
polling interval: 00
endpoint[1].address: 81
max packet size: 0040
polling interval: 00
Claiming interface 0...
Reading string descriptors:
String (0x01): "Travis Robinson"
String (0x02): "Benchmark Device"
String (0x03): "LUSBW1"
Releasing interface 0...
Closing device...
mymacmini:examples xiaofanc$ ./xusb -d 04d8:fa2e
Opening device...
libusb:info [process_new_device] allocating new device for location 0xfa000000
libusb:info [darwin_check_configuration] active config: 1, first config: 1
libusb:info [process_new_device] found device with address 1 at
001-05ac-8006-09-00
libusb:info [process_new_device] allocating new device for location 0xfa100000
libusb:info [darwin_check_configuration] active config: 1, first config: 1
libusb:info [process_new_device] found device with address 2 at
002-0424-2513-09-00
libusb:info [process_new_device] allocating new device for location 0xfa110000
libusb:info [process_new_device] allocating new device for location 0xfa120000
libusb:info [darwin_check_configuration] active config: 1, first config: 1
libusb:info [process_new_device] found device with address 5 at
005-04f2-0760-00-00
libusb:info [process_new_device] allocating new device for location 0xfa113000
libusb:warning [darwin_cache_device_descriptor] could not retrieve
device descriptor 05ac:8281: device not responding. skipping device
libusb:info [process_new_device] allocating new device for location 0xfa130000
libusb:info [darwin_check_configuration] active config: 1, first config: 1
libusb:info [process_new_device] found device with address 4 at
004-05e3-0606-09-00
libusb:info [process_new_device] allocating new device for location 0xfa134000
libusb:info [darwin_check_configuration] active config: 1, first config: 1
libusb:info [process_new_device] found device with address 7 at
007-046d-c054-00-00
libusb:info [process_new_device] allocating new device for location 0xfa132000
libusb:info [darwin_check_configuration] active config: 1, first config: 1
libusb:info [process_new_device] found device with address 9 at
009-046d-c52b-00-00
libusb:info [process_new_device] allocating new device for location 0xfa131000
libusb:info [darwin_check_configuration] active config: 1, first config: 1
libusb:info [process_new_device] found device with address 6 at
006-04d8-fa2e-00-00
libusb:info [process_new_device] allocating new device for location 0xfd000000
libusb:info [darwin_check_configuration] active config: 1, first config: 1
libusb:info [process_new_device] found device with address 1 at
001-05ac-8006-09-00
libusb:info [process_new_device] allocating new device for location 0xfd100000
libusb:info [darwin_check_configuration] active config: 1, first config: 1
libusb:info [process_new_device] found device with address 2 at
002-0424-2513-09-00
libusb:info [process_new_device] allocating new device for location 0xfd110000
libusb:info [darwin_check_configuration] active config: 1, first config: 1
libusb:info [process_new_device] found device with address 3 at
003-05ac-8242-00-00
libusb:info [process_new_device] allocating new device for location 0xfd130000
libusb:info [darwin_check_configuration] active config: 1, first config: 1
libusb:info [process_new_device] found device with address 4 at
004-0ac8-3420-ef-02
libusb:info [darwin_open] device open for access
speed: 12 Mbit/s (USB 1.0 FullSpeed)
Reading device descriptor:
length: 18
device class: 0
S/N: 3
VID:PID: 04D8:FA2E
bcdDevice: 0001
iMan:iProd:iSer: 1:2:3
nb confs: 1
Reading configuration descriptors:
nb interfaces: 1
interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 2
Class.SubClass.Protocol: 00.00.00
endpoint[0].address: 01
max packet size: 0020
polling interval: 00
endpoint[1].address: 81
max packet size: 0020
polling interval: 00
interface[0].altsetting[1]: num endpoints = 2
Class.SubClass.Protocol: 00.00.00
endpoint[0].address: 01
max packet size: 0040
polling interval: 00
endpoint[1].address: 81
max packet size: 0040
polling interval: 00
Claiming interface 0...
libusb:info [get_endpoints] building table of endpoints.
libusb:info [get_endpoints] interface: 0 pipe 1: dir: 0 number: 1
libusb:info [get_endpoints] interface: 0 pipe 2: dir: 1 number: 1
libusb:info [darwin_claim_interface] interface opened
Reading string descriptors:
libusb:info [darwin_async_io_callback] an async io operation has completed
libusb:info [op_handle_events] checking fd 4 with revents = 0
libusb:info [op_handle_events] checking fd 6 with revents = 1
libusb:info [darwin_handle_callback] handling control completion with
kernel status 0
libusb:info [darwin_async_io_callback] an async io operation has completed
libusb:info [op_handle_events] checking fd 4 with revents = 0
libusb:info [op_handle_events] checking fd 6 with revents = 1
libusb:info [darwin_handle_callback] handling control completion with
kernel status 0
String (0x01): "Travis Robinson"
libusb:info [darwin_async_io_callback] an async io operation has completed
libusb:info [op_handle_events] checking fd 4 with revents = 0
libusb:info [op_handle_events] checking fd 6 with revents = 1
libusb:info [darwin_handle_callback] handling control completion with
kernel status 0
libusb:info [darwin_async_io_callback] an async io operation has completed
libusb:info [op_handle_events] checking fd 4 with revents = 0
libusb:info [op_handle_events] checking fd 6 with revents = 1
libusb:info [darwin_handle_callback] handling control completion with
kernel status 0
String (0x02): "Benchmark Device"
libusb:info [darwin_async_io_callback] an async io operation has completed
libusb:info [op_handle_events] checking fd 4 with revents = 0
libusb:info [op_handle_events] checking fd 6 with revents = 1
libusb:info [darwin_handle_callback] handling control completion with
kernel status 0
libusb:info [darwin_async_io_callback] an async io operation has completed
libusb:info [op_handle_events] checking fd 4 with revents = 0
libusb:info [op_handle_events] checking fd 6 with revents = 1
libusb:info [darwin_handle_callback] handling control completion with
kernel status 0
String (0x03): "LUSBW1"
libusb:info [darwin_async_io_callback] an async io operation has completed
libusb:info [op_handle_events] checking fd 4 with revents = 0
libusb:info [op_handle_events] checking fd 6 with revents = 1
libusb:info [darwin_handle_callback] handling control completion with
kernel status 0
libusb:info [darwin_async_io_callback] an async io operation has completed
libusb:info [op_handle_events] checking fd 4 with revents = 0
libusb:info [op_handle_events] checking fd 6 with revents = 1
libusb:info [darwin_handle_callback] handling control completion with
kernel status -536854449
libusb:warning [darwin_transfer_status] transfer error: pipe is stalled
Releasing interface 0...
Closing device...
libusb:info [event_thread_main] thread exiting
--
Xiaofan
More information about the libusbx
mailing list