20160520 - Latest Pi firmware & no serial ports
Frank Nicholas
frank at nicholasfamilycentral.com
Fri May 20 23:13:53 UTC 2016
> On May 20, 2016, at 6:19 PM, Frank Nicholas <frank at nicholasfamilycentral.com> wrote:
>
>>
>> On May 20, 2016, at 2:39 PM, Eric S. Raymond <esr at thyrsus.com <mailto:esr at thyrsus.com>> wrote:
>>
>> Anthony Stirk <upuaut at gmail.com <mailto:upuaut at gmail.com>>:
>>> Will respond more later but serial port thing fixed here :
>>>
>>> https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=148515 <https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=148515>
>>
>> I attempted to follow one set of those directions. Specifically,
>> I changed /boot/config.txt so enable_uart=1 and disabled auto because
>> the enable for it was on the line above rthat - seems like they might
>> have both been put there by raspi-config.
>>
>> That looked like it ought to work, But it didn't. Sigh.
>>
>> If anyone has a /boot/config.txt and /boot/cmdline.txt that makes
>> the GPS visible under 2016-05-10-raspbian-jessie-lite, I'd love to see it.
>
> Please see this page:
> https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=141195 <https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=141195>
>
> It explains the change in UART behavior & what the options are used for. “enable_uart=1” is used if you want a UART **console** on boot-up. I suspect this would prevent the use of the UART for other purposes (GPS hat).
>
> I’m working on a good set of boot options now.
>
> Thanks,
> Frank
I have a solution, and it’s non-intuitive. The link I sent above clearly states that “enable_uart=1” is if you want a UART console. However, it appears that with the latest firmware, **without** the “enable_uart=1” option, NO UARTs are created/initialized on boot up. Without the “enable_uart=1”, the devices are never created.
Note that I never did a `rpi-update` - I don’t even find that command on the 2016-05-10 Raspbian Lite image. Regarding updates I did the following:
49 sudo apt update
50 sudo apt list --upgradable
51 sudo apt upgrade
The following is required in “/boot/config.txt” (I have NOTHING else in “/boot/config.txt" - everything else is commented out):
dtoverlay=pi3-disable-bt
enable_uart=1
Then from the other link sent earlier by Anthony Stirk (https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=148515), you must do a `sudo systemctl mask serial-getty at ttyAMA0.service` to stop systemd from using the serial port (note that I haven’t removed anything like systemd, etc.)
After adding the above 2 x lines to “/boot/config.txt” and rebooting, here is my output:
pi at ntp-rpi:~ $ ls -l /dev/ttyAMA0
crw-rw---- 1 root dialout 204, 64 May 20 22:52 /dev/ttyAMA0
pi at ntp-rpi:~ $ sudo systemctl mask serial-getty at ttyAMA0.service
pi at ntp-rpi:~ $ stty -F /dev/ttyAMA0 raw 9600 cs8 clocal -cstopb
pi at ntp-rpi:~ $ cat /dev/ttyAMA0
$GPGGA,225404.000,3909.1291,N,08543.4894,W,2,10,0.87,227.7,M,-33.5,M,0000,0000*5D
$GPGSA,A,3,01,19,24,06,22,28,17,30,03,11,,,1.51,0.87,1.24*0A
$GPRMC,225404.000,A,3909.1291,N,08543.4894,W,0.01,346.44,200516,,,D*7F
$GPVTG,346.44,T,,M,0.01,N,0.01,K,D*39
$GPGGA,225405.000,3909.1291,N,08543.4894,W,2,10,0.87,227.7,M,-33.5,M,0000,0000*5C
$GPGSA,A,3,01,19,24,06,22,28,17,30,03,11,,,1.51,0.87,1.24*0A
I’m sure this isn’t the “correct” way to make these things happen. I’m not sure what happens if you don’t have systemd (it’s been removed). For those that have removed systemd, do you now have an “/etc/inittab”? If so, is this there a “getty” line that uses "/dev/ttyAMA0”? Check for that and comment it out if it exists.
I’ll do some more testing by starting from a fresh image install, following the latest HowTo, removing systemd, and see how this can be fixed if the issue still exists.
Thanks,
Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/devel/attachments/20160520/b2445cf8/attachment.html>
More information about the devel
mailing list