[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #43604] lack of flow control on serial port

From: Peter Hazenberg
Subject: [bug #43604] lack of flow control on serial port
Date: Thu, 13 Nov 2014 21:36:00 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.120 Chrome/37.0.2062.120 Safari/537.36


                 Summary: lack of flow control on serial port
                 Project: GNU GRUB
            Submitted by: peetz0r
            Submitted on: Thu 13 Nov 2014 09:35:59 PM GMT
                Category: Terminal
                Severity: Major
                Priority: 5 - Normal
              Item Group: Feature Request
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: other
         Reproducibility: Every Time
         Planned Release: None



Version: 2.02~beta2-9ubuntu1
OS: Xubuntu 14.04.1 x86 (using their packages)

The serial port in Grub does not support Flow Control (either hardware or
software). I have connected a 1997 DEC VT510 serial terminal to a desktop
which happened to be old enough to have a serial port. using it from Linux
works great. I found out that this terminal really needs flow control, because
it displays gibberish when sending enough text fast enough (like scrolling
trough man pages) whenever flow control is disabled. Linux (agetty) and the
VT510 support flow control, so this issue doesn't really occur there.

Later, I decided that it was boring to look at an empty screen while booting
the computer. So I found out that it could display ascii art by using enough
echo commands in my grub config. So i edited /etc/grub.d/40_custom and added
everything. It seemed to mostly work, but after outputting 1/4th of the logo,
a few lines of gibberish would appear instead of the rest of the logo. Not

So I rearched for flow control settings. the 'serial' comamnd had options for
baud rate, word size, parity, and stop bits. but not flow control. Since there
is basically nothing else to check, I concluded that grub2 simply does not
support any kind of flow control. Not having flow control is okay when
connecting to TTL UART devices like the Raspberry Pi, but not when using
actual RS232 like old serial terminals.

When looking for a workaround, I first tried adding 'sleep' commands. Since
sleep only works with full seconds, adding sleep every line was too painfully
slow. Adding sleep every 8 lines or so worked but showing the ascii art logo
in chunks was ugly. Thebn I found out that the play command can also be used
as sleep, but it allows smaller durations. I now use 'play 5000 0 1) which
sleeps 1/5000th or 12ms after each line. I haven't tested smaller delays, as
it is fast enough the way it is now. It sleeps a total of less than 500ms and
it works perfectly fine. No gibberish on the terminal and no visible delays or
chunks in the output.

Here's a video of the end result with the workaround in place:

Attached is the relevant bit of my grub config.

But my workaround is mostly an ugly hack and it won't work when the user
actually needs real interaction on the terminal.

So the feature request is basically just flow control. Either hardware or
software (the VT510 supports both).


File Attachments:

Date: Thu 13 Nov 2014 09:35:59 PM GMT  Name:
grub-sk1llz-ascii-art-serial-config.txt  Size: 3kB   By: peetz0r
Attached is the relevant bit of my grub config.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]