Severity
High — wireless dongle pairing broken on fresh / reset configs
Location
library/HOJA-LIB-RP2040 (submodule)
- Gamepad default:
src/utilities/settings.c (~L92–93) sets wlan_dongle_key = 0 → SSID HOJA_WLAN_0000
- Gamepad join:
src/hal/rp2040/wlan_hal.c (~L117–118) uses gamepad_config->wlan_dongle_key
- Dongle host AP:
external/HOJA-LIB-DONGLE/dongle_host.c (~L333–344) ignores cfg->pin and always brings up DONGLE_DEFAULT_WLAN_SSID / DONGLE_DEFAULT_WLAN_PASSWORD (HOJA_WLAN_1234 / HOJA_1234)
Summary
On gamepad config version reset, WLAN key defaults to 0. The dongle host intentionally advertises the fixed 1234 defaults and does not use the configured pin. Fresh devices (or after a config version bump) will not associate with a default-PIN dongle until the user manually sets key 1234.
Comment in dongle_host.c says the gamepad pairs on the default, but the gamepad default is 0000, not 1234.
Impact
Out-of-box / after-reset WLAN dongle pairing fails until the user discovers and sets PIN 1234. Default credentials are also weak if left unchanged.
Suggested fix
Default wlan_dongle_key to 1234 to match DONGLE_DEFAULT_WLAN_*, and/or make dongle host AP use cfg->pin when provided.
Found by
Automated code review (Cursor cloud agent)
Severity
High — wireless dongle pairing broken on fresh / reset configs
Location
library/HOJA-LIB-RP2040(submodule)src/utilities/settings.c(~L92–93) setswlan_dongle_key = 0→ SSIDHOJA_WLAN_0000src/hal/rp2040/wlan_hal.c(~L117–118) usesgamepad_config->wlan_dongle_keyexternal/HOJA-LIB-DONGLE/dongle_host.c(~L333–344) ignorescfg->pinand always brings upDONGLE_DEFAULT_WLAN_SSID/DONGLE_DEFAULT_WLAN_PASSWORD(HOJA_WLAN_1234/HOJA_1234)Summary
On gamepad config version reset, WLAN key defaults to
0. The dongle host intentionally advertises the fixed1234defaults and does not use the configured pin. Fresh devices (or after a config version bump) will not associate with a default-PIN dongle until the user manually sets key1234.Comment in
dongle_host.csays the gamepad pairs on the default, but the gamepad default is0000, not1234.Impact
Out-of-box / after-reset WLAN dongle pairing fails until the user discovers and sets PIN 1234. Default credentials are also weak if left unchanged.
Suggested fix
Default
wlan_dongle_keyto1234to matchDONGLE_DEFAULT_WLAN_*, and/or make dongle host AP usecfg->pinwhen provided.Found by
Automated code review (Cursor cloud agent)