Re: Pi 4 uarts

From: John Rushford <jjrushford_at_gmail.com>
Date: Sun, 22 Jan 2023 03:27:38 UTC
Mark,

Thanks for the reply.  I only have “dtoverlay=uart3” in the config.txt and with that entry, FreeBSD creates /dev/ttyu1 and /dev/cuau1 along with the .init and .lock files.
So, I tried with this entry in /etc/ttys and it was of no help, still no data:

	ttyu1 "none" vt100 on secure

thanks
John
jjrushford@gmail.com <mailto:jjrushford@gmail.com>

> On Jan 21, 2023, at 8:18 PM, Mark Millard <marklmi@yahoo.com> wrote:
> 
> On Jan 21, 2023, at 18:34, John Rushford <jjrushford@gmail.com> wrote:
> 
>> I have installed FreeBSD 13.1 on a raspberry PI 4b rev 1.4 and I am trying to use the additional serial ports that are available with the PI 4 with an Adafruit ultimate GPS card.
>> I found that it was problematic using the first serial port ttyu0 on GPIO pins 14 and 15 as data on the line from the GPS would interrupt the boot process and I verified that I was in fact able see data time stamps from the GPS card on the first uart port once I got FreeBSD to boot.
>> 
>> Now since I do not wish to use the first serial port, I’ve built the rpi-firmware port and copied all the uart dtb’s to /boot/msdos/overlays and I’ve tried enabling the uart’s in /boot/msdos/config.txt with “dtoverlay=uart3” for example.  
>> Enabling them does in fact  result in device entries created for them in /dev but, I am unable to see any data on the corresponding ttyuX or cuauX ports.
>> 
>> Just to eliminate a wiring error, I installed another SD card with Raspberry PI OS, enabled uart3 and I am able to see data on uart3 without any issue confirming I have everything wired up properly.
>> 
>> With FreeBSD, I have set the proper baud rate on the ports and I’ve tried disabling flow control on them, using stty, but no matter what I do, I never see any data on them.  Unless I’m missing something, I can only conclude there is some bug in FreeBSD preventing me from using these additional serial ports.  Has anyone here on this mailing list been able to use them?  If so, what does it take?
> 
> You did not mention /etc/ttys editing. So I wonder if you
> changed any of the lines like, say,
> 
> # Serial terminals
> # The 'dialup' keyword identifies dialin lines to login, fingerd etc.
> ttyu0   "/usr/libexec/getty 3wire"      vt100   onifconsole secure
> ttyu1   "/usr/libexec/getty 3wire"      vt100   onifconsole secure
> ttyu2   "/usr/libexec/getty 3wire"      vt100   onifconsole secure
> ttyu3   "/usr/libexec/getty 3wire"      vt100   onifconsole secure
> 
> to use, say, none instead of "/usr/libexec/getty 3wire", and other
> related edits.
> 
> But I've not tried to get any extra serial ports going on
> an RPi4B. So the above is just guess work about something
> to experiment with.
> 
> ===
> Mark Millard
> marklmi at yahoo.com
>