Skip to content

lua-howto: document the Administered bind storage mode - #549

Draft
MUSTARDTIGERFPV wants to merge 1 commit into
ExpressLRS:masterfrom
MUSTARDTIGERFPV:lua-administered-bindstorage
Draft

lua-howto: document the Administered bind storage mode#549
MUSTARDTIGERFPV wants to merge 1 commit into
ExpressLRS:masterfrom
MUSTARDTIGERFPV:lua-administered-bindstorage

Conversation

@MUSTARDTIGERFPV

Copy link
Copy Markdown
Member

The Bind Storage section lists Persistent, Volatile and Returnable, but not Administered. It is the fourth entry in the Lua selection (RXParameters.cpp, "Persistent;Volatile;Returnable;Administered") and in the WebUI binding panel, and it has shipped since 3.5.4.

What it does

Enforcement is in one place, EnterBindingMode() in rx_main.cpp:

// never enter binding mode if binding is supposed to only be administered through the web UI
if (config.GetBindStorage() == BINDSTORAGE_ADMINISTERED) {
    return;
}

Every route into bind mode goes through that function, so all of these are blocked:

Route Call site
Three power-cycle GetPowerOnCounter() >= 3
Automatic bind when unbound !OtaUidIsBound(UID)
Enter Bind Mode command RXEndpoint.cpp via EnterBindingModeSafely()
Bind button action registerButtonFunction(ACTION_BIND, ...)

The WebUI path is not gated. devWIFI.cpp only tests bind storage for Volatile and Returnable, so the WebUI remains the only way to change the binding.

The warning

An unbound receiver set to Administered will not bind over the air either, because the automatic bind path also goes through EnterBindingMode(). Recovery is the WebUI, or a UART re-flash if the WebUI cannot be reached. The added warning says so and suggests setting a Home WiFi network first.

Version

git tag --contains on both the original BINDSTORAGE_PERMANENT commit and the later rename to BINDSTORAGE_ADMINISTERED returns 3.5.4 as the first release containing them.

The Bind Storage section listed Persistent, Volatile and Returnable but
not Administered, which has shipped since 3.5.4. It is the fourth entry
in the Lua selection and in the WebUI binding panel.

Administered is enforced in EnterBindingMode(), which returns early when
it is selected. Every route into bind mode goes through that function,
so the Enter Bind Mode command, the bind button action, the three power
cycle method, and the automatic bind of an unbound receiver are all
blocked. The WebUI path is not gated, so it stays the only way to change
the binding.

Add a warning for the lockout case. An unbound receiver set to
Administered will not bind over the air, so the WebUI has to be
reachable or the receiver needs a UART re-flash.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant