Enable UART Port on Raspberry Pi

By standard the UART interface is configured as serial console. If you want to use the UART interface for other things, e.g. for a GPS module, the standard function needs to be deactivated.

  1. Open the cmdline.txt file with the Nano text editor.
    sudo nano /boot/cmdline.txt

    and remove the following part from the file.

    console=ttyAMA0,115200 kgdboc=ttyAMA0,115200

    The content of the file should look like this

    dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

    Exit the editor with ctrl+x and save the changes using y.

  2. Open inittab
    sudo nano /etc/inittab

    and search for the following line.

    T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

    Insert a # at the beginning of the line to comment this line. Doing so the line should look like this.

    #T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

    Exit the editor the same ways as in the previous step.

  3. From Kernel 3.18.x on the following step must be excecuted aditionally.
    sudo nano /boot/config.txt

    Search for the following line and remove the # at the beginning of the line.


    Exit the editor the same ways as in the previous step.

    Show kernel version
    uname -a
  4. Restart RPI.
    sudo reboot

Leave your vote

8 points
Upvote Downvote

Total votes: 1

Upvotes: 1

Upvotes percentage: 100.000000%

Downvotes: 0

Downvotes percentage: 0.000000%

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.