• sales

    +86-0755-88291180

Luckfox Pico RV1103【Tutorial on how to use UART】



The LuckFox Pico has three serial ports: UART2, UART3, and UART4. Among them, UART2 is the debug port.

The LuckFox Pico Plus has four serial ports: UART2, UART3, UART4, and UART5. Among them, UART2 is the debug port.

Performing serial port testing using the GPIO sysfs interface
1] View serial port:

root@linaro-alip:/home/linaro# ls /dev/ttyS*
/dev/ttyS3  /dev/ttyS4
##The serial port devices here are UART3 and UART4

2] Use the “stty” tool to query the serial port communication parameters:

linaro@linaro-alip:~$ stty -F /dev/ttyS3
speed 9600 baud; line = 0;
-brkint -imaxbel
##The default baud rate is 9600 

3] Modify the baud rate, where ispeed is the input rate and ospeed is the output rate:

stty -F /dev/ttyS3 ispeed 115200 ospeed 115200

4] Disable echo:

stty -F /dev/ttyS3 -echo
## Disabling echo refers to the situation where the characters entered in the terminal or serial communication are no longer displayed on the terminal.

5] Operation process screenshot:




】Communicating with a Windows host:

Connect one end of the serial port module to the computer, and the other end to the physical pins 18 (GND), 19 (UART7_TX), and 20 (UART7_RX) of the LuckFox Pico.

Download and open PuTTY (or any other serial port software), select the serial port, and set the baud rate (default is 9600, please adjust it according to your actual modified value).

Execute the following command on the terminal of the development board to write the strings “Hello” and “world!” to the terminal device file using the echo command:


echo Hello > /dev/ttyS3
echo "world !" > /dev/ttyS3

The serial port debugging assistant on Windows will receive the content:


】Test the built-in sample program of the official SDK:


(The following operations need to be performed in the terminal of the Pico development board)

3] Run the test sample program:
chmod 777 ./luckfox_uart_test
## Grant executable permissions to the file
./luckfox_uart_test 3
##The parameter 3 in the example represents UART3.

4] Open the serial communication device to receive data:


TAG: Raspberry Pi Pico 2 RP2350 industrial 6-ch Relay RS485 isolation protection Servo PWM motor WP5320 WP5335 35/20KG.CM 180° PWM digital servo double ball bearings Milk-V Duo S 512MB SG2000 RISC-V JETSON NANO MINI Fan ESP32-S3 AI Voice Dialogue Robot Mechanical Dog Development Board Toy Tabletop Pet Deepseek Raspberry Pi 5 PCIe TO Gigabit ETH USB3.2 HAT+ USB HUB Raspberry Pi 5 DSI User Guide SpotPear Raspberry Pi Pico 2 RP2350 1.64 inch AMOLED Development Board Display TouchScreen 280x456 QMI8658 IMU QSPI RV1106 SC3336 ESP32-P4-WIFI6 3.5inch LCD Display AI Development Board 320×480 3.5 inch TouchScreen Deepseek USB to JTAG Raspberry Pi 5 PCM5122 I2S Audio Card DAC Also For PI4 /PI3 /Zero Series i5-1135G7 IMX477 IR CUT Camera (A) 12.3MP For Jetson Nano/Orin And Raspberry Pi Gyroscope Sensor ESP32 S3 Development Board 1.75 inch AMOLED Display TouchScreen SD slot 6-axis sensor Xiaozhi AI Deepseek Raspberry Pi Pico ST7789 Raspberry Pi AI Camera Official Original 12MP IMX500 Intelligent visual Sensor On-Board RP2040 ESP32-C6 AI 1.54-inch e-Paper Ink Screen 1.54inch Display AIoT Development Board Deepseek