Discussion:
Using a serial port
(too old to reply)
Steve Fatula
2022-06-18 00:00:01 UTC
Permalink
Is there anyway to get an attached serial port working on Debian and
raspberry PI 4? It appears the tested installs want to use it as a
serial console, I do not. I want to use UART1, the PL011, as an RS232
port to a projector.

I can do this using Raspberry OS, but, not Debian using the tested
installs. There is no way to disable Bluetooth via the overlays used on
Raspberry OS. I can sort of mess around and stop the console from being
started on ttyS1, but no way to use the port as a serial port to send
and received data. Apparently the dtoverlays are not there.

So, is there any way to really use a serial port, attached to any GPIO
pins, as a real RS232 port using Debian images? if so, what do I need to
disable or enable?

As mentioned, had it working on Raspberry OS which is based on Bullseye.
But unfortunately I can't use Raspberry OS for our usage.

Steve
Lennart Sorensen
2022-06-18 00:50:01 UTC
Permalink
Post by Steve Fatula
Is there anyway to get an attached serial port working on Debian and
raspberry PI 4? It appears the tested installs want to use it as a serial
console, I do not. I want to use UART1, the PL011, as an RS232 port to a
projector.
I can do this using Raspberry OS, but, not Debian using the tested installs.
There is no way to disable Bluetooth via the overlays used on Raspberry OS.
I can sort of mess around and stop the console from being started on ttyS1,
but no way to use the port as a serial port to send and received data.
Apparently the dtoverlays are not there.
So, is there any way to really use a serial port, attached to any GPIO pins,
as a real RS232 port using Debian images? if so, what do I need to disable
or enable?
As mentioned, had it working on Raspberry OS which is based on Bullseye. But
unfortunately I can't use Raspberry OS for our usage.
From what I have read you should be able to enable uart2 through uart5
on the Pi4B using the dts overlays. I don't have a Pi4 yet so no
experience with doing that unfortunately.

https://forums.raspberrypi.com/viewtopic.php?t=244827 seems to have some
talk about it though.
--
Len Sorensen
Steve Fatula
2022-06-18 04:30:01 UTC
Permalink
There are no dtoverlays using Debian, they are on Raspberry OS.
Post by Steve Fatula
Post by Steve Fatula
Is there anyway to get an attached serial port working on Debian and
raspberry PI 4? It appears the tested installs want to use it as a serial
console, I do not. I want to use UART1, the PL011, as an RS232 port to a
projector.
I can do this using Raspberry OS, but, not Debian using the tested installs.
There is no way to disable Bluetooth via the overlays used on Raspberry OS.
I can sort of mess around and stop the console from being started on ttyS1,
but no way to use the port as a serial port to send and received data.
Apparently the dtoverlays are not there.
So, is there any way to really use a serial port, attached to any GPIO pins,
as a real RS232 port using Debian images? if so, what do I need to disable
or enable?
As mentioned, had it working on Raspberry OS which is based on Bullseye. But
unfortunately I can't use Raspberry OS for our usage.
From what I have read you should be able to enable uart2 through uart5
on the Pi4B using the dts overlays. I don't have a Pi4 yet so no
experience with doing that unfortunately.
https://forums.raspberrypi.com/viewtopic.php?t=244827 seems to have some
talk about it though.
Francois Lorrain
2022-06-18 07:40:01 UTC
Permalink
Hello,

This might be useful if you want to recreate the dts :
https://bootlin.com/blog/device-tree-supporting-similar-boards-the-beaglebone-example/

I have not tried it ...

Francois
Post by Steve Fatula
There are no dtoverlays using Debian, they are on Raspberry OS.
Post by Steve Fatula
Post by Steve Fatula
Is there anyway to get an attached serial port working on Debian and
raspberry PI 4? It appears the tested installs want to use it as a
serial
Post by Steve Fatula
Post by Steve Fatula
console, I do not. I want to use UART1, the PL011, as an RS232 port to a
projector.
I can do this using Raspberry OS, but, not Debian using the tested
installs.
Post by Steve Fatula
Post by Steve Fatula
There is no way to disable Bluetooth via the overlays used on Raspberry
OS.
Post by Steve Fatula
Post by Steve Fatula
I can sort of mess around and stop the console from being started on
ttyS1,
Post by Steve Fatula
Post by Steve Fatula
but no way to use the port as a serial port to send and received data.
Apparently the dtoverlays are not there.
So, is there any way to really use a serial port, attached to any GPIO
pins,
Post by Steve Fatula
Post by Steve Fatula
as a real RS232 port using Debian images? if so, what do I need to
disable
Post by Steve Fatula
Post by Steve Fatula
or enable?
As mentioned, had it working on Raspberry OS which is based on
Bullseye. But
Post by Steve Fatula
Post by Steve Fatula
unfortunately I can't use Raspberry OS for our usage.
From what I have read you should be able to enable uart2 through uart5
on the Pi4B using the dts overlays. I don't have a Pi4 yet so no
experience with doing that unfortunately.
https://forums.raspberrypi.com/viewtopic.php?t=244827 seems to have some
talk about it though.
Steve Fatula
2022-06-18 16:40:01 UTC
Permalink
So, it sounds like the answer is no basically. Yes, I can compile debian
and such but not what I have in mind, simply wanted to enable the UART
for serial use. I'm not sure why the overlays are not included in
Debian. I'll have to keep the event driven code controlling my projector
on another machine for now sadly. I guess I will try and find a way to
ask the debian "developers" who made the images for Debian. Thanks for
the help.
Post by Francois Lorrain
Hello,
https://bootlin.com/blog/device-tree-supporting-similar-boards-the-beaglebone-example/
I have not tried it ...
Francois
There are no dtoverlays using Debian, they are on Raspberry OS.
Post by Steve Fatula
Is there anyway to get an attached serial port working on
Debian and
Post by Steve Fatula
raspberry PI 4? It appears the tested installs want to use it
as a serial
Post by Steve Fatula
console, I do not. I want to use UART1, the PL011, as an RS232
port to a
Post by Steve Fatula
projector.
I can do this using Raspberry OS, but, not Debian using the
tested installs.
Post by Steve Fatula
There is no way to disable Bluetooth via the overlays used on
Raspberry OS.
Post by Steve Fatula
I can sort of mess around and stop the console from being
started on ttyS1,
Post by Steve Fatula
but no way to use the port as a serial port to send and
received data.
Post by Steve Fatula
Apparently the dtoverlays are not there.
So, is there any way to really use a serial port, attached to
any GPIO pins,
Post by Steve Fatula
as a real RS232 port using Debian images? if so, what do I need
to disable
Post by Steve Fatula
or enable?
As mentioned, had it working on Raspberry OS which is based on
Bullseye. But
Post by Steve Fatula
unfortunately I can't use Raspberry OS for our usage.
  From what I have read you should be able to enable uart2
through uart5
on the Pi4B using the dts overlays.  I don't have a Pi4 yet so no
experience with doing that unfortunately.
https://forums.raspberrypi.com/viewtopic.php?t=244827 seems to
have some
talk about it though.
Andrew M.A. Cater
2022-06-18 17:00:01 UTC
Permalink
So, it sounds like the answer is no basically. Yes, I can compile debian and
such but not what I have in mind, simply wanted to enable the UART for
serial use. I'm not sure why the overlays are not included in Debian. I'll
have to keep the event driven code controlling my projector on another
machine for now sadly. I guess I will try and find a way to ask the debian
"developers" who made the images for Debian. Thanks for the help.
The "developers" who made the image for Debian: fundamentally Gunnar Wolf
who is an excellent Debian developer - expert and of very long standing -
who has done a large amount of work. You might find others who could help
on IRC - OFTC channels #debian-arm and #debian-raspberrypi

The Raspberry Pi does things its own way and the way the overlays work
is largely particular to the RPi.

With every good wish, as ever,

Andy Cater
Post by Francois Lorrain
Hello,
https://bootlin.com/blog/device-tree-supporting-similar-boards-the-beaglebone-example/
I have not tried it ...
Francois
There are no dtoverlays using Debian, they are on Raspberry OS.
Post by Steve Fatula
Is there anyway to get an attached serial port working on
Debian and
Post by Steve Fatula
raspberry PI 4? It appears the tested installs want to use it
as a serial
Post by Steve Fatula
console, I do not. I want to use UART1, the PL011, as an RS232
port to a
Post by Steve Fatula
projector.
I can do this using Raspberry OS, but, not Debian using the
tested installs.
Post by Steve Fatula
There is no way to disable Bluetooth via the overlays used on
Raspberry OS.
Post by Steve Fatula
I can sort of mess around and stop the console from being
started on ttyS1,
Post by Steve Fatula
but no way to use the port as a serial port to send and
received data.
Post by Steve Fatula
Apparently the dtoverlays are not there.
So, is there any way to really use a serial port, attached to
any GPIO pins,
Post by Steve Fatula
as a real RS232 port using Debian images? if so, what do I need
to disable
Post by Steve Fatula
or enable?
As mentioned, had it working on Raspberry OS which is based on
Bullseye. But
Post by Steve Fatula
unfortunately I can't use Raspberry OS for our usage.
  From what I have read you should be able to enable uart2
through uart5
on the Pi4B using the dts overlays.  I don't have a Pi4 yet so no
experience with doing that unfortunately.
https://forums.raspberrypi.com/viewtopic.php?t=244827 seems to
have some
talk about it though.
Lennart Sorensen
2022-06-19 01:30:01 UTC
Permalink
Post by Andrew M.A. Cater
The "developers" who made the image for Debian: fundamentally Gunnar Wolf
who is an excellent Debian developer - expert and of very long standing -
who has done a large amount of work. You might find others who could help
on IRC - OFTC channels #debian-arm and #debian-raspberrypi
The Raspberry Pi does things its own way and the way the overlays work
is largely particular to the RPi.
Beaglebone does overlays too. It is not Pi specific, it is a useful
kernel feature. Devicetree overlays (and devicetree in general) of course
started on powerpc, so no it is not a Pi thing, the Pi just happens to
be the most common platform that is actually making people realize the
feature exists. It's only been around for 8 or so years after all.
--
Len Sorensen
Paul Wise
2022-06-19 00:20:01 UTC
Permalink
I'm not sure why the overlays are not included in Debian.
I don't remember the details, but I have heard it is because the RPi
Foundation has not gotten their work on overlays into mainline Linux
and Debian mostly does not use non-mainline Linux kernel versions.
--
bye,
pabs

https://wiki.debian.org/PaulWise
gene heskett
2022-06-18 06:10:01 UTC
Permalink
Post by Lennart Sorensen
Post by Steve Fatula
Is there anyway to get an attached serial port working on Debian and
raspberry PI 4? It appears the tested installs want to use it as a serial
console, I do not. I want to use UART1, the PL011, as an RS232 port to a
projector.
I can do this using Raspberry OS, but, not Debian using the tested installs.
There is no way to disable Bluetooth via the overlays used on Raspberry OS.
I can sort of mess around and stop the console from being started on ttyS1,
but no way to use the port as a serial port to send and received data.
Apparently the dtoverlays are not there.
So, is there any way to really use a serial port, attached to any GPIO pins,
as a real RS232 port using Debian images? if so, what do I need to disable
or enable?
As mentioned, had it working on Raspberry OS which is based on Bullseye. But
unfortunately I can't use Raspberry OS for our usage.
From what I have read you should be able to enable uart2 through uart5
on the Pi4B using the dts overlays. I don't have a Pi4 yet so no
experience with doing that unfortunately.
https://forums.raspberrypi.com/viewtopic.php?t=244827 seems to have some
talk about it though.
*I never have used a serial port on a pi, 3 or 4. I'm running an 80 yo******Sheldon lathe with a pi4 now but used a pi3 before the 4 came out.****My use of a mesa interface card ties up the gpio header as it talks to *

the mesa cards at ohmygawd baud rates, sending data to the mesa
card in 32 bit packets at 42 megabaud, and getting the reply's back
at 25 megabaud, The use of the SPI interface leaves the wired net
port open for normal use and my remote operating channel is over
its ipv4 address with ssh for terminal services, and sshfs for file
transfers.. And running on raspios buster version, it Just Works. other
than linuxcnc which needs a realtime kernel as the raspios kernel
has been replaced with one I built, right on the pi:

***@rpi4:/media/pi/workspace $ uname -a
Linux rpi4.coyote.den 4.19.71-rt24-v7l+ #1 SMP PREEMPT RT Thu Feb 6
07:09:18 EST 2020 armv7l GNU/Linux

workspace is a 240gig sata ssd plugged into a usb3 adapter, only
about 20x faster than its 64G boot u-sd. Within its speed limits,
it can do anything the bigger, more power hungry intels can do.
Total power consumption, monitor and all the interfacing is about
22 watts. The lathes 250 supply is controlled by SSR's linuxcnc
controls.  And the lathe can do tricks that weren't even invented
yet when it was new. To an accuracy of about .002 mm.

There's lots of things the pi's can do if given the chance to try.
Needing a uart to talk to it is not a requirement here.

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Loading...