Re: Reg:writepipe failed with error 87
anshu panwar <[email protected]> Wed, 22 Jul 2020 20:41:48 +0530
| Newsgroups | gmane.comp.lib.libusb.devel.windows |
|---|---|
| Message-ID | <CAHfr9U0fezu3DnMO5_JHjX8rev6oK1NCcrgCCj-COWHEqDcLwA@mail.gmail.com> |
--===============4530368461007992556==
Content-Type: multipart/alternative; boundary="00000000000050a27d05ab0929a7"
--00000000000050a27d05ab0929a7
Content-Type: text/plain; charset="UTF-8"
Hi Team,
Thanks for the reply.
I have followed this link
https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/winusb-installation
to make my device as winusb without installing a custom driver.
After doing the above step my device(scanner device) is working as a winusb
device and also i have downloaded libusbK-3.0.7.0-setup to work with this
device.
I have followed the steps below:
1-LstK_Init
2-LstK_Count
3-LstK_FindByVidPid
4-!LibK_LoadDriverAPI(Usb, deviceInfo->DriverID)
KUSB_DRVID_WINUSB:
printf("WinUSB driver api loaded!\n");
5-!Usb.Init(usbHandle, deviceInfo)
6-!Usb.QueryInterfaceSettings(usbHandle, 0x0, &interfaceInfo)
7-Usb.QueryPipe(usbHandle, (UCHAR)ALT_SETTING_NUMBER, (UCHAR)iEndpoint,
&pipeInfo);
ALT_SETTING_NUMBER =0x01(i want to work with bulk pipe)
8-Usb.WritePipe(usbHandle, 0x01, cmdBuffer, sizeof(cmdBuffer),
(PUINT)&lengthTransferred, NULL);
BYTE cmdBuffer[8+1] = {0x00,0x00,0x00, 0x01};
till the 7 steps everything is successfully done but writepipe is not
working .
Is these steps are enough to understand or i should forward all the code
which I am using currently.
Please update me about this.
Thanks,
Anshul
On Wed, Jul 22, 2020 at 7:47 PM Xiaofan Chen <[email protected]> wrote:
> Please provide more details, what is the device? OS version? And provide
> the minimum code snippets to cause the error.
>
> -
> Xiaofan
>
> On Wed, Jul 22, 2020, 6:15 PM anshu panwar <[email protected]> wrote:
>
>> Hi Team,
>> I am facing issues in writepipe/readpipe after successfully open the
>> device handle.
>> Currently 87 error is return from writepipe using libusbk lib for winusb
>> device.
>>
>> Thanks,
>> Anshul
>> _______________________________________________
>> Libusb-win32-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>>
> _______________________________________________
> Libusb-win32-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>
--00000000000050a27d05ab0929a7
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hi Team,<div>Thanks for the reply.</div><div>I have follow=
ed this link <a href=3D"https://docs.microsoft.com/en-us/windows-hardware/d=
rivers/usbcon/winusb-installation">https://docs.microsoft.com/en-us/windows=
-hardware/drivers/usbcon/winusb-installation</a> to make my device as winus=
b without installing a custom driver. <br>After doing the above step my dev=
ice(scanner device) is working as a winusb device and also i have downloade=
d libusbK-3.0.7.0-setup to work with this device.<br><br>I have followed th=
e steps below:<br>1-LstK_Init<br>2-LstK_Count<br>3-LstK_FindByVidPid<br>4-!=
LibK_LoadDriverAPI(Usb, deviceInfo->DriverID)<br> KUSB_DRVID_WINUSB:<br=
> printf("WinUSB driver api loaded!\n");<br>5-!Usb.Init(usbHandl=
e, deviceInfo)<br>6-!Usb.QueryInterfaceSettings(usbHandle, 0x0, &interf=
aceInfo)<br>7-Usb.QueryPipe(usbHandle, (UCHAR)ALT_SETTING_NUMBER, (UCHAR)iE=
ndpoint, &pipeInfo);<br>ALT_SETTING_NUMBER =3D0x01(i want to work with =
bulk pipe)<br>8-Usb.WritePipe(usbHandle, 0x01, cmdBuffer, sizeof(cmdBuffer)=
, (PUINT)&lengthTransferred, NULL);</div><div>BYTE cmdBuffer[8+1] =3D {=
0x00,0x00,0x00, 0x01};</div><div><br>till the 7 steps everything is success=
fully done but writepipe is not working .<br><br>Is these steps are enough =
to understand or i should forward all the code which I am using currently.<=
br>Please update me about this.<br><br>Thanks,<br>Anshul<br></div></div><br=
><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, J=
ul 22, 2020 at 7:47 PM Xiaofan Chen <<a href=3D"mailto:[email protected]=
m">[email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,20=
4);padding-left:1ex"><div dir=3D"auto"><div>Please provide more details, wh=
at is the device? OS version? And provide the minimum code snippets to caus=
e the error.=C2=A0</div><div dir=3D"auto"><br></div><div dir=3D"auto">-</di=
v><div dir=3D"auto">Xiaofan</div><div dir=3D"auto"><br><div class=3D"gmail_=
quote" dir=3D"auto"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Jul 22, 2=
020, 6:15 PM anshu panwar <<a href=3D"mailto:[email protected]" tar=
get=3D"_blank">[email protected]</a>> wrote:<br></div><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px soli=
d rgb(204,204,204);padding-left:1ex"><div dir=3D"auto">Hi Team,<div dir=3D"=
auto">I am facing issues in writepipe/readpipe after successfully open the =
device handle.</div><div dir=3D"auto">Currently 87 error is return from wri=
tepipe using libusbk lib for winusb device.</div><div dir=3D"auto"><br></di=
v><div dir=3D"auto">Thanks,</div><div dir=3D"auto">Anshul</div></div>
_______________________________________________<br>
Libusb-win32-devel mailing list<br>
<a href=3D"mailto:[email protected]" rel=3D"noreferr=
er" target=3D"_blank">[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel"=
rel=3D"noreferrer noreferrer" target=3D"_blank">https://lists.sourceforge.=
net/lists/listinfo/libusb-win32-devel</a><br>
</blockquote></div></div></div>
_______________________________________________<br>
Libusb-win32-devel mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blan=
k">[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel"=
rel=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/l=
istinfo/libusb-win32-devel</a><br>
</blockquote></div>
--00000000000050a27d05ab0929a7--
--===============4530368461007992556==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============4530368461007992556==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Libusb-win32-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
--===============4530368461007992556==--