From: Steven P. <n9...@n9...> - 2003-12-10 03:41:46
|
I know this is probably too early on to be messing with, but I thought, what the heck.... I compiled and installed version 1.7 of libusb. I then installed/ran SWIG to generate the hooks for python, and then tried to run your usbscan.py script. First, the build steps for the libusb wrapper: PYTHONVER=python2.3 INCLUDEDIR=/System/Library/Frameworks/Python.framework/Versions/2.3/ include/$PYTHONVER swig -python -I/usr/local/include libusb.i gcc -Wall -O2 -bundle -undefined suppress -flat_namespace -I $INCLUDEDIR -I /usr/local/include -o _libusb.so libusb_wrap.c -L/usr/local/lib -lusb -framework Python SWIG builds out of the box on MacOS X 10.3. When I run usbscan.py, I get: usb_set_debug: Setting debugging level to 255 (on) usb_os_find_busses: Found 003 usb_os_find_busses: Found 003 usb_os_find_busses: Found 003 usb_os_find_busses: Found 002 usb_os_find_devices: Found 001 on 003 usb_os_find_devices: Found 002 on 003 usb_os_find_devices: Found 001 on 003 usb_os_find_devices: Found 001 on 003 usb_os_open: 05ac:8005 USB error: could not open device usb_os_open: 05ac:8005 USB error: could not open device usb_os_open: 1004:6000 USB error: could not open device usb_os_open: 05ac:8006 USB error: could not open device usb_os_find_devices: Found 001 on 003 usb_os_find_devices: Found 002 on 003 usb_os_find_devices: Found 001 on 003 usb_os_find_devices: Found 001 on 003 usb_os_open: 05ac:8005 USB error: could not open device usb_os_open: 05ac:8005 USB error: could not open device usb_os_open: 1004:6000 USB error: could not open device usb_os_open: 05ac:8006 USB error: could not open device usb_os_find_devices: Found 001 on 003 usb_os_find_devices: Found 002 on 003 usb_os_find_devices: Found 001 on 003 usb_os_find_devices: Found 001 on 003 usb_os_open: 05ac:8005 USB error: could not open device usb_os_open: 05ac:8005 USB error: could not open device usb_os_open: 1004:6000 USB error: could not open device usb_os_open: 05ac:8006 USB error: could not open device usb_os_find_devices: Found 002 on 002 usb_os_find_devices: Found 001 on 002 usb_os_open: 05ac:8005 USB error: could not open device usb_os_open: 05ac:8203 USB error: could not open device usb_os_open: 05ac:8006 USB error: could not open device usb_open(<C usb_device instance at _02848800_p_usb_device>)=None Traceback (most recent call last): File "usbscan.py", line 70, in ? res=usbscan() File "usbscan.py", line 28, in usbscan for device in bus.devices(): File "/Users/n9yty/my_cvs/bitpim/bitpim/native/usb/usb.py", line 43, in devices yield USBDevice(dev) File "/Users/n9yty/my_cvs/bitpim/bitpim/native/usb/usb.py", line 56, in __init__ raise USBException() native.usb.usb.USBException: could not open device I don't know if this helps at all, but this is the system view of the USB bus: USB: USB Bus: Vendor Name: Apple Computer, Inc. Product ID: 32773 ($8005) Speed: Up to 12 Mb/sec Bus Power (mA): 500 Bluetooth HCI: Speed: Up to 12 Mb/sec Product ID: 33283 ($8203) Bus Power (mA): 500 Vendor ID: 1452 USB Bus: Vendor Name: Apple Computer, Inc. Speed: Up to 12 Mb/sec Product ID: 32773 ($8005) Bus Power (mA): 500 USB Bus: Vendor Name: Apple Computer, Inc. Product ID: 32773 ($8005) Speed: Up to 12 Mb/sec Bus Power (mA): 500 Qualcomm CDMA Technologies MSM: Vendor Name: LG CDMA USB Modem Speed: Up to 12 Mb/sec Product ID: 24576 ($6000) Bus Power (mA): 500 USB High-Speed Bus: Vendor Name: Apple Computer, Inc. Speed: Up to 480 Mb/sec Product ID: 32774 ($8006) Bus Power (mA): 500 Again, if this is too early to be messing with, tell me to go away for now. ;-) -. ----. -.-- - -.-- Steve Palm - n9...@n9... -. ----. -.-- - -.-- |