Serial port missing - latest Jessie after update/upgrade

8 posts
by daveake » Tue May 17, 2016 4:08 pm
Pi B+. New SD with Jessie Lite dated May 10th.

Disable serial port getty/logging via raspi-config. Reboot, and /dev/ttyAMA0 is there and works.

Run sudo apt-get update and upgrade. Reboot. /dev/ttyAMA0 is now missing. No ttys0 either. As far as I can see, the serial port is gone completely.

User avatar
Posts: 158
Joined: Thu Jul 12, 2012 12:07 am
by serialGuy » Wed May 18, 2016 8:01 pm

Same problem!
Posts: 1
Joined: Wed May 18, 2016 7:59 pm
by grub » Wed May 18, 2016 9:22 pm
I'm experiencing exactly the same issue. I applied the latest upgrades to raspbian jessie lite dated 2016-05-10 and once the packages libraspberrypi, libraspberrypi0 and libraspberrypi-bootloader are updated from version 1.20160506-1 to version 1.20160512-1 the device /dev/ttyAMA0 is missing after reboot.
Posts: 4
Joined: Sat Nov 10, 2012 10:04 am
by daveake » Fri May 20, 2016 5:21 am
I have a solution; whether or not it's the "correct" solution I don't know but so far it's worked for me:

1 - Use raspi-config to enable serial port login/logging
2 - Disable getty on tthat port with:
Code: Select all
systemctl mask serial-getty@ttyAMA0.service

I read elsewhere on the forum just now about adding "enable_uart=1" to config.txt. I've not tried that and I don't know how that setting would interact with what I've suggested above.

As some people will actually want the serial port pins to be free, my suggestion is that raspi-config has 3 options not the 2:

1 - Enable logging / login
2 - Disable those but keep the port in /dev
3 - Completely disable serial port allowing the Tx/Rx free use for I/O

Either that or have Raspbian behave as it used to.

User avatar
Posts: 158
Joined: Thu Jul 12, 2012 12:07 am
by grub » Fri May 20, 2016 8:14 am
I disabled serial console with raspi-config and enabled uart by adding/changing
Code: Select all
in /boot/config.txt according to this thread After reboot /dev/ttyAMA0 was back and my applications using the serial port worked again.

I completely would support Dave's proposal to add another options to raspi-config to differentiate between disable console output and disable complete uart. That would have saved me some hours of investigation. It's annoying that simple update/upgrade w/o any notice disables the serial port though there might be good reasons for this change. However, this should be avoided since beginners could loose patience while struggling with this kind of issues.

Posts: 4
Joined: Sat Nov 10, 2012 10:04 am
by Chris_G_Miller » Wed Jun 01, 2016 11:02 pm
I was having terrible trouble with a serial peripheral attached via a USB to serial device, which I eventually tracked down to "odd" characters turning up in the serial stream my C program was sending to it.
It turns out that Jessie (and possibly other distros) ships with something called ModemManager which scampers round anything which looks like a serial port and prods it with the classic modem "hello" sequence, namely AT followed by carriage return.
It seems to do this a few times a few seconds apart after system startup, then shuts up (making it very difficult to detect what is happening).
To me, this is unhelpful - it has taken me almost half a day to work out this is what was going on :? . - thank goodness for tcpdump + usbmon giving me the ability to sniff the USB bus :) .
The cure is simple issue the following command as root:
Code: Select all
systemctl disable ModemManager.service
Posts: 3
Joined: Sat Nov 14, 2015 3:45 pm
Location: Kent, England
by nl3prc » Fri Aug 05, 2016 10:32 am
I also have a problem in my old linux i used /dev/ptyq0 and /dev/ttyq0
these psuedo ports are no longer in jessie PI

what can i use instead
User avatar
Posts: 152
Joined: Sun Jul 24, 2016 12:39 pm
Location: Den Helder the netherlands
by cblackburn1099 » Wed Aug 17, 2016 12:24 am
as far as the pty's go, you have to use /dev/ptmx, it will give you a pty to use, it's a much cleaner system than before

man ptmx

as far as the serial ports go, doesn't AMA now point to the bluetooth stuff and ttyS0 point to the original hardware uart? I beleive that's the case on my PI-3

Posts: 1
Joined: Wed Aug 17, 2016 12:21 am