I need to obtain data from two sensors I have connected to the Raspberry Pi 4 IO Board. I am using Ubuntu 22 since it is a requirement. I have connected GPIO 4 and 5 for one sensor and GPIO 8 and 9 for another sensor to the UART 3 and UART 4. (It is necessary I use the RPI Pins). I have already enabled the dtoverlay in the /boot/config.txt as follows:
Under /boot/config.txt:
enable_uart=1
dtoverlay=uart3
dtoverlay=uart4
//This was already part of the config.txt file
dtoverlay=tft93441:rotate=270
I rebooted after changes.
When I do the command sudo dmesg | grep uart
the following appears:
[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1
snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-
1:1920x1080M@60 smsc95xx.macaddr=E4:5F:01:2C:F2:C6 vc_mem.mem_base=0x3ec00000
vc_mem.mem_size=0x40000000 zswap.enabled=1 zswap.zpool=z3fold zswap.compressor=zstd
dwc_otg.lpm_enable=0 root=LABEL=writable rootfstype=ext4 rootwait fixrtc quiet splash
cmdline=cmdline.txt dtoverlay=disable-bt
[ 0.801780] bcm2835-aux-uart fe215040.serial: there is not valid maps for state default
[ 1.245155] uart-pl011 fe201000.serial: there is not valid maps for state default
[ 1.246101] uart-pl011 fe201000.serial: cts_event_workaround enabled
[ 10.633647] uart-pl011 fe201000.serial: no DMA platform data
Then when I run sudo dmesg | grep tty
, I get the following:
[ 0.000405] printk: console [tty0] enabled
[ 0.803738] fe215040.serial: ttyS0 at MMIO 0xfe215040 (irq = 20, base_baud = 62500000) is a 16550
[ 1.246191] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 19, base_baud = 0) is a PL011 rev2
I already connected the two sensors through USB and through a USB to UART converter module and I can see the data coming from the sensor. Except when I connect them to the RPI pins. I already connected to each of the /dev/tty# ports through serial and minicom. When I connect to /dev/ttyS0, /dev/ttyAMA0 I do not receive any data. I do have the correct baud rate and timeout as required by the sensors.
I have already enabled serial communication through raspi-config and disabled the login shell, then reboot.
Has anyone else experienced the same issue? Or has a recommendation on how I can enable those specific UARTs? Maybe an idea of why the /dev/tty# ports are not appearing when connected to the GPIOs?
Thank you in advance!