[syslinux] interacting with UART

Gene Cumm gene.cumm at gmail.com
Sun Aug 2 06:19:00 PDT 2015


On Sat, Aug 1, 2015 at 4:56 PM, Tal Lubko via Syslinux
<syslinux at zytor.com> wrote:
> Hi Geert
>
>
> Thanks for your help.
> What I'm planning to do is to write COM32 image that will open UART channel and wait for input (until timeout arrives).
> In case input arrives, it will parse and validate it and act accordingly.
> My solution doesn't involve user interaction.

You can always think of the UART as the "user".

> I've searched the page you've sent me and it talks about serial console and I'm not sure I can use it for my needs.

Creativity.

> So what I'd like to know is, does Syslinux supports UART in COM32 image?

There's two easy options in my opinion, depending on the data you're
feeding or can feed via the UART.

1) menu.c32 in serial mode.  Using the shortcut keys to select a label
then providing an <enter> keystroke, it'll work.  Set DEFAULT or
ONTIMEOUT, TIMEOUT, SERIAL, CONSOLE, and create LABELs with MENU
LABELs containing '^' for the shortcuts.

2) Custom COM32 with character-based read() calls to stdin, setting
stdin/stdout with the SERIAL and CONSOLE directives, with calls to
syslinux_run_command().

I'd recommend avoiding direct IO calls to the UART in a custom COM32.
It's generally unnecessary and embedding ASM looks pretty ugly and not
remotely portable.

-- 
-Gene


More information about the Syslinux mailing list