On Mon, Apr 23, 2012 at 12:29 AM, Er. Jay Vora <jay.vora...@gmail.com> wrote:
> dev = usb.core.find(idVendor=0x0590, idProduct=0x0028)
>     if dev is None:
>         print "Device not found"
>     else:
>         print "Device found"
>         if dev.is_kernel_driver_active(0) is True:
>             dev.detach_kernel_driver(0)
>
>
>         print 'Now reading data'
>         #dev.attach_kernel_driver(0)
>
>         dev.set_configuration()
>     dev.reset()

Why do you do this? After reset, you may have
to search the device again. Remove this and try
again.

>         #dev.write(2,'Hello')
>     endpoint = dev[0][(0,0)][0]
>     print "EEEEEE",endpoint
>     #dev.write(1,'g')
>         dev.write(endpoint.bEndpointAddress,'VER00',0)
>
>         ret = dev.read(endpoint.bEndpointAddress, endpoint.wMaxPacketSize) #
> read(size,interface)
>

BTW, do you have access to the communication protocol?

-- 
Xiaofan

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to