I am running Raspbian Jessie 8 on Raspberry 3 and I followed the answer to the question Why my program won't communicate through ttyAMA0 on Raspbian(jessie)? But I still can't get my program to connect through serial GPIO pins.

I ran gpio readall command on the terminal and it said that PINS 15 and 16 (RX and TX) for serial is set to ALT5, but it needs to be ALT0. So, I ran the following command on the terminal.

gpio mode 15 ALT0; gpio mode 16 ALT0;

It changes the state of pins settings. However, my program keeps complaining that it can't connect to the serial port. I also noticed that once I reboot my PI, RX and TX pins changes back to ALT5. Am I missing something? or Any hints or clues will be greatly appreciated.


1 Answer 1


The Pi hardware has a full-UART and a mini-UART internal peripheral which supply serial services.

If GPIO 14/15 are in mode ALT0 the full-UART is connected to pins 8/10 (serial TXD/RXD). If GPIO 14/15 are in mode ALT5 the mini-UART is connected to pins 8/10.

The full-UART is reserved for Bluetooth use in the Raspberry Pi3. Therefore on the Pi3 you must use the mini-UART, i.e. you must set GPIO 14/15 to mode ALT5.

Refer to the port as /dev/serial0 when using pins 8/10 as a serial link.

  • Only for interesting: if I never need Bluetooth, can I then set to mode ALT0 and use the full-UART on pins 8/10?
    – Ingo
    Commented Sep 28, 2018 at 10:57
  • @Ingo I believe so, I think you have to disable bluetooth though. See the end of milliways answer
    – joan
    Commented Sep 28, 2018 at 11:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.