On Wed, Jan 5, 2011 at 9:30 PM, Xiaofan Chen <xiaof...@gmail.com> wrote:
> Plain Python 2.6 Windows works fine.
>

Here is a run log under Windows 7 32bit. The firmware used
is Jan Axelson's Generic HID example. The firmware
loops back the HID input and output report.

D:\work\pyusb\pyusb>d:\Python26\python.exe
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import usb.core
>>> import usb.util
>>> dev = usb.core.find(idVendor=0x0925, idProduct=0x7001)
>>> dev.set_configuration()
>>> dev.write(1,'01',0)
3
>>> ret=dev.read(0x81,2,0,1000)
>>> sret=''.join([chr(x) for x in ret])
>>> sret
'01'

>>> dev.write(1,'ab',0)
3
>>> ret=dev.read(0x81,2,0,1000)
>>> sret=''.join([chr(x) for x in ret])
>>> sret
'ab'
>>>




-- 
Xiaofan

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to