Page 1 of 1

ttyAMA0 physically available

Posted: 21 Jan 2021, 23:12
by mats-olov_rustad
Is the builtin serial port represented by the device file /dev/ttyAMA0 physically available as an rS232 port? I.e. can I connect a 3,3V to RS232 level converter somewhere on the Connect+ and have a serial port available as a console or a service port for our background service?

Re: ttyAMA0 physically available

Posted: 22 Jan 2021, 15:22
by dirk
Hi mats-olov_rustad, the RevPi Connect/+ has a RS485 interface which uses 5 volts.
/dev/ttyRS485 is a symbolic link to /dev/ttyAMA0 /dev/ttyUSB0

Have a look at the shop article USB - RS485 Converter:
https://revolution.kunbus.de/shop/en/us ... -konverter

Hava a look at the schematics here:
https://revolution.kunbus.com/tutorials/downloads/

Re: ttyAMA0 physically available

Posted: 26 Jan 2021, 12:24
by mats-olov_rustad
My company has two Connect+ 32 GB modules when we coldstart (i.e. powers them on) there are 2 symbolic links in the /dev directory. ttyConBridge is usually a symbolic link to ttyUSB1 and ttyRS485 is usually a symbolic link to ttyUSB0. An terxtal USB-RS232-adapter or an external USB-RS485-adapter are usually represented by ttyUSB2, ttyUSB3 and so on. The output from ls -l shows that ttyUSB0, ttyUSB1, ttyUSB2 and ttyAMA0 all are character devices.

Our application is configured to use ttyRS485 for one type of sensor and ttyUSB2 for another type. That usually works as we intended.

ttyConBridge and ttyRS485 are both shown as links. All other tty* device files are shown as character devices.

What is funny is the configuring ttyUSB0 in our application doesn't work while configuring ttyRS485 does work even when ttyRS485 is a symbolic link to ttyUSB0. That makes no sense to me. Both device files should result in our application getting a file descriptor to the same device.

With regards,

Re: ttyAMA0 physically available

Posted: 26 Jan 2021, 15:15
by dirk
Hi Mats-Olov,
ttyRS485 is a symbolic link to ttyUSB0
- no, "/dev/ttyRS485" links to "/dev/ttyAMA0" ;)

Re: ttyAMA0 physically available

Posted: 26 Jan 2021, 22:33
by mats-olov_rustad
This is the output from the command ls -l /dev/ttyRS485:
lrwxrwxrwx 1 root root 7 jan 26 16:03 /dev/ttyRS485 -> ttyUSB0

Does this not mean that /dev/ttyRS485 is a symbolic link to /dev/ttyUSB0?

With regards,

Re: ttyAMA0 physically available

Posted: 12 Mar 2021, 15:39
by dirk
Hi yes this is right.