On Mon, Jul 16, 2012 at 9:34 AM, Xiaofan Chen <[email protected]> wrote:
> On Sun, Jul 15, 2012 at 11:36 PM, Wander Lairson Costa
> <[email protected]> wrote:
>> 2012/7/15 Xiaofan Chen <[email protected]>:
>>> Same results as before. I am using FreeBSD 9's own
>>> libusb-1.0 and libusb-0.1 wrapper which are on top
>>> of its own libusb20 library.
>>>
>>> 1) libusb-1.0 backend works fine.
>>> 2) libusb-0.1 backend is not able to enumerate the device.
>>> http://sourceforge.net/apps/trac/pyusb/ticket/1
>>
>> Same error on Mac OSX... Kind of suspicious.. Any
>> possibility of they are the same bug?
>
> Indeed this sounds suspicious. Both tickets for Mac OS
> X and FreeBSD point to the following function.
> usb.backend.libusb01:_LibUSB.enumerate_devices()
Another datapoint is that pyusb-0.4.3 works fine in
enumerating device and it uses 0.1 API.
But since the implementation of pyusb 0.x
is to ally different from pyusb 1.0, so the above
data point does not really tell much.
mymacmini:pyusb-0.4.3 xiaofanc$ python setup.py build
running build
running build_ext
building 'usb' extension
creating build
creating build/temp.macosx-10.7-intel-2.7
llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe
-fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd
-DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes
-Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes
-DENABLE_DTRACE -arch i386 -arch x86_64 -pipe
-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
-c pyusb.c -o build/temp.macosx-10.7-intel-2.7/pyusb.o -I/sw/include
-I/usr/local/lib -l/opt/local/lib
i686-apple-darwin11-llvm-gcc-4.2: -l/opt/local/lib: linker input file
unused because linking not done
pyusb.c: In function ‘py_NumberAsInt’:
pyusb.c:105: warning: implicit conversion shortens 64-bit value into a
32-bit value
pyusb.c: In function ‘getBuffer’:
pyusb.c:178: warning: implicit conversion shortens 64-bit value into a
32-bit value
pyusb.c: In function ‘Py_usb_DeviceHandle_controlMsg’:
pyusb.c:1222: warning: implicit conversion shortens 64-bit value into
a 32-bit value
pyusb.c: In function ‘Py_usb_DeviceHandle_bulkWrite’:
pyusb.c:1466: warning: implicit conversion shortens 64-bit value into
a 32-bit value
pyusb.c: In function ‘Py_usb_DeviceHandle_interruptWrite’:
pyusb.c:1574: warning: implicit conversion shortens 64-bit value into
a 32-bit value
i686-apple-darwin11-llvm-gcc-4.2: -l/opt/local/lib: linker input file
unused because linking not done
creating build/lib.macosx-10.7-intel-2.7
llvm-gcc-4.2 -Wl,-F. -bundle -undefined dynamic_lookup -Wl,-F. -arch
i386 -arch x86_64 build/temp.macosx-10.7-intel-2.7/pyusb.o -lusb -o
build/lib.macosx-10.7-intel-2.7/usb.so -framework CoreFoundation
-framework IOKit -L/sw/lib -L/usr/local/lib
ld: warning: directory not found for option '-L/sw/lib'
ld: warning: directory not found for option '-L/sw/lib'
mymacmini:pyusb-0.4.3 xiaofanc$ sudo python setup.py install
running install
running build
running build_ext
running install_lib
copying build/lib.macosx-10.7-intel-2.7/usb.so ->
/Library/Python/2.7/site-packages
running install_egg_info
Writing /Library/Python/2.7/site-packages/pyusb-0.4.3-py2.7.egg-info
mymacmini:pyusb-0.4.3 xiaofanc$ cd samples/
mymacmini:samples xiaofanc$ ls
usbenum.py usbenum_mod.py usbprint.py
mymacmini:samples xiaofanc$ python usbenum.py
Device: 001
Device class: 9
Device sub class: 0
Device protocol: 1
Max packet size: 64
idVendor: 1452 (0x05ac)
idProduct: 32774 (0x8006)
Device Version: 02.00
Configuration: 1
Total length: 27
selfPowered: 1
remoteWakeup: 1
maxPower: 0
Interface: 0
Alternate Setting: 0
Interface class: 9
Interface sub class: 0
Interface protocol: 1
Endpoint: 0x81L
Type: 3
Max packet size: 8
Interval: 9
Device: 002
Device class: 9
Device sub class: 0
Device protocol: 2
Max packet size: 64
idVendor: 1060 (0x0424)
idProduct: 9491 (0x2513)
Device Version: 0;.;3
Configuration: 1
Total length: 41
selfPowered: 1
remoteWakeup: 1
maxPower: 4
Interface: 0
Alternate Setting: 0
Interface class: 9
Interface sub class: 0
Interface protocol: 1
Endpoint: 0x81L
Type: 3
Max packet size: 1
Interval: 12
Alternate Setting: 1
Interface class: 9
Interface sub class: 0
Interface protocol: 2
Endpoint: 0x81L
Type: 3
Max packet size: 1
Interval: 12
Device: 004
Device class: 0
Device sub class: 0
Device protocol: 0
Max packet size: 8
idVendor: 1266 (0x04f2)
idProduct: 1888 (0x0760)
Device Version: 01.00
Configuration: 1
Total length: 59
selfPowered: 0
remoteWakeup: 1
maxPower: 200
Interface: 0
Alternate Setting: 0
Interface class: 3
Interface sub class: 1
Interface protocol: 1
Endpoint: 0x81L
Type: 3
Max packet size: 8
Interval: 10
Interface: 1
Alternate Setting: 0
Interface class: 3
Interface sub class: 0
Interface protocol: 0
Endpoint: 0x82L
Type: 3
Max packet size: 4
Interval: 10
Device: 005
Device class: 9
Device sub class: 0
Device protocol: 1
Max packet size: 64
idVendor: 1507 (0x05e3)
idProduct: 1542 (0x0606)
Device Version: 07.02
Configuration: 1
Total length: 25
selfPowered: 1
remoteWakeup: 1
maxPower: 200
Interface: 0
Alternate Setting: 0
Interface class: 9
Interface sub class: 0
Interface protocol: 0
Endpoint: 0x81L
Type: 3
Max packet size: 1
Interval: 12
Device: 006
Device class: 0
Device sub class: 0
Device protocol: 0
Max packet size: 64
idVendor: 1118 (0x045e)
idProduct: 1907 (0x0773)
Device Version: 06.74
Configuration: 1
Total length: 84
selfPowered: 0
remoteWakeup: 1
maxPower: 200
Interface: 0
Alternate Setting: 0
Interface class: 3
Interface sub class: 1
Interface protocol: 1
Endpoint: 0x81L
Type: 3
Max packet size: 8
Interval: 4
Interface: 1
Alternate Setting: 0
Interface class: 3
Interface sub class: 1
Interface protocol: 2
Endpoint: 0x82L
Type: 3
Max packet size: 10
Interval: 1
Interface: 2
Alternate Setting: 0
Interface class: 3
Interface sub class: 0
Interface protocol: 0
Endpoint: 0x83L
Type: 3
Max packet size: 32
Interval: 1
Device: 007
Device class: 0
Device sub class: 0
Device protocol: 0
Max packet size: 8
idVendor: 1240 (0x04d8)
idProduct: 64046 (0xfa2e)
Device Version: 00.01
Configuration: 1
Total length: 55
selfPowered: 1
remoteWakeup: 0
maxPower: 200
Interface: 0
Alternate Setting: 0
Interface class: 0
Interface sub class: 0
Interface protocol: 0
Endpoint: 0x1L
Type: 2
Max packet size: 32
Interval: 0
Endpoint: 0x81L
Type: 2
Max packet size: 32
Interval: 0
Alternate Setting: 1
Interface class: 0
Interface sub class: 0
Interface protocol: 0
Endpoint: 0x1L
Type: 2
Max packet size: 64
Interval: 0
Endpoint: 0x81L
Type: 2
Max packet size: 64
Interval: 0
Device: 009
Device class: 0
Device sub class: 0
Device protocol: 0
Max packet size: 8
idVendor: 1133 (0x046d)
idProduct: 49236 (0xc054)
Device Version: 54.00
Configuration: 1
Total length: 34
selfPowered: 0
remoteWakeup: 1
maxPower: 196
Interface: 0
Alternate Setting: 0
Interface class: 3
Interface sub class: 1
Interface protocol: 2
Endpoint: 0x81L
Type: 3
Max packet size: 6
Interval: 10
Device: 001
Device class: 9
Device sub class: 0
Device protocol: 1
Max packet size: 64
idVendor: 1452 (0x05ac)
idProduct: 32774 (0x8006)
Device Version: 02.00
Configuration: 1
Total length: 27
selfPowered: 1
remoteWakeup: 1
maxPower: 0
Interface: 0
Alternate Setting: 0
Interface class: 9
Interface sub class: 0
Interface protocol: 1
Endpoint: 0x81L
Type: 3
Max packet size: 8
Interval: 9
Device: 002
Device class: 9
Device sub class: 0
Device protocol: 2
Max packet size: 64
idVendor: 1060 (0x0424)
idProduct: 9491 (0x2513)
Device Version: 0;.;3
Configuration: 1
Total length: 41
selfPowered: 1
remoteWakeup: 1
maxPower: 4
Interface: 0
Alternate Setting: 0
Interface class: 9
Interface sub class: 0
Interface protocol: 1
Endpoint: 0x81L
Type: 3
Max packet size: 1
Interval: 12
Alternate Setting: 1
Interface class: 9
Interface sub class: 0
Interface protocol: 2
Endpoint: 0x81L
Type: 3
Max packet size: 1
Interval: 12
Device: 003
Device class: 0
Device sub class: 0
Device protocol: 0
Max packet size: 8
idVendor: 1452 (0x05ac)
idProduct: 33346 (0x8242)
Device Version: 00.16
Configuration: 1
Total length: 34
selfPowered: 0
remoteWakeup: 1
maxPower: 200
Interface: 0
Alternate Setting: 0
Interface class: 3
Interface sub class: 0
Interface protocol: 0
Endpoint: 0x82L
Type: 3
Max packet size: 8
Interval: 10
Device: 004
Device class: 239
Device sub class: 2
Device protocol: 1
Max packet size: 64
idVendor: 2760 (0x0ac8)
idProduct: 13344 (0x3420)
Device Version: 01.00
Configuration: 1
Total length: 607
selfPowered: 0
remoteWakeup: 0
maxPower: 0
Interface: 0
Alternate Setting: 0
Interface class: 14
Interface sub class: 1
Interface protocol: 0
Endpoint: 0x81L
Type: 3
Max packet size: 10
Interval: 5
Interface: 1
Alternate Setting: 0
Interface class: 14
Interface sub class: 2
Interface protocol: 0
Alternate Setting: 1
Interface class: 14
Interface sub class: 2
Interface protocol: 0
Endpoint: 0x82L
Type: 1
Max packet size: 128
Interval: 1
Alternate Setting: 2
Interface class: 14
Interface sub class: 2
Interface protocol: 0
Endpoint: 0x82L
Type: 1
Max packet size: 512
Interval: 1
Alternate Setting: 3
Interface class: 14
Interface sub class: 2
Interface protocol: 0
Endpoint: 0x82L
Type: 1
Max packet size: 1024
Interval: 1
Alternate Setting: 4
Interface class: 14
Interface sub class: 2
Interface protocol: 0
Endpoint: 0x82L
Type: 1
Max packet size: 2816
Interval: 1
Alternate Setting: 5
Interface class: 14
Interface sub class: 2
Interface protocol: 0
Endpoint: 0x82L
Type: 1
Max packet size: 3072
Interval: 1
Alternate Setting: 6
Interface class: 14
Interface sub class: 2
Interface protocol: 0
Endpoint: 0x82L
Type: 1
Max packet size: 4992
Interval: 1
Alternate Setting: 7
Interface class: 14
Interface sub class: 2
Interface protocol: 0
Endpoint: 0x82L
Type: 1
Max packet size: 5120
Interval: 1
Interface: 2
Alternate Setting: 0
Interface class: 1
Interface sub class: 1
Interface protocol: 0
Interface: 3
Alternate Setting: 0
Interface class: 1
Interface sub class: 2
Interface protocol: 0
Alternate Setting: 1
Interface class: 1
Interface sub class: 2
Interface protocol: 0
Endpoint: 0x83L
Type: 1
Max packet size: 98
Interval: 4
--
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/
_______________________________________________
pyusb-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyusb-users