Discussion:
[pyusb-users] Trying to write to OUT EP Bulk on Win10
Igor Bezenchuk
2016-03-08 15:32:53 UTC
Permalink
I am Interested in generating random bulk traffic with libusb and pyusb to different bulk devices(i.e Flash drives etc...) ep buffers and check data integrity.I used this code:import usb.core# I used Gensys usb to sd card readerdev = usb.core.find(idVendor=0x05E3 , idProduct=0x0746)if dev is None: raise ValueError('Device not found')for cfg in dev: for i in cfg: for e in i: print e.bmAttributes print e.bEndpointAddress print "" #if you find OUT EP if(e.bEndpointAddress == 2): e.write(0x00) e.write(0x01) and I got this error:"raise NotImplementedError(_strerror(ret))NotImplementedError: Operation not supported or unimplemented on this platform"pyusb does enumerate device and it's endpoints correctly but it fails to write to them.as I saw in other posts this issue is well known in windows, my question is there any way to go around this to write to device's EP in Windows without installing custom driver with Zadig?
Igor Bezenchuk
2016-03-08 14:33:08 UTC
Permalink
I am Interested in generating random bulk traffic with libusb and pyusb through different bulk devices(i.e Flash drives etc...). I used this code:
import usb.core# I used Gensys usb to sd card readerdev = usb.core.find(idVendor=0x05E3 , idProduct=0x0746)if dev is None: raise ValueError('Device not found')for cfg in dev: for i in cfg: for e in i: print e.bmAttributes print e.bEndpointAddress print "" #if you find OUT EP if(e.bEndpointAddress == 2): e.write(0x00) e.write(0x01)

and I got this error:"raise NotImplementedError(_strerror(ret))NotImplementedError: Operation not supported or unimplemented on this platform"
pyusb does enumerate device and it's endpoints correctly but it fails to write to them.as I saw in other posts this issue is well known in windows, my question is there any way to go around this to write to device's EP in Windows without installing custom driver with Zadig?
Xiaofan Chen
2016-03-09 02:46:45 UTC
Permalink
On Tue, Mar 8, 2016 at 10:33 PM, Igor Bezenchuk <***@hotmail.com> wrote:
> I am Interested in generating random bulk traffic with libusb and pyusb
> through different bulk devices(i.e Flash drives etc...).
>
> pyusb does enumerate device and it's endpoints correctly but it fails to
> write to them.
> as I saw in other posts this issue is well known in windows, my question is
> there any way to go around this to write to device's EP in Windows without
> installing custom driver with Zadig?
>

No way under Windows. There is no generic USB driver attaching to
all USB device.


--
Xiaofan
Igor Bezenchuk
2016-03-09 07:13:51 UTC
Permalink
I read at libusb maling list about usbdk which, from its description, should allow to attach and detach device drivers under windows. Did you hear about it? can it be combined with pyusb?

> Date: Wed, 9 Mar 2016 10:46:45 +0800
> From: ***@gmail.com
> To: pyusb-***@lists.sourceforge.net
> Subject: Re: [pyusb-users] Trying to write to OUT EP Bulk on Win10
>
> On Tue, Mar 8, 2016 at 10:33 PM, Igor Bezenchuk <***@hotmail.com> wrote:
> > I am Interested in generating random bulk traffic with libusb and pyusb
> > through different bulk devices(i.e Flash drives etc...).
> >
> > pyusb does enumerate device and it's endpoints correctly but it fails to
> > write to them.
> > as I saw in other posts this issue is well known in windows, my question is
> > there any way to go around this to write to device's EP in Windows without
> > installing custom driver with Zadig?
> >
>
> No way under Windows. There is no generic USB driver attaching to
> all USB device.
>
>
> --
> Xiaofan
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
> _______________________________________________
> pyusb-users mailing list
> pyusb-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
Xiaofan Chen
2016-03-09 08:59:58 UTC
Permalink
On Wed, Mar 9, 2016 at 3:13 PM, Igor Bezenchuk <***@hotmail.com> wrote:
> I read at libusb maling list about usbdk which, from its description, should
> allow to attach and detach device drivers under windows. Did you hear about
> it? can it be combined with pyusb?

Yes. It should be okay to work with pyusb.

On the other hand, you need to install usbdk on the computer. There is
no Inbox Windows driver which can do the things you want. And I consider
usbdk to be a custom driver as well.

--
Xiaofan
Xiaofan Chen
2016-03-11 01:30:26 UTC
Permalink
On Wed, Mar 9, 2016 at 4:59 PM, Xiaofan Chen <***@gmail.com> wrote:
> On Wed, Mar 9, 2016 at 3:13 PM, Igor Bezenchuk <***@hotmail.com> wrote:
>> I read at libusb maling list about usbdk which, from its description, should
>> allow to attach and detach device drivers under windows. Did you hear about
>> it? can it be combined with pyusb?
>
> Yes. It should be okay to work with pyusb.
>
> On the other hand, you need to install usbdk on the computer. There is
> no Inbox Windows driver which can do the things you want. And I consider
> usbdk to be a custom driver as well.
>

Further discussion here.
http://libusb.6.n5.nabble.com/libusb-Write-to-OUT-EP-bulk-device-random-Bulk-data-on-Windows-td5715683.html


--
Xiaofan
Wander Lairson Costa
2016-03-08 19:42:26 UTC
Permalink
Hi,

I think you may find the answer for your question in libusb mailing list.

2016-03-08 7:32 GMT-08:00 Igor Bezenchuk <***@hotmail.com>:

> I am Interested in generating random bulk traffic with libusb and pyusb to
> different bulk devices(i.e Flash drives etc...) ep buffers and check data
> integrity.
> I used this code:
>
> import usb.core
> # I used Gensys usb to sd card reader
> dev = usb.core.find(idVendor=0x05E3 , idProduct=0x0746)
> if dev is None:
> raise ValueError('Device not found')
> for cfg in dev:
> for i in cfg:
> for e in i:
> print e.bmAttributes
> print e.bEndpointAddress
> print ""
> #if you find OUT EP
> if(e.bEndpointAddress == 2):
> e.write(0x00)
> e.write(0x01)
>
>
> and I got this error:
> "raise NotImplementedError(_strerror(ret))
> NotImplementedError: Operation not supported or unimplemented on this
> platform"
>
> pyusb does enumerate device and it's endpoints correctly but it fails to
> write to them.
> as I saw in other posts this issue is well known in windows, my question
> is there any way to go around this to write to device's EP in Windows
> without installing custom driver with Zadig?
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://makebettercode.com/inteldaal-eval
> _______________________________________________
> pyusb-users mailing list
> pyusb-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
>


--
Best Regards,
Wander Lairson Costa
Loading...