Re: [Pyusb-users] Simple pyUSB example...

2009-11-14 Thread Wander Lairson
> Hi all, > > If I eliminate the line: > > handle.setConfiguration(1) This is really weird, you could try your original code in Linux. > > I get an error:  USBError: usb_submit_async: invalid configuration 0 Yes, now I remember, libusb needs set_configuration call for internals data structures. So

Re: [Pyusb-users] Simple pyUSB example...

2009-11-14 Thread J.D. Main
Hi all, If I eliminate the line: handle.setConfiguration(1) I get an error: USBError: usb_submit_async: invalid configuration 0 So clearly a Configuration is needed. Not sure where to go from here. I'm wondering if I should just try to access LibUSB directly with Ctypes - that's what Py

Re: [Pyusb-users] Simple pyUSB example...

2009-11-14 Thread J.D. Main
Sorry for the long delay, but I have had hardworking in my main job... Strange this error... Try to not call setConfiguration. Maybe the underline hardware driver already called it, and calling it twice may be causing the peripheral hangs... Wander 2009/11/9 J.D. Main : > Hi - thanks for the tip.

Re: [Pyusb-users] Simple pyUSB example...

2009-11-09 Thread Wander Lairson
Sorry for the long delay, but I have had hardworking in my main job... Strange this error... Try to not call setConfiguration. Maybe the underline hardware driver already called it, and calling it twice may be causing the peripheral hangs... Wander 2009/11/9 J.D. Main : > Hi - thanks for the tip.

Re: [Pyusb-users] Simple pyUSB example...

2009-11-08 Thread J.D. Main
Hi - thanks for the tip. It doesn't work though. The line: handle.setConfiguration(1) causes the whole program to lock up. The code never gets past it. Any ideas about what's causing this? Best Regards, J.D. Try this: > handle = dev.open() > handle.setConfiguration(1) > handle.interruptW

Re: [Pyusb-users] Simple pyUSB example...

2009-11-04 Thread Phil Hannent
J.D. Main wrote: > Hi folks, > > I was hoping to get a little snippet of code to help me query a USB > temperature sensor with Python. I have installed libusb-win32 (v1.12.2) and > pyusb (v0.4.2). I can sucessfully enumerate the device. Here's what it > looks like: > > Device: \\.\libusb0-000

Re: [Pyusb-users] Simple pyUSB example...

2009-11-03 Thread Wander Lairson
Try this: > handle = dev.open() > handle.setConfiguration(1) > handle.interruptWrite(2,"hello world") But probably your device doesn't know what "hello world" means, some expect no side effect... Wander 2009/11/4 J.D. Main : > Hi folks, > > I was hoping to get a little snippet of code to help m

[Pyusb-users] Simple pyUSB example...

2009-11-03 Thread J.D. Main
Hi folks, I was hoping to get a little snippet of code to help me query a USB temperature sensor with Python. I have installed libusb-win32 (v1.12.2) and pyusb (v0.4.2). I can sucessfully enumerate the device. Here's what it looks like: Device: \\.\libusb0-0008--0x1dfd-0x0002 Device class