Re: [pyusb-users] Device writing timeout problem

2013-02-22 Thread Tony Liu
Hi, I look back to the tutorial and I write the programme to get the endpoint instances, one is in and another is out. ep_in = usb.util.find_descriptor( intf, custom_match = \ lambda e: \ usb.util.endpoint_direction(e.bEndpointAddress) == \ usb.util.ENDPOINT_IN

Re: [pyusb-users] Device writing timeout problem

2013-02-21 Thread Wander Lairson Costa
2013/2/21 Tony Liu : > Yes I put it after the find() function. > Do I need add other configuration functions? > I mean, the set_configuration method from Device class. Please, refer to the tutorial if you are in doubt. -- Best Regards, Wander Lairson Costa --

Re: [pyusb-users] Device writing timeout problem

2013-02-21 Thread Tony Liu
Yes I put it after the find() function. Do I need add other configuration functions? Cheers, Tony On 22 Feb 2013, at 00:29, Wander Lairson Costa wrote: > 2013/2/21 Tony Liu : >> Hi all, >> >> I'm new to PyUSB, and now i'm working on communicating with a costumed chip. >> The chip use two endpo

Re: [pyusb-users] Device writing timeout problem

2013-02-21 Thread Wander Lairson Costa
2013/2/21 Tony Liu : > Hi all, > > I'm new to PyUSB, and now i'm working on communicating with a costumed chip. > The chip use two endpoint and one is use for in and another for out, and the > manufacturer told me just to send raw date to it with different value of > command. > > When I try this: >

[pyusb-users] Device writing timeout problem

2013-02-21 Thread Tony Liu
Hi all, I'm new to PyUSB, and now i'm working on communicating with a costumed chip. The chip use two endpoint and one is use for in and another for out, and the manufacturer told me just to send raw date to it with different value of command. When I try this: buf = struct.pack("b",2) buf1 = st