[pyusb-users] ctrl_transfer problems about PYUSB

2015-12-06 Thread 442777816
Hi, In these days I am working on pyusb to establish a connection between my laptop(Windows 7) and one FX3 hardware. The first thing I must do is to download the firmware,but I met some problems.The downloading process is easy to describe,and I am sure about the .img data is writen to FX3 RA

Re: [pyusb-users] ctrl_transfer failed...

2014-05-21 Thread Wander Lairson Costa
2014-05-21 14:08 GMT-03:00 Slavko Kocjancic : > On 05/21/2014 05:27 PM, Wander Lairson Costa wrote: >> 2014-05-21 3:00 GMT-03:00 Slavko Kocjancic : >>> On 05/21/2014 03:36 AM, Wander Lairson Costa wrote: 2014-05-20 13:26 GMT-03:00 Slavko Kocjancic : > Hello... > > I'm new to python

Re: [pyusb-users] ctrl_transfer failed...

2014-05-21 Thread Slavko Kocjancic
On 05/21/2014 05:27 PM, Wander Lairson Costa wrote: > 2014-05-21 3:00 GMT-03:00 Slavko Kocjancic : >> On 05/21/2014 03:36 AM, Wander Lairson Costa wrote: >>> 2014-05-20 13:26 GMT-03:00 Slavko Kocjancic : Hello... I'm new to python (and pyusb). I try to port some VUSB device to w

Re: [pyusb-users] ctrl_transfer failed...

2014-05-21 Thread Wander Lairson Costa
2014-05-21 3:00 GMT-03:00 Slavko Kocjancic : > On 05/21/2014 03:36 AM, Wander Lairson Costa wrote: >> 2014-05-20 13:26 GMT-03:00 Slavko Kocjancic : >>> Hello... >>> >>> I'm new to python (and pyusb). >>> I try to port some VUSB device to work with python, but get at trouble >>> in beggining. I can'

Re: [pyusb-users] ctrl_transfer failed...

2014-05-20 Thread Slavko Kocjancic
On 05/21/2014 03:36 AM, Wander Lairson Costa wrote: > 2014-05-20 13:26 GMT-03:00 Slavko Kocjancic : >> Hello... >> >> I'm new to python (and pyusb). >> I try to port some VUSB device to work with python, but get at trouble >> in beggining. I can't send bytes... >> here is my example (stripped from

Re: [pyusb-users] ctrl_transfer failed...

2014-05-20 Thread Wander Lairson Costa
2014-05-20 13:26 GMT-03:00 Slavko Kocjancic : > Hello... > > I'm new to python (and pyusb). > I try to port some VUSB device to work with python, but get at trouble > in beggining. I can't send bytes... > here is my example (stripped from manual...) > > import usb.core > import usb.util > > from ar

[pyusb-users] ctrl_transfer failed...

2014-05-20 Thread Slavko Kocjancic
Hello... I'm new to python (and pyusb). I try to port some VUSB device to work with python, but get at trouble in beggining. I can't send bytes... here is my example (stripped from manual...) import usb.core import usb.util from array import * dev = usb.core.find(idVendor=0x16c0, idProduct=0x05

Re: [pyusb-users] ctrl_transfer: Example is not working

2012-10-03 Thread Stefano Di Martino
You are right: Kindle is recognized as a simple mass-storage device. I have the kindle touch to experiment with, but actually I need to communicate with the Atmel STK 600 with Atxmega 32A4U. I've found a simple example from Atmel and they offer a dll with 4-5 function which are really simple. So

Re: [pyusb-users] ctrl_transfer: Example is not working

2012-10-02 Thread Tormod Volden
On Mon, Oct 1, 2012 at 1:49 PM, Stefano Di Martino wrote: > Sorry, I miss the forest for the trees. I'm new to USB programming, python > and the pyUSB lib. > I think, my problem was, that I was testing with my kindle and I didn't get > it so far, that every device has its own vendor requests. > D

Re: [pyusb-users] ctrl_transfer: Example is not working

2012-10-02 Thread Xiaofan Chen
On Mon, Oct 1, 2012 at 7:49 PM, Stefano Di Martino wrote: > Sorry, I miss the forest for the trees. I'm new to USB programming, > python and the pyUSB lib. > I think, my problem was, that I was testing with my kindle and I didn't > get it so far, that every device has its own vendor requests. > Do

Re: [pyusb-users] ctrl_transfer: Example is not working

2012-10-01 Thread Stefano Di Martino
b-users@lists.sourceforge.net > Betreff: Re: [pyusb-users] ctrl_transfer: Example is not working > 2012/10/1 Stefano Di Martino : > > Hi Tormod, > > ok thanks for your reply! > > Can I assume, that the address 0x40 is custom, too? > > > > If I use following code, &g

Re: [pyusb-users] ctrl_transfer: Example is not working

2012-10-01 Thread Wander Lairson Costa
2012/10/1 Stefano Di Martino : > Hi Tormod, > ok thanks for your reply! > Can I assume, that the address 0x40 is custom, too? > > If I use following code, > > assert dev.ctrl_transfer(0x40, usb.util.CTRL_OUT, 0, 0, msg) == len(msg) > ret = dev.ctrl_transfer(0x40, usb.util.CTRL_IN, 0, 0, len(msg)) >

Re: [pyusb-users] ctrl_transfer: Example is not working

2012-10-01 Thread Stefano Di Martino
win error: The parameter is incorrect." Do you know what's wrong? Regards Stefano Original-Nachricht > Datum: Mon, 1 Oct 2012 13:09:35 +0200 > Von: Tormod Volden > An: pyusb-users@lists.sourceforge.net > Betreff: Re: [pyusb-users] ctrl_transfer: Example is no

Re: [pyusb-users] ctrl_transfer: Example is not working

2012-10-01 Thread Tormod Volden
On Mon, Oct 1, 2012 at 9:27 AM, Stefano Di Martino wrote: > Hi everyone, > I'm testing PyUSB right now and tried this example: > msg = 'test' assert dev.ctrl_transfer(0x40, CTRL_LOOPBACK_WRITE, 0, 0, msg) == len(msg) ret = dev.ctrl_transfer(0x40, CTRL_LOOPBACK_READ, 0, 0, len(msg)) >

[pyusb-users] ctrl_transfer: Example is not working

2012-10-01 Thread Stefano Di Martino
Hi everyone, I'm testing PyUSB right now and tried this example: >>> msg = 'test' >>> assert dev.ctrl_transfer(0x40, CTRL_LOOPBACK_WRITE, 0, 0, msg) == len(msg) >>> ret = dev.ctrl_transfer(0x40, CTRL_LOOPBACK_READ, 0, 0, len(msg)) >>> sret = ''.join([chr(x) for x in ret]) >>> assert sret == msg T

Re: [pyusb-users] ctrl_transfer

2011-11-17 Thread Wander Lairson Costa
2011/11/17 Eric Hewett : > Thanks for reply: > I am trying to write to it. Sorry - there was an error in the snip-it I > posted. > I believe ctrl_transfer is defined as: > ctrl_transfer(RequestType, Request, Value, Index, Length, Timeout) > Corrected code > msg='\x00\x01\x01\x01\x00\x01' > dev.ctrl

Re: [pyusb-users] ctrl_transfer

2011-11-17 Thread Eric Hewett
Thanks for reply: I am trying to write to it. Sorry - there was an error in the snip-it I posted. I believe ctrl_transfer is defined as: ctrl_transfer(RequestType, Request, Value, Index, Length, Timeout) Corrected code msg='\x00\x01\x01\x01\x00\x01' dev.ctrl_transfer(0x40, 0x03, msg, 0, len(msg)

Re: [pyusb-users] ctrl_transfer

2011-11-17 Thread Wander Lairson Costa
2011/11/17 Eric Hewett : > 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

[pyusb-users] ctrl_transfer

2011-11-17 Thread Eric Hewett
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 s