2011/11/17 Eric Hewett <eric.hew...@gmail.com>:
> Hi,
> I have been working with a Toradex Oak 4-20mA sensor. Using PYUSB I can read
> from this device, but I would like to write to it such that I can identify
> an individual sensor by flashing the LED or modifying its name. I am running
> on Ubuntu 10.10 with Python 2.6.6 with PyUSB1.0
>
> I believe the sensor has one normal endpoint plus the control endpoint???
> I am using
> dev.ctrl_transfer(0x40, 0x03, 0,0, 0x12)

It seems you are trying to write to the device here, so if you should
provide the data buffer in the last parameter. If you intend to write
the byte 0x12 to the device, you should do so:

dev.ctrl_transfer(0x40, 0x03, 0,0, [0x12])

> I get a variety of errrors in response but primarily:
> TypeError object is not iteratable - _interop.py Line 134
> with slight modifications the following errors:
> Unhandled AttributeError - module has no attribute  backend     libusb10.py
> Line 408
> Argument 4 TypeError wrongtype libusb10.py Line 548
> Any help and guidance appreciated
> regards
> Eric Hewett
>



-- 
Best Regards,
Wander Lairson Costa
https://github.com/walac
https://gitorious.org/~walac

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to