A06; accessing the UARTs

Hello again.

devterm a06.
Take a look in /dev, there are multiple UARTs:

  • ttyACM0
  • ttyS1
  • ttyS2
  • ttyS3
  • ttyS4
  • ttyS5
  • ttyS6
  • ttyS7
    Multiple questions:
  1. How do I identify on schematic which uart is on which pins?
    (so far ttyACM0 is on the keyboard, and I think ttyS2 is the micro usb j7 on the ext board?)
  2. Which of these are already used for something in the system and which are free for me to use by accessing the GPIO pins?
  3. does any of the UARTs have not only TX and RX pins but also RTS and CTS?
    alternatively, can I configure any of the GPIO pins to be RTS and CTS?
    Unfortunately applications → settings → armbian config → system → dtc (device tree) only opens empty file editor.
    How do I read / understand / edit the device tree?
  4. ttyS1-7 give input-output errors when trying to read or write.
    ttyS2 additionally is only accessible by root.
    Why so? how to make work?
  5. Why the GPIO pins on mainboard on such unfriendly connector J3?
    what is the best way to access the pins?
  6. Isn’t it strange that a device with ‘term’ in its name does not have any serial port available from outside?
1 Like

ACM is a “dynamic” serial port only for USB based serial. (you can also see ttyUSB at time, depends on the driver used.

the ttySx should be real serial port, but they may not actually go to a real serial. output on the, there could be multiple reasons for that:

  • The rs232 hardware to actually exist, but the pin are not muxed on the SoC, so it goes nowhere
  • The driver just export more than the SoC actually support/have

And to answer your questions:
1 - you need to know the pin muxing in software to check which pin is connected to which block, from there you can find where these pin are connected on the schematic

2 - See question 1, but the BT is probably using at least one serial link.

3 - It is hardware dependant, but most of the time only TX/RX are exported, though
I would not recommend to edit/change the device tree unless you have a good knowledge of the hardware. And you can find a “live” version of the device tree in /proc/device-tree and you really want a .dts file, you can use dtc to generate from there:

dtc -I fs -O dts -o devterm.dst /proc/device-tree

but you can also find the .dtb files in /boot/dtb and just need to convert them into a dts file using a similar command:

dtc -I dtb -O dts -o devterm.dst /path/to/file.dtb

4 - the driver may export them, but they are probably not active so it does not allow to read/write from them, would have to look at the driver to know why.

5 - Because a 1/10" connector like a raspberry pi would take way too much space? There you just need another PCB with the same flex connector and you can take as much space as you want to put things on there. The flex used there seems pretty standard, I don’t see a problem with that, it is better than some board with alien connectors that you cannot buy easily.

6 - Well RS232 is a bit outdate (even if I know pretty well it is used a lot on things) and terminal does not necessarily mean “serial terminal”, you can use it with SSH and other network based way, and that’s still a “terminal”.