Swapping the Serial Ports
Raspberry Pis have two UARTs (Serial Ports). These are called PL011 and mini UART. PL011 is the high performance one and connected to the Raspberry Pi's Bluetooth module. On the other hand, mini UART is connected to the UART pins of the 40-pin header.
To take full advantage of your UART enabled hardware, you may wish to swap the serial ports of the Raspberry Pi. To do that;
Disable Linux's use of console UART. Type "sudo raspi-config" to the terminal, select "Interfacing options", then "Serial" and select "No".
Swap the Raspberry Pi's Bluetooth UART port. Type "sudo nano /boot/config.txt" to the terminal and then add "dtoverlay=pi3-miniuart-bt" line.
Disable system service that initializes the modem by typing "sudo systemctl disable hciuart" to the terminal.
Reboot your system with "sudo reboot" command.
For further information, visit Raspberry Pi's official documentation at https://www.raspberrypi.org/documentation/configuration/uart.md
Last updated