Wi-Fi R-Mesh Programming Interface
Common
User Configuration File
Path:
{sdk}/component/soc/usrcfg/amebaxxx/ameba_wificfg.c
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
RNAT Parameters
User Configuration File
Path:
{sdk}/component/soc/usrcfg/amebaxxx/ameba_wificfg.c
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
Connect only to RNAT or its child nodes as parent. Set to 1 to enable
ap_sta_num
Max child nodes connectable when acting as RNAT. Currently supports up to 14 clients
Note
- When
wifi_user_config.ap_sta_num > 5, adjust memory layout as follows:Open
{sdk}/amebadplus_gcc_project/amebaDplus_layout.ldand modifyRAM_KM0_IMG2_SIZEfrom 96K to 116K to support 14 direct clients.#define RAM_KM0_IMG2_SIZE KBYTES(116)