0

I would like to disable the serial console and boot up messages while still being able to write to the port.

I have tried disabling the port in raspi-config. This disables the console and the kernel messages but also removes /dev/ttyAMA0, which my code is writing to.

In my application, I am writing to the port using Node and the SerialPort npm package.

I'm using a Raspberry Pi 2 Model B, and the 2016-05-27 version of Raspian Jessie.

1

Edit /boot/cmdline.txt using sudo nano /boot/cmdline.txt or your preferred method, and delete console=serial0, 115200.

If you are using an older version of Raspbian, you might need to delete console=ttyAMA0, 115200 instead.

After this, reboot and if you do ls /dev you should still see /dev/ttyAMA0. This worked for my Pi 2 running Raspbian Jessie Lite, which shouldn't be any different from Jessie in this aspect.

NOTE:

Be sure not to delete console=tty1.

1

The answer by @patrick-cook will work, but if you disabled console in raspi-config and rebooted this should already have done the same thing.

Something else may be in play. Possibilities include copying from a Pi3 which disables the default serial port by default through enable_uart in config.txt. (This is likely to become the default in newer releases.)

In any event you should no longer use /dev/ttyAMA0 but /dev/serial0 which is the default serial port on all models.

  • I just set up Jessie Lite on a RPi Zero and there's no /dev/serial0 but there is a /dev/serial1 (symlinked to ttyAMA0). – Peter Hansen Apr 27 '17 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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