Code: Select all
sudo systemctl stop [email protected]
Code: Select all
sudo systemctl disable [email protected]
Modify /boot/cmdline.txt so it has sth like this:tlc wrote:I do not want to have kernel messages on ttyAMA0, but I want to have serial terminal connected via ttyAMA0 with 9600kbit speed.
Code: Select all
console=ttyAMA0,9600 kgdboc=ttyAMA0,9600 console=tty1
Code: Select all
ln -s /lib/systemd/system/[email protected] /etc/systemd/system/getty.target.wants/[email protected]
Code: Select all
sudo raspbian-config
Can you post a link to the historic instructions you're following? What is it doing to inittab? If it is just to disable the serial console then there's an option in sudo raspi-config to do that for you on Jessie.nadeto9696 wrote:Hello,
I am trying to connect a Pi-Lite to a Pi 2B. I followed the instructions available and found out that the inittab file has been replaced with another one. However I couldn't find instructions anywhere about how to procede with the new os.
Can anyone help?
Cheers.
Yes that (bold) seems to have worked for me using the Raspberry Pi Zero. In this case it was a reference to ttySerial0 that I removed.barthawk wrote:Thanks for the suggestion, I checked the config.txt file and enable_uart=1 was already in the file, but there is still no /dev/ttyAMA0 file when I boot.
I'm, trying to write from a python script to the serial port. On my Pi Zero, the cmdline.txt doesn't refer to ttyAMA0, but serial0 which is linked to ttyAMA0. I remove that bit from cmdline.txt, but then when I reboot //dev/ttyAMA0 don't exist. If I tried the linking as described above, then I get a single message on the serial port saying "Uncompressing Linux... done, booting the kernel" but no logon prompt. Then /dev/ttyAMA0 exists.
However, when I try to open the port using python I get the message saying "Port is already open".
EDIT *User Error*
I didn't realize that defining the serial port in python opened the port automatically and I tried to open the port again, resulting in the error. It does appear that just removing the references to ttyAMA0 or ttySerial0 in the /boot/cmdline.txt while enabling the use of the serial port using raspi-config will enable the use of the serial port from user land programs. I did also change the permissions on ttyAMA0 to +0666 to allow regular users to write to it.
Thanks
Hello again and thanks for your reply!DougieLawson wrote:Can you post a link to the historic instructions you're following? What is it doing to inittab? If it is just to disable the serial console then there's an option in sudo raspi-config to do that for you on Jessie.nadeto9696 wrote:Hello,
I am trying to connect a Pi-Lite to a Pi 2B. I followed the instructions available and found out that the inittab file has been replaced with another one. However I couldn't find instructions anywhere about how to procede with the new os.
Can anyone help?
Cheers.
ShiftPlusOne wrote: ↑Fri Feb 16, 2018 5:14 pmUse raspi-config to disable serial shell instead of the way they say in the tutorial. You want to keep the hardware enabled, but disable the shell (it should ask you two questions).