Use additional UART port from Pi4

I’m able to use ttyS1 for the kernel serial console but I want to use an additional UART port to communicate with a device from the Pi4 but none of the tty[S]x devices seem to transmit or receive anything, how do I use an additional serial port from the Pi without making it a console?

You need to do it programatically. Like in C, you can use POSIX API; you use open to the UART device path, call read and write to perform communication, and finally call close. I think Manjaro ARM already provides the necessary POSIX lib and header out-of-the-box.

I’m using Putty to transmit on the UART pins and using an oscilloscope to test the output I get a constant 3.3v and no data is transmitted, I tried all the UART pins and several dev/tty outputs but I get nothing.

Putty is for client remote connection protocol, I don’t know if it can be used over /dev/tty.

Putty transmits on ttyS1 which is the configured console port but none of the others.
By that I mean I get an output on pin 8 of the GPIO when pressing keys in Putty.

I don’t know much about Putty for this.

I can only give advice that it’s always possible to use C POSIX API to communicate with any /dev devices.

Ignoring putty, is there anything that would prevent me from using UART ports other than the one on GPIO 14,15 I’m looking here for the pinout: tomshardware dot com/uk/reviews/raspberry-pi-gpio-pinout,6122.html the color coding in the image seems to indicate the additional UART capable pins may not be configured for UART by default?

I don’t remember the exact details, but I recall there’s a need to configure the hardware switch for UART for some GPIO pins (also other like SPI and I2C). Some pins are multi-functional, it can act as GPIO / UART / SPI / I2C and you need to choose one.

You can do this on Raspberry Pi OS settings, not sure on Manjaro ARM though. I think there’s an rpi C library for this, don’t remember the details.

So I just obtained the raspi-gpio utility which is used to change the pin functions but according to elinux dot org/RPi_BCM2835_GPIOs there is only one set of UART capable pins on the model B+ so I dont know why the other link shows other pins to have a UART function.

Stick with GPIO 14 and 15 for UART. This is based on the RPi official doc:

Other links are probably erroneous. I haven’t touched RPi for some time so I can’t give you more info.

Other useful link : Raspberry Pi GPIO Pinout

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.