<html dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body style="text-align:left; direction:ltr;"><div>Hi!</div><div><br></div><div>Am Dienstag, den 06.08.2019, 01:35 +0200 schrieb Jean SUZINEAU:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
<div class="moz-cite-prefix">Hello</div>
<div class="moz-cite-prefix">I haven't had time yet to read
everything but I join below a few more tests.<br>
</div>
<div class="moz-cite-prefix">Le 05/08/2019 à 21:38, Johann Glaser a
écrit :<br>
</div>
<blockquote type="cite" cite="mid:7d18f5340f01f2abecb1c251a0ffed4f4fdc22e2.camel@gmx.at" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
Yay! That looks great!
<div><br>
</div>
<div>As a next step you can try <font size="3" face="monospace">test2controlsync.pas</font>
which uses control transfers to query the device descriptors.
Just change the constants <font size="3" face="monospace">DevVID</font>
and <font size="3" face="monospace">DevPID</font> at the top to
the values of a device connected to your PC. I'd recommend to
use a device you don't depend on during testing, i.e., don't use
your primary keyboard and mouse. <img src="cid:df816b14da1e5ccc2025cde4a3de6ecb53d06d5e.camel@gmx.at" alt=":-)" class="" data-inline="" data-name="face-smile.png"> There shouldn't be a problem, but better safe than
sorry. And I hope that Windows doesn't cross your plans and
already has allocated that device to a certain driver.</div>
<div><br>
</div>
<div>You can also try <font size="3" face="monospace">test3controlasync.pas</font>,
which does a very similar test, just using the asynchronous
interface to libusb (and it is less verbose and estensive).</div>
<div><br>
</div>
</blockquote>
<p>I tested successfully test2controlsync and test3controlasync on
Windows 10 and Ubuntu 19.04 with a Seeeduino lotus (recognized as
manufacturer Silicon Labs, Product CP2102N USB to UART Bridge
Controller).</p>
<p>I've zipped the code in a new "convenience release" at :<br>
</p>
<p><a class="moz-txt-link-freetext" href="https://github.com/jsuzineau/pascal_o_r_mapping/releases/tag/pas-libusb_convenience_release_2">https://github.com/jsuzineau/pascal_o_r_mapping/releases/tag/pas-libusb_convenience_release_2</a></p>
<p>This is the output on Windows:</p>
<pre>E:\03_travail\libusb\pas-libusb_test_dll\src\examples>test2controlsync.exe</pre><pre>Bus 001 Device 010: ID 10C4:EA60</pre><pre>Device Descriptor:</pre><pre> bLength 18</pre><pre> bDescriptorType 1</pre><pre> bcdUSB 2.00</pre><pre> bDeviceClass 0</pre><pre> bDeviceSubClass 0</pre><pre> bDeviceProtocol 0</pre><pre> bMaxPacketSize0 64</pre><pre> idVendor $10C4</pre><pre> idProduct $EA60</pre><pre> bcdDevice 1.00</pre><pre> iManufacturer 1 Silicon Labs</pre><pre> iProduct 2 CP2102N USB to UART Bridge Controller</pre><pre> iSerialNumber 3 0001</pre><pre> bNumConfigurations 1</pre><pre> Configuration Descriptor:</pre><pre> bLength 9</pre><pre> bDescriptorType 2</pre><pre> wTotalLength 32</pre><pre> bNumInterfaces 1</pre><pre> bConfigurationValue 1</pre><pre> iConfiguration 0</pre><pre> bmAttributes $80</pre><pre> MaxPower 100mA</pre><pre> Interface Descriptor:</pre><pre> bLength 9</pre><pre> bDescriptorType 4</pre><pre> bInterfaceNumber 0</pre><pre> bAlternateSetting 0</pre><pre> bNumEndpoints 2</pre><pre> bInterfaceClass 255</pre><pre> bInterfaceSubClass 0</pre><pre> bInterfaceProtocol 0</pre><pre> iInterface 0</pre><pre> Endpoint Descriptor:</pre><pre> bLength 7</pre><pre> bDescriptorType 5</pre><pre> bEndpointAddress $02 EP 2 OUT</pre><pre> bmAttributes 2</pre><pre> Transfer Type Bulk</pre><pre> Synch Type None</pre><pre> Usage Type Data</pre><pre> wMaxPacketSize $0040 1x 64 bytes</pre><pre> bInterval 0</pre><pre> Endpoint Descriptor:</pre><pre> bLength 7</pre><pre> bDescriptorType 5</pre><pre> bEndpointAddress $82 EP 2 IN</pre><pre> bmAttributes 2</pre><pre> Transfer Type Bulk</pre><pre> Synch Type None</pre><pre> Usage Type Data</pre><pre> wMaxPacketSize $0040 1x 64 bytes</pre><pre> bInterval 0</pre><pre><br></pre><pre>E:\03_travail\libusb\pas-libusb_test_dll\src\examples>test3controlasync.exe</pre><pre>Submitting control transfer</pre><pre>Finished Transfer, Data = 38, Status = 0, ActualLength = 18</pre><pre>Device Descriptor:</pre><pre> bLength 18</pre><pre> bDescriptorType 1</pre><pre> bcdUSB 2.00</pre><pre> bDeviceClass 0</pre><pre> bDeviceSubClass 0</pre><pre> bDeviceProtocol 0</pre><pre> bMaxPacketSize0 64</pre><pre> idVendor $10C4</pre><pre> idProduct $EA60</pre><pre> bcdDevice 1.00</pre><pre> iManufacturer 1</pre><pre> iProduct 2</pre><pre> iSerialNumber 3</pre><pre> bNumConfigurations 1</pre><pre>Done.</pre><pre><br></pre><pre>E:\03_travail\libusb\pas-libusb_test_dll\src\examples></pre>
</blockquote><pre><br></pre><pre>Thats great, it works! Then have fun with all further experiments. If you need help, just ping me.</pre><pre><br></pre><pre>Bye</pre><pre> Hansi</pre><pre><br></pre><pre><br></pre></body></html>