1
0
mirror of https://github.com/mik3y/usb-serial-for-android synced 2025-06-28 18:26:19 +00:00

Updated Troubleshooting (mediawiki)

kai-morich 2021-01-10 17:28:33 +01:00
parent 6e6e411395
commit 29c20378d2

@ -38,6 +38,17 @@ Most Arduinos with CDC driver use the DTR line to determine serial channel readi
You don't. <code>/dev/tty*</code> is the Linux kernel's driver interface to various serial devices. Certain devices and custom ROMs ''may'' expose serial devices this way, but this library does not use this interface. You don't. <code>/dev/tty*</code> is the Linux kernel's driver interface to various serial devices. Certain devices and custom ROMs ''may'' expose serial devices this way, but this library does not use this interface.
== Can I open multiple connections in one application? ==
You can connect to multiple devices and to multiple ports of a multi-port device in one App.
* When connecting to different ports in a multi-port device, each connection needs it's own <code>UsbDeviceConnection</code>, else the first <code>close</code> will also close all other ports.
* When using <code>SerialInputOutputManager</code>, each has to run in it's own <code>Executor</code>.
* Distinguishing identical devices has some challenges:
** Use devices with different VIDs/PIDs or where they can be programmed like FTDI or CP210x .
** Use <code>UsbDevice.getSerialNumber()</code> and devices that come with a unique serial or where it can be programmed like FTDI or CP210x.<br>'''Note:''' Starting with Android 10, the serial number is only accessible after device access permission has been granted.
** Using <code>UsbDevice.getDeviceName()</code> or <code>UsbDevice.getDeviceId()</code> is not an option as the numbers increase when re-attaching a device.
== When reading a message, why don't all bytes arrive at the same time? == == When reading a message, why don't all bytes arrive at the same time? ==
The protocol layer does not guarantee that all bytes will arrive in a single message. In fact the protocol layer doesn't have any knowledge of what your "message" is — it is just an interface for sending a serial stream of bytes. The protocol layer does not guarantee that all bytes will arrive in a single message. In fact the protocol layer doesn't have any knowledge of what your "message" is — it is just an interface for sending a serial stream of bytes.