On Fri, May 25, 2012 at 2:01 AM, Pete Batard <p...@akeo.ie> wrote:
> This one does a few things:
>
> 1. It sets the origin of the timestamps to the first libusb_init() call
> issued by the application. The idea is to avoid getting an arbitrary origin
> once we have toggleable logging, as it is currently set to the first debug
> message ever issued, which isn't something an app developer can reference
> against as it could occur wherever.
>
> 2. It only displays the timestamp and thread ID if the global logging level
> has been set to debug. The rationale behind that is that, outside of debug,
> logging messages are expected to be sparse and likely to only occur for
> errors and warnings. As such, timestamping and thread ID are probably be
> irrelevant for the app developer, even more so if they only get one
> error/warning during the course of the app.
>

I think the idea behind the above is good.

But somehow it does not seem to work. Maybe what I really need is
the next Toggle-able logging.

mymacmini:examples xiaofanc$ export LIBUSB_DEBUG=1

mymacmini:examples xiaofanc$ ./xusb -d 0424:2513
Using libusbx v1.0.11.10507

Opening device...
libusbx: error [darwin_open] USBDeviceOpen: another process has device
opened for exclusive access
bus: 250, port path from HCD: 1
speed: 480 Mbit/s (USB 2.0 HighSpeed)

Reading device descriptor:
            length: 18
      device class: 9
               S/N: 0
           VID:PID: 0424:2513
         bcdDevice: 0BB3
   iMan:iProd:iSer: 0:0:0
          nb confs: 1

Reading configuration descriptors:
             nb interfaces: 1
              interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 09.00.01
       endpoint[0].address: 81
           max packet size: 0001
          polling interval: 0C
interface[0].altsetting[1]: num endpoints = 1
   Class.SubClass.Protocol: 09.00.02
       endpoint[0].address: 81
           max packet size: 0001
          polling interval: 0C

Claiming interface 0...
libusbx: error [darwin_claim_interface]
IOCreatePlugInInterfaceForService: unknown error
   Failed.

Reading string descriptors:
libusbx: error [submit_control_transfer] control request failed: no
async port has been opened for interface

Releasing interface 0...
Closing device...

mymacmini:examples xiaofanc$ export LIBUSB_DEBUG=3

mymacmini:examples xiaofanc$ ./xusb -d 0424:2513
Using libusbx v1.0.11.10507

Opening device...
libusbx: warning [darwin_cache_device_descriptor] could not retrieve
device descriptor 05ac:8281: device not responding. skipping device
libusbx: error [darwin_open] USBDeviceOpen: another process has device
opened for exclusive access
libusbx: warning [darwin_cache_device_descriptor] could not retrieve
device descriptor 05ac:8281: device not responding. skipping device
bus: 250, port path from HCD: 1
speed: 480 Mbit/s (USB 2.0 HighSpeed)

Reading device descriptor:
            length: 18
      device class: 9
               S/N: 0
           VID:PID: 0424:2513
         bcdDevice: 0BB3
   iMan:iProd:iSer: 0:0:0
          nb confs: 1

Reading configuration descriptors:
             nb interfaces: 1
              interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 09.00.01
       endpoint[0].address: 81
           max packet size: 0001
          polling interval: 0C
interface[0].altsetting[1]: num endpoints = 1
   Class.SubClass.Protocol: 09.00.02
       endpoint[0].address: 81
           max packet size: 0001
          polling interval: 0C

Claiming interface 0...
libusbx: error [darwin_claim_interface]
IOCreatePlugInInterfaceForService: unknown error
   Failed.

Reading string descriptors:
libusbx: error [submit_control_transfer] control request failed: no
async port has been opened for interface

Releasing interface 0...
Closing device...

-- 
Xiaofan

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to