UART setup in Beaglebone Black

I want to transfer data from a Qt application in one PC, to the Qt application integrated in the flashed yocto linux image in the SD card in the BeagleBone Black board via RS485. This Qt application will be launched on booting the BBB.
I understand that there are multiple UARTs available for BBB. I want to know if all of these pins for UART are already enabled or not.
If not, how to enable those pins for doing serial communication.
I found this BB-UART4-00A0.dtbo file in the boot partition of my SD card.

/dts-v1/;
// magic:		0xd00dfeed
// totalsize:		0x3f9 (1017)
// off_dt_struct:	0x38
// off_dt_strings:	0x370
// off_mem_rsvmap:	0x28
// version:		17
// last_comp_version:	16
// boot_cpuid_phys:	0x0
// size_dt_strings:	0x89
// size_dt_struct:	0x338

/ {
    fragment@0 {
        target-path = "/chosen";
        __overlay__ {
            overlays {
                BB-UART4-00A0.kernel = "Wed Apr 10 10:44:18 2024";
            };
        };
    };
    fragment@1 {
        target = <0xffffffff>;
        __overlay__ {
            P9_13_pinmux {
                status = "disabled";
            };
            P9_11_pinmux {
                status = "disabled";
            };
        };
    };
    fragment@2 {
        target = <0xffffffff>;
        __overlay__ {
            pinmux_bb_uart4_pins {
                pinctrl-single,pins = <0x00000074 0x0000000e 0x00000070 0x0000002e>;
                phandle = <0x00000001>;
            };
        };
    };
    fragment@3 {
        target = <0xffffffff>;
        __overlay__ {
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <0x00000001>;
        };
    };
    __symbols__ {
        bb_uart4_pins = "/fragment@2/__overlay__/pinmux_bb_uart4_pins";
    };
    __fixups__ {
        ocp = "/fragment@1:target:0";
        am33xx_pinmux = "/fragment@2:target:0";
        uart4 = "/fragment@3:target:0";
    };
    __local_fixups__ {
        fragment@3 {
            __overlay__ {
                pinctrl-0 = <0x00000000>;
            };
        };
    };
};

You should add your file inside the /boot/uEnv.txt file.
The configuration will be loaded at bootup and the the name is if my memory is good /dev/ttyS4.

But there is no uEnv.txt file in /boot.
These are the contents of the /boot folder.

root@beaglebone:/# cd boot
root@beaglebone:/boot# ls
AM335X-PRU-UIO-00A0.dtbo
BB-ADC-00A0.dtbo
BB-BBBW-WL1835-00A0.dtbo
BB-BBGG-WL1835-00A0.dtbo
BB-BBGW-WL1835-00A0.dtbo
BB-BONE-4D5R-01-00A1.dtbo
BB-BONE-LCD4-01-00A1.dtbo
BB-BONE-NH7C-01-A0.dtbo
BB-BONE-eMMC1-01-00A0.dtbo
BB-CAPE-DISP-CT4-00A0.dtbo
BB-HDMI-TDA998x-00A0.dtbo
BB-I2C1-MCP7940X-00A0.dtbo
BB-I2C1-RTC-DS3231.dtbo
BB-I2C1-RTC-PCF8563.dtbo
BB-I2C2-BME680.dtbo
BB-I2C2-MPU6050.dtbo
BB-LCD-ADAFRUIT-24-SPI1-00A0.dtbo
BB-NHDMI-TDA998x-00A0.dtbo
BB-SPIDEV0-00A0.dtbo
BB-SPIDEV1-00A0.dtbo
BB-UART1-00A0.dtbo
BB-UART2-00A0.dtbo
BB-UART4-00A0.dtbo
BB-W1-P9.12-00A0.dtbo
BBORG_COMMS-00A2.dtbo
BBORG_FAN-A000.dtbo
BBORG_RELAY-00A2.dtbo
BONE-ADC.dtbo
M-BB-BBG-00A0.dtbo
M-BB-BBGG-00A0.dtbo
MLO
PB-MIKROBUS-0.dtbo
PB-MIKROBUS-1.dtbo
am335x-bone.dtb
am335x-boneblack-pps.dtb
am335x-boneblack-uboot-univ.dtb
am335x-boneblack-uboot.dtb
am335x-boneblack-wireless.dtb
am335x-boneblack.dtb
am335x-boneblue.dtb
am335x-bonegreen-gateway.dtb
am335x-bonegreen-wireless-uboot-univ.dtb
am335x-bonegreen-wireless.dtb
am335x-bonegreen.dtb
am335x-pocketbeagle.dtb
am335x-sancloud-bbe-extended-wifi.dtb
am335x-sancloud-bbe-lite.dtb
am335x-sancloud-bbe.dtb
extlinux
u-boot.img
zImage

Sorry I hadn’t seen you are on a yocto distro.
My comment is good for a debian distro.

1 Like

Oh it’s fine. Actually I forgot to mention that I’m using yocto project using meta-ti layer with MACHINE_NAME = "beaglebone"