Wi-Fi R-Mesh SDK Configuration

Obtain the SDK

SDK download: SDK Clone

Note

By default, the root node in SDK supports only 2 connections. To enable more connections, you can download the trail firmware (for flashing, please refer to Flashing Procedure ):

This firmware supports up to 4 child nodes under the root node and can be used together with the visualization tools Gravitation and MGravitation

You can also contact us to obtain the lib by following the steps below:

  1. Obtain the R-Mesh WLAN library (contact us)

  2. Replace lib_wifi_whc_ap.a at {sdk}/amebaxxx_gcc_project/project_km4/asdk/lib/application

  3. Replace lib_wifi_common.a, lib_wifi_fw.a, and lib_wifi_whc_np.a at {sdk}/amebaxxx_gcc_project/project_km0/asdk/lib/application

R-MESH Enable

  1. Execute ./menuconfig.py in {sdk}/amebadxxx_gcc_project and config like this:

----Connectivity config----
CONFIG WHC INTF  --->
CONFIG WIFI  --->
   ...
   [*]     Enable R-mesh
   [ ]         Enable R-NAT
   [ ]         Enable R-mesh Socket
   [ ]             Enable R-mesh OTA
...
  1. Open {sdk}/component/soc/usrcfg/amebaxxx/ameba_wificfg.c and set the following parameter:

wifi_user_config.wtn_en = 1;

For additional settings, please refer to Common

RNAT Enable

Note

  • Skip this step if RNAT functionality is not required.

  • Before enabling RNAT, you must first enable R-Mesh

  1. Open {sdk}/component/soc/usrcfg/amebaxxx/ameba_wificfg.c and set the following parameter:

wifi_user_config.wtn_rnat_en = 1;
  1. To designate the node as a permanent RNAT node, set this parameter:

wifi_user_config.wtn_fixed_rnat_node = 1;

Note

Required in current version as automatic RNAT selection is under development.

  1. Execute ./menuconfig.py in {sdk}/amebadxxx_gcc_project and config like this:

----Connectivity config----
CONFIG WHC INTF  --->
CONFIG WIFI  --->
   ...
   [*]     Enable R-mesh
   [*]         Enable R-NAT
   [ ]         Enable R-mesh Socket
   [ ]             Enable R-mesh OTA
...
CONFIG LWIP  --->
   [ ] Enable Fast DHCP
   [*] Enable NAT REPEATER
   [*] Enable LWIP NETCONN SEM PER THREAD
   [ ] Enable LWIP Debug
...

For additional RNAT settings, please refer to RNAT Parameters

Enable R-MESH Socket Feature

Execute ./menuconfig.py in {sdk}/amebadxxx_gcc_project and config like this:

----Connectivity config----
CONFIG WHC INTF  --->
CONFIG WIFI  --->
   ...
   [*]     Enable R-mesh
   [*]         Enable R-NAT
   [*]         Enable R-mesh Socket
   [ ]             Enable R-mesh OTA
...

Note

R-Mesh Socket option is required to work with the Gravitation tool. If you do not need the Gravitation tool in your actual use case, don’t set this.

Compilation and Flashing

Please refer to standard compilation procedures: Build Flow