Fix TCP receive: path table update + interface naming + 10Mbps bitrate

- Fix path table insert bug: C++ map::insert() silently fails when key
  exists (unlike Python dict[key]=value). Changed to erase()+insert() so
  updated paths (e.g. local TCP replacing stale LoRa) actually take effect.
- Add name parameter to TcpInterface constructor to give each instance a
  unique identity hash, fixing map collision between backbone and local
  TCP server interfaces.
- Set TCP interface bitrate to 10 Mbps (was 500 bps) so Transport
  correctly prefers TCP paths over LoRa when both exist.
- Add PRG button hold >5s white screen indicator for config portal.
- Boundary mode cull_path_table: evict backbone paths first, preserving
  local paths needed for inbound routing.
This commit is contained in:
James L
2026-02-22 20:28:13 -05:00
parent a746937390
commit 1cbed7afdf
5 changed files with 59 additions and 23 deletions

View File

@@ -472,6 +472,9 @@ void setup() {
// Load LoRa config from EEPROM so the portal can show current values
eeprom_conf_load();
// Load boundary config so the portal can show current/default values
boundary_load_config();
// Enter config mode if: first boot with no config, OR button-triggered reboot
bool need_config = boundary_needs_config();
bool config_requested = (boundary_config_request == BOUNDARY_CONFIG_MAGIC);
@@ -695,7 +698,8 @@ void setup() {
TCP_IF_MODE_SERVER,
boundary_state.ap_tcp_port,
"", // no target host for server mode
0
0,
"LocalTcpInterface"
);
local_tcp_rns_interface = local_tcp_interface_ptr;
local_tcp_rns_interface.mode(RNS::Type::Interface::MODE_ACCESS_POINT);