<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<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">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
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:part1.B85BA45F.21CF2B28@wanadoo.fr" alt=":-)"
class=""> 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
Bus 001 Device 010: ID 10C4:EA60
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor $10C4
idProduct $EA60
bcdDevice 1.00
iManufacturer 1 Silicon Labs
iProduct 2 CP2102N USB to UART Bridge Controller
iSerialNumber 3 0001
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes $80
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress $02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize $0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress $82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize $0040 1x 64 bytes
bInterval 0
E:\03_travail\libusb\pas-libusb_test_dll\src\examples>test3controlasync.exe
Submitting control transfer
Finished Transfer, Data = 38, Status = 0, ActualLength = 18
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor $10C4
idProduct $EA60
bcdDevice 1.00
iManufacturer 1
iProduct 2
iSerialNumber 3
bNumConfigurations 1
Done.
E:\03_travail\libusb\pas-libusb_test_dll\src\examples></pre>
</body>
</html>