ttyAMA0 physically available
-
- Posts: 21
- Joined: 01 Apr 2020, 11:40
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?
/Mats-Olov Rustad
Application Developer
ASFT Industries AB
Application Developer
ASFT Industries AB
Re: ttyAMA0 physically available
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/
/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/
-
- Posts: 21
- Joined: 01 Apr 2020, 11:40
Re: ttyAMA0 physically available
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,
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,
/Mats-Olov Rustad
Application Developer
ASFT Industries AB
Application Developer
ASFT Industries AB
Re: ttyAMA0 physically available
Hi Mats-Olov,
- no, "/dev/ttyRS485" links to "/dev/ttyAMA0"ttyRS485 is a symbolic link to ttyUSB0
-
- Posts: 21
- Joined: 01 Apr 2020, 11:40
Re: ttyAMA0 physically available
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,
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,
/Mats-Olov Rustad
Application Developer
ASFT Industries AB
Application Developer
ASFT Industries AB
Re: ttyAMA0 physically available
Hi yes this is right.