Skip to content

serial.open

since 1.1.0

Open a serial connection (only on TANDEM radios)

serial.open(name[, baudrate[, mode[, power]]])

Parameters

Name Type Required Description
name string yes
baudrate unsigned optional (default 57600)
mode string optional (default "8N1")
power boolean optional (default true)

Returns

the new serial connection

Examples

From the official Ethos documentation
local conn = serial.open("sport", 9600, "8N1")
print(conn:empty())
print(conn:read())
conn:write(...)
conn:flush()

Real-world usage

Called 1 times across 1 open-source Ethos Lua project. A few short excerpts:
SportConnection = serial.open("sport", SportInterfaceBandrate, "8N1", true)

lua/frsky/XAct/config/ui.lua:25