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;
- 1.Disable Linux's use of console UART. Type "sudo raspi-config" to the terminal, select "Interfacing options", then "Serial" and select "No".
- 2.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.
- 3.Disable system service that initializes the modem by typing "sudo systemctl disable hciuart" to the terminal.
- 4.Reboot your system with "sudo reboot" command.