• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
USB-UART, which port is which?
#1
Hi, I am working with getting some UART code running on the Alchitry AU and realized I had a question. Which of the two /dev/ttyUSB? ports is which. In the schematic JTAG seems to be port A and UART on port B, but would that necessarily give the expected result of /dev/ttyUSB0 is the JTAG and /dev/ttyUSB1?

PySerial just labels them both "Alchitry - Au"

Code:
>>> from serial.tools import list_ports
>>> for element in list_ports.comports(): print(element)
...
/dev/ttyUSB1 - Alchitry Au - Alchitry Au
/dev/ttyUSB0 - Alchitry Au - Alchitry Au
>>>


I suspect it's arbitrary which is which, just whichever the kernel saw first, but I was wondering if anyone had an easy way to read them and be sure.
  Reply
#2
It is likely ttyUSB1. As you've already noted, it is port B which is the UART which I believe should enumerate second.
  Reply
#3
That makes some sense. I don't know enough about USB to understand how the handshake works. I figured it was whichever the kernel sees first, but if the chip enumerates things to the kernel in the same order as its output ports, what you say makes sense.

Thanks!
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)