serial console

72 views
Skip to first unread message

robert.berger

unread,
Dec 19, 2020, 5:16:56 AM12/19/20
to BeagleBoard

drhun...@gmail.com

unread,
Dec 19, 2020, 11:24:35 AM12/19/20
to BeagleBoard
Hi Robert,
I use this one on BBB/BBBW. It's a bit more expensive but you know it will work. The 6 pin connector fits directly to connector on BBB so you know the connections are correct.


Iain

Robert Berger

unread,
Dec 19, 2020, 11:38:45 AM12/19/20
to beagl...@googlegroups.com, drhun...@gmail.com
Hi,

My comments are in-line.

I guess my question is not very obvious;)

It's about the pocketbeagle.

On 19/12/2020 18:24, drhun...@gmail.com wrote:
> Hi Robert,
> I use this one on BBB/BBBW. It's a bit more expensive but you know it
> will work. The 6 pin connector fits directly to connector on BBB so you
> know the connections are correct.

My BBB and green work happily with such a cable and also with[1].

>
> https://ftdi-uk.shop/products/ttl-232r-3v3
>
> Iain

[1] https://www.artekit.eu/products/accessories/comm/ak-rs232/

Regards,

Robert

>
> On Saturday, December 19, 2020 at 10:16:56 AM UTC robert.berger wrote:
>
> Hi,
>
> I tried in a couple of ways to get something out of the serial
> console while booting (U-Boot, kernel, console,..)
>
> This seems extremely unstable and random.
>
> One device I tried is this[1] with 3.3V.
>
> Another device is this[2].
>
> Can you please advise which serial adapter to use?
>
> Regards,
>
> Robert
>
> [1]
> https://www.amazon.co.uk/dp/B07BBPX8B8/ref=sspa_dk_detail_1?psc=1&pd_rd_i=B07BBPX8B8&pd_rd_w=bMrBp&pf_rd_p=1055d8b2-c10c-4d7d-b50d-96300553e15d&pd_rd_wg=x9xga&pf_rd_r=4CE6P3A41TY2T1YEWT9D&pd_rd_r=8d2c3d2f-1616-48b7-909a230a9812d43d&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEzSko1VE9HOTZUUklQJmVuY3J5cHRlZElkPUEwODg0NTU5MTdWWENKTDRESDE1MiZlbmNyeXB0ZWRBZElkPUEwNTYxNzYwMkRDUlBZRUk4TzJKMCZ3aWRnZXROYW1lPXNwX2RldGFpbCZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU=
>
> [2] https://www.artekit.eu/products/accessories/comm/ak-rs232/
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "BeagleBoard" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/beagleboard/omDhIBOeRYo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> beagleboard...@googlegroups.com
> <mailto:beagleboard...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/7768f124-31fc-493e-9026-d449c7d817b6n%40googlegroups.com
> <https://groups.google.com/d/msgid/beagleboard/7768f124-31fc-493e-9026-d449c7d817b6n%40googlegroups.com?utm_medium=email&utm_source=footer>.

jonnymo

unread,
Dec 19, 2020, 12:14:08 PM12/19/20
to Beagle Board
Robert,

For the PocketBeagle, it seems a FTDI Click Board is recommended way to connect to the serial output of the PB:

See Jason's suggestion from this link:

Is there anything else connected to the PB when trying to communicate with it via serial? Is so, then you might try to disconnect it before reading from the serial interface.


Cheers,

Jon


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/f506dc0b-7f25-4354-bbb3-ec8f0057f266o%40googlegroups.com.

Dennis Lee Bieber

unread,
Dec 20, 2020, 3:54:55 PM12/20/20
to Beagleboard
On Sat, 19 Dec 2020 02:16:56 -0800 (PST), in
gmane.comp.hardware.beagleboard.user "robert.berger"
<robert.karl.berger-R...@public.gmane.org> wrote:

There is a distinct lack of information in this post.

>Hi,
>
>I tried in a couple of ways to get something out of the serial console
>while booting (U-Boot, kernel, console,..)
>
Which Beagle are you using?

>This seems extremely unstable and random.

What results have you obtained that cause you to make that statement.
Presuming you are wired properly to the board, and configured the USB side
for the serial bit rate*, anything the board sends on the UART should be
available via the virtual serial port on the USB side.

>
>One device I tried is this[1] with 3.3V.
>
>Another device is this[2].
>
>Can you please advise which serial adapter to use?
>

Given how most computers have been dropping RS-232 connections, #2
seems to be an exercise in futility -- You have a 3.3V TTL UART being
converted to full 9-pin RS-232, only to then need an RS-232 to USB adapter
to connect to modern computers.



* The USB protocol itself does not care about bit-rate -- it works in USB
speed packets. However, the chip-set on the adapter needs to be told what
bit-rate the far end is sending...


--
Dennis L Bieber

Robert Berger

unread,
Dec 20, 2020, 5:15:08 PM12/20/20
to beagl...@googlegroups.com, Dennis Lee Bieber
Hi,

My comments are in-line.

On 20/12/2020 22:54, Dennis Lee Bieber wrote:
> On Sat, 19 Dec 2020 02:16:56 -0800 (PST), in
> gmane.comp.hardware.beagleboard.user "robert.berger"
> <robert.karl.berger-R...@public.gmane.org> wrote:
>
> There is a distinct lack of information in this post.
>
>> Hi,
>>
>> I tried in a couple of ways to get something out of the serial console
>> while booting (U-Boot, kernel, console,..)
>>
> Which Beagle are you using?

Pocketbeagle

I posted it under "pocketbeagle" and thought that would be more obvious,
but it does not seem to be.

>
>> This seems extremely unstable and random.
>
> What results have you obtained that cause you to make that statement.

screen /dev/ttyUSB4 115200

From "nothing" to some gibberisch (non ASCII characters, sometimes some
ASCII characters)

after the board is booted screen /dev/ttyACM0 115200 works fine, but
that's NOT what I want.

> Presuming you are wired properly to the board,

That could be one problem, I guess, hence I am searching for a device
which might work, as already indicated in another reply and the docs[3][4]

[3] https://shop.mikroe.com/ftdi-click
[4]
https://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_TTL-232R_RPi.pdf

I wired

Board Adapter

Txd Rxd
Rxd Txd
GND GND

For the RS232 solution I also added 3.3V.

I don't dare to switch from 3.3 to 5V, since this could cause damage.

> and configured the USB side
> for the serial bit rate*, anything the board sends on the UART should be
> available via the virtual serial port on the USB side.

Not really everything the board sends. Out of the box only stuff from
the time the "virtual" serial port starts.

I see the "virtual" serial port, but I would like to see the "console"
output starting from the first line of MLO.

debian@beaglebone:~$ cat /proc/cmdline
console=ttyO0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait
coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100
quiet

I am also a bit confused about the ttyO0, although there is also a ttyS0;)

So I am not sure which one is supposed to be the "real" serial.

>
>>
>> One device I tried is this[1] with 3.3V.
>>
>> Another device is this[2].
>>
>> Can you please advise which serial adapter to use?
>>
>
> Given how most computers have been dropping RS-232 connections, #2
> seems to be an exercise in futility -- You have a 3.3V TTL UART being
> converted to full 9-pin RS-232, only to then need an RS-232 to USB adapter
> to connect to modern computers.

Not really.

1) Quite a few boards have TTL or real RS-232 outputs. So why go to USB
and not directly to good old RS-232?

2) I have a board farm and console servers with RS-232 connectors (RJ45
connectors with RS232 signals), which would be my preferred solution.

Unfortunately some newer boards only have USB connectors. Those I
connect via USB cables to USB hubs. But in any case I would like to see
the complete boot log (from MLO) and not just when the kernel is available.

>
>
>
> * The USB protocol itself does not care about bit-rate -- it works in USB
> speed packets. However, the chip-set on the adapter needs to be told what
> bit-rate the far end is sending...
>
>

Regards,

Robert

jonnymo

unread,
Dec 20, 2020, 6:05:52 PM12/20/20
to Beagle Board
Looking at the post from Google GMail, it does not specify what board the post is from.  It just says Beagle Board.

Are you trying to connect  directly to the PB via serial or are you using something like a FTDI interface to communicate to via serial?  Assuming you are using some sort of Linux host,  if you type 'dmesg' it should tell you what tty device enumerated for the interface. 

Also, have you set the 'udev' entries on your host for the BeagleBoard device?
Ex  See the "mkudevrule.sh" script from the following link:



Jon

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Robert Berger

unread,
Dec 20, 2020, 6:21:12 PM12/20/20
to beagl...@googlegroups.com, jonnymo
Hi,

My comments are in-line.

On 21/12/2020 01:05, jonnymo wrote:
> Looking at the post from Google GMail, it does not specify what board
> the post is from.  It just says Beagle Board.

Yes it's not obvious:

https://groups.google.com/forum/embed/?place=forum/beagleboard#!category-topic/beagleboard/pocketbeagle/omDhIBOeRYo

^^^^^^^^^^^^

>
> Are you trying to connect  directly to the PB via serial or are you
> using something like a FTDI interface to communicate to via serial?

I tried with this[1] and this[2]
> Assuming you are using some sort of Linux host,  if you type 'dmesg' it
> should tell you what tty device enumerated for the interface.

Yes of course.

>
> Also, have you set the 'udev' entries on your host for the BeagleBoard
> device?

No. Why would I do that?

The USB to serial device is /dev/ttyUSB4.

The virtual USB device shows up.

> Ex  See the "mkudevrule.sh" script from the following link:
> https://beagleboard.org/getting-started
>
>
>
> Jon

Regards,

Robert

>
> On Sun, Dec 20, 2020 at 2:15 PM Robert Berger
> <robert.ka...@gmail.com <mailto:robert.ka...@gmail.com>> wrote:
>
> Hi,
>
> My comments are in-line.
>
> On 20/12/2020 22:54, Dennis Lee Bieber wrote:
> > On Sat, 19 Dec 2020 02:16:56 -0800 (PST), in
> > gmane.comp.hardware.beagleboard.user "robert.berger"
> > <robert.karl.berger-R...@public.gmane.org
> <mailto:robert.karl.berger-R...@public.gmane.org>>
> <mailto:beagleboard%2Bunsu...@googlegroups.com>.
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "BeagleBoard" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/beagleboard/omDhIBOeRYo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> beagleboard...@googlegroups.com
> <mailto:beagleboard...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/CAG99bko4GrCfWn78BySwK64XBBtaeqdLGs7LkHS4WG_Ky%2B0Ctw%40mail.gmail.com
> <https://groups.google.com/d/msgid/beagleboard/CAG99bko4GrCfWn78BySwK64XBBtaeqdLGs7LkHS4WG_Ky%2B0Ctw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Gwen Stouthuysen

unread,
Dec 21, 2020, 2:59:50 AM12/21/20
to beagl...@googlegroups.com
I notice some alignment issues on the answers with respect to the original question: 

The OR want's to see the first output of a booting beagleboard (pocketbeagle here), not the port that is channeled over USB when the OS is up.

I have had an analogous issue a while ago when I was confronted with a boot issue on a device.
I discovered that the serial parameters differ from how the power is applied to the board: when using a direct USB connection with a host PC the serial interface functioned as described.
When using a USB power supply or the 5V power input the serial parameters are different, I saw data coming in, but could not read them.

Robert explained this is due a TI issue deep in the MPU, it has no relation to the OS upgrade we were trialling, so I left it there.

My advice: dive into the TI documentation on the serial port and see what parameters TI gives it when it is unconfigured from the host.

On the serial adapter: I use any serial adapter I can put my hands on, mostly ST Nucleo boards (they have a nice serial port on the programmer)
I recently discovered that windows has altered it's USB to Serial adapter support and doesn't install the supporting drivers anymore out of the box for the adapters I use in my classes.
It baffled me, as last year I gave the devices to the students and I had no issues. This year it only worked out of the box on those that use Linux (which is limited for fresh students, they will move over in the coming months 😉 ).
I had to download the driver and make them install it prior to being able to use the adapters.

Regards,
Gwen

Op ma 21 dec. 2020 om 00:21 schreef Robert Berger <robert.ka...@gmail.com>:
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/afb96119-edbf-3cf0-3b69-df8c55cc6e22%40gmail.com.

Dennis Lee Bieber

unread,
Dec 21, 2020, 3:23:11 PM12/21/20
to Beagleboard
On Mon, 21 Dec 2020 00:14:47 +0200, in gmane.comp.hardware.beagleboard.user
Robert Berger <robert.karl.berger-R...@public.gmane.org>
wrote:


>
>Pocketbeagle
>
>I posted it under "pocketbeagle" and thought that would be more obvious,
>but it does not seem to be.
>

I read via gmane's NNTP server where things are just

Newsgroups: gmane.comp.hardware.beagleboard.user

I don't see any sub-categories.

(I used to reply via gmane also, but a year or so ago something
glitched and my replies began to bounce. I now have to remember to use
"reply via email" and change the To: address to Beagleboard
<beagl...@googlegroups.com>)


>>
>>> This seems extremely unstable and random.
>>
>> What results have you obtained that cause you to make that statement.
>
>screen /dev/ttyUSB4 115200
>
> From "nothing" to some gibberisch (non ASCII characters, sometimes some
>ASCII characters)
>
>after the board is booted screen /dev/ttyACM0 115200 works fine, but
>that's NOT what I want.
>

Both of those are host side references -- I'm on Windows so can't
really help, though if there is an option to ensure 8N1 that might be
useful.

>Board Adapter
>
>Txd Rxd
>Rxd Txd
>GND GND
>

Which board PINS? {Just for verification}

>
>Not really everything the board sends. Out of the box only stuff from
>the time the "virtual" serial port starts.
>
There is no "virtual" serial port on the beagle side. Virtual serial
ports exist on the host side of a USB adapter, and since the adapter is
powered from the host computer, it should be available as soon as the host
enumerates the port. This is not dependent on having connections on the
3.3V TTY lines (I just hung a FTDI RS232 [one with a DB-9 connector, so has
much higher voltages:
https://www.amazon.com/Gearmo-RS-232-Adapter-Indicators-Windows/dp/B00AHYJWWG/ref=redir_mobile_desktop?ie=UTF8&aaxitk=qFyAraevFSYJRhyMvpzZ6g&hsa_cr_id=6549072620501&ref_=sbx_be_s_sparkle_mcd_asin_0
] off a USB port on my monitor, and am able to configure it without having
anything on the DB-9 side -- I do have the Adafruit [I think] FTDI board,
but have never used it; besides BeagleBone Black routes the boot console to
a set of dedicated debug pins, not the regular jumpers).

>I see the "virtual" serial port, but I would like to see the "console"
>output starting from the first line of MLO.

Until u-boot configures the console UART parameters, there should be
nothing available. The UART is a hardware serial port, nothing "virtual" on
that side.

>
>debian@beaglebone:~$ cat /proc/cmdline
>console=ttyO0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait
>coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100
>quiet
>

Interesting -- my BBB cmdline includes a clause for the capemgr:
bone_capemgr.uboot_capemgr_enabled=1

>I am also a bit confused about the ttyO0, although there is also a ttyS0;)

ttyOx was the older TI "OMAP" serial ports, newer kernels replace them
with ttySx. From dmesg (so Linux stage) on a BeagleBone Black:

[ 0.002772] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[ 0.002776] This ensures that you still see kernel messages. Please
[ 0.002780] update your kernel commandline.

{later}

[ 0.991655] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
[ 0.994459] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30,
base_baud = 3000000) is a 8250
[ 1.004605] console [ttyS0] enabled
[ 1.005573] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 31,
base_baud = 3000000) is a 8250
[ 1.006394] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 32,
base_baud = 3000000) is a 8250
[ 1.007214] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 33,
base_baud = 3000000) is a 8250
[ 1.008252] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 34,
base_baud = 3000000) is a 8250
[ 1.009041] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 35,
base_baud = 3000000) is a 8250

Once the kernel is booted, the ttyOx devices are links to the ttySx
devices.

lrwxrwxrwx 1 root root 5 Dec 11 13:48 /dev/ttyO0 -> ttyS0
lrwxrwxrwx 1 root root 5 Dec 11 13:48 /dev/ttyO1 -> ttyS1
lrwxrwxrwx 1 root root 5 Dec 11 13:48 /dev/ttyO2 -> ttyS2
lrwxrwxrwx 1 root root 5 Dec 11 13:48 /dev/ttyO3 -> ttyS3
lrwxrwxrwx 1 root root 5 Dec 11 13:48 /dev/ttyO4 -> ttyS4
lrwxrwxrwx 1 root root 5 Dec 11 13:48 /dev/ttyO5 -> ttyS5
crw--w---- 1 root tty 4, 64 Dec 11 13:48 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 Dec 11 13:48 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 Dec 11 13:48 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 Dec 11 13:48 /dev/ttyS3
crw-rw---- 1 root dialout 4, 68 Dec 11 13:48 /dev/ttyS4
crw-rw---- 1 root dialout 4, 69 Dec 11 13:48 /dev/ttyS5
debian@beaglebone:~$

{Not sure why they show December 11 -- unless that is the last time I'd
booted the board, and the device entries are created before NTP reset the
time}

>Not really.
>
>1) Quite a few boards have TTL or real RS-232 outputs. So why go to USB
>and not directly to good old RS-232?

My point was that many modern host computers have dropped RS-232 ports.
(heck, neither my decade old laptop, and my nearly as old desktop have
RS-232 ports native) This means that, to use an RS-232 connection, requires
one to have a USB<>RS-232 adapter in the system. So having such a cable on
the host computer, and then using an RS-232<>TTL adapter on the Beagle, is
just adding complications -- especially as the latter adapter likely needs
to be powered by the Beagle. Just use a USB<>TTL adapter
https://www.adafruit.com/product/954 and avoid the voltage shifting (3.3V
TTL -> +/- 12V RS-232 -> 5V USB)


>Unfortunately some newer boards only have USB connectors. Those I
>connect via USB cables to USB hubs. But in any case I would like to see
>the complete boot log (from MLO) and not just when the kernel is available.
>

Unless MLO output is considered part of u-boot, it may not have console
output. I confess I'm not cognizant of how the boot files are made and what
the difference is between MLO and u-boot.


--
Dennis L Bieber

Stuart Longland

unread,
Dec 27, 2020, 8:20:53 PM12/27/20
to beagl...@googlegroups.com
On 21/12/20 8:14 am, Robert Berger wrote:
> I posted it under "pocketbeagle" and thought that would be more obvious,
> but it does not seem to be.

I think it fair to say, this is only visible to those who read the
mailing list via its web interface.

Those of us who read the mailing list via their own email clients, or
via NNTP services like GMane, do not see this information.

Complaints to sup...@googlegroups.com -- we didn't write the software.
--
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
...it's backed up on a tape somewhere.

Stuart Longland

unread,
Dec 27, 2020, 8:24:08 PM12/27/20
to beagl...@googlegroups.com
On 21/12/20 5:59 pm, Gwen Stouthuysen wrote:
> I have had an analogous issue a while ago when I was confronted with a boot
> issue on a device.
> I discovered that the serial parameters differ from how the power is
> applied to the board: when using a direct USB connection with a host PC the
> serial interface functioned as described.
> When using a USB power supply or the 5V power input the serial parameters
> are different, I saw data coming in, but could not read them.

I wonder if it uses 9600 baud somewhere as a default? Pretty common
serial baud rate for consoles.

Might be worth putting an oscilloscope or logic analyser on the TxD pin
and measuring what the bit period is, maybe see if there are 8 logical
"bits" between the start bit (logic 0) and stop bit (logic 1) or see if
there's a 9th bit somewhere?
Reply all
Reply to author
Forward
0 new messages