Wi-Fi R-Mesh Programming Interface

Common

User Configuration File

The Wi-Fi User Configuration File contains the following R-Mesh-related parameters:

Parameter

Description

wtn_en

R-Mesh enable. Set to 1 to activate

wtn_strong_rssi_thresh

Node directly connects to AP if detected RSSI exceeds this threshold

wtn_father_refresh_timeout

Child node switches parent if no beacon received within this period (in ms)

wtn_child_refresh_timeout

Parent node removes child if no beacon received within this period (in ms)

wtn_max_node_num

Max nodes in R-Mesh network. Determines beacon window size: higher node count reduces window size and increases interval

wtn_max_refugee_num [1]

Maximum number of child nodes a root node can accept, i.e., the Root Node Capacity

  • [1] wtn_max_refugee_num is configured via ameba.py menuconfig: first enter CONFIG WIFI, check Enable R-mesh, then set Rmesh maximum refugee number.

RNAT Parameters

User Configuration File

The Wi-Fi User Configuration File contains the following R-NAT-related parameters:

Parameter

Description

wtn_rnat_en

R-Mesh NAT enable. Set to 1 to activate.

wtn_fixed_rnat_node

Force device as R-NAT node. Set to 1 to enable (effective only when wifi_user_config.wtn_rnat_en=1)

wtn_connect_only_to_rnat

Only select RNAT and the subordinate nodes of RNAT as the father node. Set to 1 to enable

ap_sta_num [1]

Max child nodes connectable when acting as RNAT.

  • [1] ap_sta_num is configured via ameba.py menuconfig: in the configuration interface, set SoftAP maximum station number under CONFIG WIFI. For details, refer to SoftAP Configuration.