Contents
The Raspberry Pi 3 and Zero W both come with onboard Wifi and Bluetooth. Unfortunately the introduction of Bluetooth messed things up for the GPIO serial port making it almost unusable. Why this design choice was made is beyond my understanding and I will not discuss it here. Goal of this article is to recover the serial port like we had on the prior versions of the Pi.
If you are planing to use Bluetooth stop reading here, as we will completely disable it to reclaim the serial port.
Prerequisites
- An already running Raspberry Pi 3 or Zero W
- Know-how on how to access your pi over SSH or using the shell
- Know-how on editing files through terminal
Turn off shell and enable serial port
To ease up things we will use raspi-config. Start raspi-config
sudo raspi-config
Code language: Shell Session (shell)
Follow the steps below.
Disable Bluetooth
Edit the file /boot/config.txt and add the following line at the end of it.
dtoverlay=pi3-disable-bt
This should look something like this :
Disable HCIUart service and reboot
sudo systemctl disable hciuart.service
sudo reboot
Code language: Shell Session (shell)
Conclusion
After rebooting the Raspberry Pi the serial port will be available and fully functional under /dev/ttyAMA0, like the way it used to be on the first version of the boards.
Enjoy !