You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
StamPLC: boot_option=2 ("only network setup") never connects Wi-Fi because PoEStamPLC() is created unconditionally #116
In m5stack/modules/startup/__init__.py, _connect_network_only() instantiates the PoE Ethernet driver for StamPLC regardless of net_mode:
def_connect_network_only(board_id, net_mode, ssid, pswd):
startup=Startup(network_type=net_mode)
lan_if=Noneifboard_id==M5.BOARD.M5Unit_PoEP4:
fromdriver.ip101griimportIP101GRIlan_if=IP101GRI(mdc_pin=31, mdio_pin=52, power_pin=51)
elifboard_id==M5.BOARD.M5StamPLC:
fromstamplcimportPoEStamPLClan_if=PoEStamPLC() # raises OSError when the PoE module is absentstartup.connect_network(ssid, pswd, lan_if)
Without the PoE module, PoEStamPLC() fails with esp_eth_driver_install failed (263 = ESP_ERR_TIMEOUT) and the exception propagates before connect_network() is reached, so Wi-Fi is never started. The startup menu path (boot_option = 1, startup/stamplc/__init__.py) only creates PoEStamPLC() when net_mode == "ETH", so it is not affected.
Expected
With net_mode = "WIFI", boot_option = 2 should start the Wi-Fi connection exactly like the startup menu does, whether or not a PoE module is attached.
Proposed fix
Create the PoE interface only when Ethernet is selected, matching the StamPLC startup menu:
elif board_id == M5.BOARD.M5StamPLC:
- from stamplc import PoEStamPLC- lan_if = PoEStamPLC()+ if net_mode == "ETH":+ from stamplc import PoEStamPLC+ lan_if = PoEStamPLC()
startup.connect_network(ssid, pswd, lan_if)
(Alternatively wrap PoEStamPLC() in try/except OSError and fall back to Wi-Fi.)
Workaround used meanwhile
Keep boot_option = 0 and start the connection from user code with the firmware's own class:
Status: host reproducer PASS, M5STACK_StamPLC firmware build PASS. No StamPLC test slot was available, so real-device boot_option=2 verification is NOT RUN.
Activity
m5agent commentedon Oct 10, 2026
Thanks for the detailed reproduction and proposed fix. I confirmed the control-flow failure against the real
startup/__init__.pyand opened #118.The fix keeps
PoEStamPLC()only fornet_mode == "ETH", so the WIFI path reachesconnect_network()instead of aborting before it.Verification record:
https://github.com/m5agent/agent-work-logs/blob/6367ac3cf17d3978ae18ca3aebf0c633b8f76b32/records/m5stack-github/2026-10-10-uiflow-issue-116-stamplc-wifi/README.md
Status: host reproducer PASS,
M5STACK_StamPLCfirmware build PASS. No StamPLC test slot was available, so real-deviceboot_option=2verification is NOT RUN.