You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 70 Next »

Scope

Goal of this document helps RDK-B community to Port Unified-easy-mesh on to their Gateway/Extender platforms

Assumption

Test EM on Raspbian OS

Use cases

  • R5 Specification

  • ControllerAgent
    Banana Pi R4(RDK-B)Banana Pi R4(RDK-B)
    Banana Pi R4(RDK-B)RPI4(Raspbian)
    RPI4(Raspbian)Banana Pi R4(RDK-B)
  • R6 specification with Wi-Fi 7

Use case diagram


Generic Porting stages

  • Yocto support
  • New cli migration
  • Golang support
  • Segmentation faults fixing

Current state

  • Done

    • Brought up yocto support
    • Supported build configuration
    • Compiled EM code with legacy cli
    • Observerving segmentation faults due to yocto compiler being too strict about memory and stack
      • Fix #1 - https://github.com/rdkcentral/unified-wifi-mesh/commit/3fd8e4bac0b86c4a92f804791e318265fc78a6d5
      • Other crashes (Will retest the same in new cli)
        • <<OneWifiMeshCli>>: reset erouter0 bananapi encode_config_reset:354: {


        • void em_cmd_t::init(dm_easy_mesh_t *dm)
          {
              m_em_candidates = queue_create();
              m_data_model.init();
              m_data_model = *dm; //--------- segmentation fault only in RDK-B,Not in raspbian - pls refer - platform agnostic c++ code section
          }

        •  
        • (gdb) bt #0  0x0000000000417fb8 in em_cmd_t::init (this=this@entry=0x7f8b4b7010, dm=dm@entry=0x7f8b7fe690)     at ../../../git/src/ctrl/../../src/cmd/em_cmd.cpp:127 #1  0x0000000000418764 in em_cmd_t::em_cmd_t (this=0x7f8b4b7010, type=em_cmd_type_reset,     param=<error reading variable: Cannot access memory at address 0x7ffc9a6470>, dm=...)     at ../../../git/src/ctrl/../../src/cmd/em_cmd.cpp:703 Backtrace stopped: Cannot access memory at address 0x7ffc9a63f8

  • Ongoing

    • Golang support in RDK-B added
    • ongoing with latest cli in progress
      • Creating yocto recipe to compile cli go code from yocto
      • Will retest the crashes and update 

Next phase

  • Optimizing mariaDB - Target to keep size < 10 MB
  • Package Manager
  • Stripped onewifi for AP extender

Gateway specific steps

  • EasyMesh controller integration - On Going
  • Test with BPI R4 controller & RPI4 Agent - TBD
  • Test with with BPI R4 controller & BPI R4 agent - TBD

Extender specific steps

  • OSS image with SoC specific changes done
  • Integration of OneWifi on going
  • EasyMesh Agent - To start after Onewifi integration
  • Testing with RPI4 controller and BPI R4 Extender

Platform agnostic c++ coding

State machine

GoLang support for EM CLI

BPI-R4 build instruction 

Build
repo init -u https://code.rdkcentral.com/r/manifests -b kirkstone -m rdkb-bpi-extsrc.xml
repo sync -j`nproc` --no-clone-bundle
MACHINE=bananapi4-rdk-broadband FEATURE_TYPE=EasyMesh source meta-cmf-bananapi/setup-environment-refboard-rdkb
bitbake rdk-generic-broadband-image

Test EM on BPI R4

BPI Controller

Prerequisites :  (one time process)

  1. Setup mysql in BPI controller (One time process)
    DB Setup

    → Input command mysql in prompt, enter into mariadb console and execute the below commands


    CREATE USER 'bpi'@'localhost' IDENTIFIED BY 'root';
    ALTER USER 'bpi'@'localhost' IDENTIFIED BY 'root';
    GRANT ALL PRIVILEGES ON *.* TO 'bpi'@'localhost' IDENTIFIED BY 'root';
    FLUSH PRIVILEGES;
    SELECT User, Host, plugin FROM mysql.user;


    → Exit from mysql

  2. Once user is added in mysql, enter into prompt with root access.
    bpi root

    → Input command mysql -u bpi -p, password is root

  3. Create OneWifiMesh table in mariadb
    Creating database

    create database OneWifiMesh;
    → use OneWifiMesh;
    → show tables;                   ==> should show no tables

      
  4. Please have below content in /nvram/EasymeshCfg.json.
EasymeshCfg.json
{
	"AL_MAC_ADDR":	"a2:f0:d1:69:f5:ae",
	"Colocated_mode":	1,
	"Backhaul_SSID":	"mesh_backhaul",
	"Backhaul_KeyPassphrase":	"test-backhaul",
	"sta_4addr_mode_enabled":	true
}

5. Please have below content in /nvram/InterfaceMap.json

EasymeshCfg.json
{
    "PhyList": [
        {
            "Index": 0,
            "RadioList": [
                 {
                    "Index": 2,
                    "RadioName": "wifi2",
                    "InterfaceList": [
                        {
                            "InterfaceName": "wifi2",
                            "Bridge": "brlan0",
                            "vlanId": 0,
                            "vapIndex": 3,
                            "vapName": "private_ssid_6g"
                        }
                    ]
                },
                {
                    "Index": 1,
                    "RadioName": "wifi1",
                    "InterfaceList": [
                        {
                            "InterfaceName": "wifi1.1",
                            "Bridge": "brlan0",
                            "vlanId": 0,
                            "vapIndex": 2,
                            "vapName": "mesh_backhaul_5g"
                        },
                        {
                            "InterfaceName": "wifi1",
                            "Bridge": "brlan0",
                            "vlanId": 0,
                            "vapIndex": 1,
                            "vapName": "private_ssid_5g"
                        }
                        
                    ]
                },
                {
                    "Index": 0,
                    "RadioName": "wifi0",
                    "InterfaceList": [
                        {
                            "InterfaceName": "wifi0",
                            "Bridge": "brlan0",
                            "vlanId": 0,
                            "vapIndex": 0,
                            "vapName": "private_ssid_2g"
                        }
                    ]
                }
            ]
        }
    ]
}

6. Please have below content in /usr/ccsp/wifi/onewifi_pre_script.sh

onewifi_pre_script_ctrl
#!/bin/sh
sleep 5

#To update al_mac_addr in EasyMeshCfg.json to avoid onewifi restarting during fresh boot-up
#wan_mac="$(cat /sys/class/ieee80211/phy0/macaddress)"
old_al_mac_addr=`cat /nvram/EasymeshCfg.json | grep AL_MAC_ADDR  | cut -d '"' -f4`
#if [ "$old_al_mac_addr" == "00:00:00:00:00:00" ]; then
 # sed -i "s/$old_al_mac_addr/$wan_mac/g" /nvram/EasymeshCfg.json
#fi
ip link set dev brlan0 down   
brlan_mac=`ifconfig brlan0 | grep HWaddr | cut -d " " -f9`
mac_addr=$(echo $brlan_mac | tr -d ':')
mac_increment=$((0x$mac_addr + 1))
brlan_inc_mac=$(printf "%012x" $mac_increment | sed 's/../&:/g;s/:$//')
ip link set dev brlan0 address   a2:f0:d1:69:f5:ae
#ip link set dev brlan0 address  $brlan_inc_mac
sleep 1
ip link set dev brlan0 up
#sed -i "s/$old_al_mac_addr/$brlan_inc_mac/g" /nvram/EasymeshCfg.json
  

iw phy phy0 interface add wifi0 type __ap
iw phy phy0 interface add wifi1 type __ap
iw phy phy0 interface add wifi1.1 type __ap
iw phy phy0 interface add wifi2 type __ap
#iw phy phy0 interface add wifi2.1 type __ap

#Obtain the wifi0 mac address
wifi0_mac="$(cat /sys/class/ieee80211/phy0/macaddress)"
#Strip the : and increment mac by 1 to get wifi1 macaddress
mac=$(echo $wifi0_mac | tr -d ':')
mac_incr=$((0x$mac + 2))
wifi1_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
mac_incr=$(($mac_incr + 2))
wifi1_1_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
#Increment again by 1 to get wifi2 address
mac_incr=$(($mac_incr + 2))
wifi2_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
mac_incr=$(($mac_incr + 2))
wifi2_1_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
#print the mac address
echo $wifi0_mac
echo $wifi1_mac
echo $wifi2_mac

#Update the mac address using ip link command
ifconfig wifi0 down
ifconfig wifi1 down
ifconfig wifi1.1 down
ifconfig wifi2 down
ifconfig wifi2.1 down
ip link set dev wifi0 address $wifi0_mac
ip link set dev wifi1 address $wifi1_mac
ip link set dev wifi1.1 address $wifi1_1_mac
ip link set dev wifi2 address $wifi2_mac
ip link set dev wifi2.1 address $wifi2_1_mac
ifconfig wifi0 up
ifconfig wifi1 up
ifconfig wifi1.1 up
ifconfig wifi2 up
ifconfig wifi2.1 up

exit 0

7. Remove wifidb to be on safer side.

 rm /opt/secure/wifi/*


8. Restart OneWifi to take effect.

Restart services
systemctl restart onewifi

9. EM-Controller can be executed manually in new tab.

Running EM-Controller
cd /usr/ccsp/EasyMesh/
onewifi_em_ctrl bpi@root

NOTE: Controller log for the first time.

Controller log
root@Filogic-GW:/usr/ccsp/EasyMesh# onewifi_em_ctrl bpi@root
connect:169: user:bpi pass:root
load_tables:1558: data base empty ... needs reset
init:1958: Load operation failed, err: dm_orch_type_unknown
data_model_init:541: data model init failed
mgr_input_listen:290 Thread stack size = 8388608 bytes 
execute:56: Controller communication path: /tmp/onewifi_mesh_ctrl
mgr_nodes_listen:422 Thread stack size = 8388608 bytes 


10. Start onewifi_em_cli in a new tab.

Reset database like below. 

onewifi_em_cli bpi

/usr/ccsp/EasyMesh# onewifi_em_cli bpi


→ In the cli use "Tab" to move between Update, Apply and Cancel button in the cli, use keys "j" and "k" to scroll up and down
→ Select "Wifi Reset" and then select Update to update the window.
→ In the CollocatedAgentID update the Mac address of the brlan0(a2:f0:d1:69:f5:ae) which needs to be treated as AL MAC..
→ Select Apply to reset the database.

Change colocatedAgentID with brlan0 MAC address which needs to be treated as AL MAC

CLI screenshots given below.




11. Once AL MAC is set with brlan0 MAC address, check the ctrl prompt for database reset.
Sample log from EM-Controller

root@Filogic-GW:/usr/ccsp/EasyMesh# onewifi_em_ctrl bpi@root
connect:169: user:bpi pass:root
load_tables:1558: data base empty ... needs reset
init:1958: Load operation failed, err: dm_orch_type_unknown
data_model_init:541: data model init failed
mgr_input_listen:290 Thread stack size = 8388608 bytes 
execute:56: Controller communication path: /tmp/onewifi_mesh_ctrl
mgr_nodes_listen:422 Thread stack size = 8388608 bytes 
pre_process_orch_op:342: Deleting all data models
dm_network_list_t:update_db:167: Operation: dm_orch_type_db_insert
create_data_model:1502: Created data model for net_id: OneWifiMesh mac: a2:f0:d1:69:f5:ae, coloc:1
create_data_model:1522: Number of policies: 6
create_data_model:1539: Putting data model at key: OneWifiMesh@a2:f0:d1:69:f5:ae
start_complete:847 Collocated agent ID: a2:f0:d1:69:f5:ae publish  fail
init_network_topology:1925: Root: a2:f0:d1:69:f5:ae  added to network topology
update_tables:1721: Op Class[0] ruid: a2:f0:d1:69:f5:ae	Type: 7	Class: 81
update_tables:1721: Op Class[1] ruid: a2:f0:d1:69:f5:ae	Type: 7	Class: 115
update_tables:1721: Op Class[2] ruid: a2:f0:d1:69:f5:ae	Type: 7	Class: 135
update_tables:1721: Op Class[3] ruid: a2:f0:d1:69:f5:ae	Type: 8	Class: 81
update_tables:1721: Op Class[4] ruid: a2:f0:d1:69:f5:ae	Type: 8	Class: 115
update_tables:1721: Op Class[5] ruid: a2:f0:d1:69:f5:ae	Type: 8	Class: 135
analyze_config_renew:98: Radio: 00:00:00:00:00:00
../../../git/src/ctrl/../../src/dm/dm_network_ssid.cpp:205:85: runtime error: load of value 50462976, which is not a valid value for type 'em_haul_type_t'
../../../git/src/ctrl/../../src/dm/dm_network_ssid.cpp:200:71: runtime error: load of value 48, which is not a valid value for type 'bool'


Screenshot from database: Respective rows are updated in db


12. Run local Agent manually with below command in new tab.

cd /usr/ccsp/EasyMesh/
onewifi_em_agent

Workaround: Initially, EM-Agent and EM-Contrller processes will not be in sync .  Need to do restart the both EM-Agent and EM-Controller processes for 1st time alone.

killall onewifi_em_agent
killall onewifi_em_ctrl

Re-run EM-Controller in controller tab.

Re-run EM-Agent in Agent tab.

Observation in EM-Contrller device side:  

  • All configured VAPs should be UP and Running
  • VAPs should be broadcasting EasyMesh default SSIDs(eg, private_ssid, mesh_backhaul)

Extender1

Prerequisites - One Time Process

  1. Delete the dnsmasq binary.
rm /usr/bin/dnsmasq

2. Remove default gw entry from routing table since WAN access will be through backhaul connection.

route del default gw

3. Copy below content to /nvram/EasymeshCfg.json file.

Extender1 EasymeshCfg.json
 {
	"AL_MAC_ADDR":	"00:0c:43:26:60:1b",
	"Colocated_mode":	0,
	"Backhaul_SSID":	"mesh_backhaul",
	"Backhaul_KeyPassphrase":	"test-backhaul",
    "sta_4addr_mode_enabled": true 
}

4. Copy below content to /nvram/InterfaceMap.json file.

Extender1 InterfaceMap.json
{
    "PhyList": [
        {
            "Index": 0,
            "RadioList": [
                 {
                    "Index": 2,
                    "RadioName": "wifi2",
                    "InterfaceList": [
                        {
                            "InterfaceName": "wifi2",
                            "Bridge": "brlan0",
                            "vlanId": 0,
                            "vapIndex": 4,
                            "vapName": "private_ssid_6g"
                        }
                    ]
                },
                {
                    "Index": 1,
                    "RadioName": "wifi1",
                    "InterfaceList": [
                        {
                            "InterfaceName": "wifi1.1",
                            "Bridge": "brlan0",
                            "vlanId": 0,
                            "vapIndex": 3,
                            "vapName": "mesh_sta_5g"
                        },
                        {
                            "InterfaceName": "wifi1",
                            "Bridge": "brlan0",
                            "vlanId": 0,
                            "vapIndex": 2,
                            "vapName": "private_ssid_5g"
                        }
                        
                    ]
                },
                {
                    "Index": 0,
                    "RadioName": "wifi0",
                    "InterfaceList": [
                        {
                            "InterfaceName": "wifi0.1",
                            "Bridge": "brlan0",
                            "vlanId": 0,
                            "vapIndex": 1,
                            "vapName": "mesh_backhaul_2g"
                        },
                        {
                            "InterfaceName": "wifi0",
                            "Bridge": "brlan0",
                            "vlanId": 0,
                            "vapIndex": 0,
                            "vapName": "private_ssid_2g"
                        }
                    ]
                }
            ]
        }
    ]
}

5. Copy below content to /usr/ccsp/wifi/onewifi_pre_script.sh.

Extender1 onewifi_pre_script.sh
#!/bin/sh
sleep 5

#To update al_mac_addr in EasyMeshCfg.json to avoid onewifi restarting during fresh boot-up
#wan_mac="$(cat /sys/class/ieee80211/phy0/macaddress)"
#old_al_mac_addr=`cat /nvram/EasymeshCfg.json | grep AL_MAC_ADDR  | cut -d '"' -f4`
#if [ "$old_al_mac_addr" == "00:00:00:00:00:00" ]; then
#  sed -i "s/$old_al_mac_addr/$wan_mac/g" /nvram/EasymeshCfg.json
#fi  

iw phy phy0 interface add wifi0 type __ap
iw phy phy0 interface add wifi0.1 type __ap
iw phy phy0 interface add wifi1 type __ap
iw phy phy0 interface add wifi2 type __ap
iw phy phy0 interface add wifi1.1 type __ap
#iw phy phy0 interface add wifi2.1 type __ap

#Obtain the wifi0 mac address
wifi_mac="$(cat /sys/class/ieee80211/phy0/macaddress)"
#Strip the : and increment mac by 1 to get wifi1 macaddress
mac=$(echo $wifi_mac | tr -d ':')
mac_incr=$((0x$mac + 8))
wifi0_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
#Increment again by 1 to get wifi2 address
mac_incr=$(($mac_incr + 1))
wifi0_1_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
#Increment again by 1 to get wifi2 address
mac_incr=$(($mac_incr + 1))
wifi1_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
mac_incr=$(($mac_incr + 1))
wifi1_1_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
mac_incr=$(($mac_incr + 1))
wifi2_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
#print the mac address
echo $wifi0_mac
echo $wifi1_mac
echo $wifi2_mac

#Update the mac address using ip link command
ifconfig wifi0 down
ifconfig wifi0.1 down
ifconfig wifi1 down
ifconfig wifi1.1 down
ifconfig wifi2 down
ip link set dev wifi0 address $wifi0_mac
ip link set dev wifi0.1 address $wifi0_1_mac
ip link set dev wifi1 address $wifi1_mac
ip link set dev wifi1.1 address $wifi1_1_mac
ip link set dev wifi2 address $wifi2_mac
ifconfig wifi0 up
ifconfig wifi1 up
ifconfig wifi1.1 up
ifconfig wifi2 up

exit 0

6. Remove default onewifi db from /opt/secure/wifi to be on safer side.

rm /opt/secure/wifi/*.db

7. Restart OneWifi

systemctl restart onewifi

8. Ensure mesh backhaul connectivity is established over 5G through wifi1.1 interface.

iw dev wifi1.1 info

9. Verify mesh backhaul connection in EM-Contrller side as well.

iw dev wifi1.1.sta info
iw dev wifi1.1.sta station dump ## This command gives information on connected client ie Extender1.

10. Upon successful backhaul connectivity, run EM-Agent in Extender1 in new tab.

Extender1 Agent
cd /usr/ccsp/EasyMesh/
onewifi_em_agent


11. Wait for few minutes( for Agent to propagate SSID information from Controller to OneWifi in Extender1) and then check

  • Check all configured VAPs should be up and running with "iw dev" command
  • VAPs should be broadcasting default EasyMesh SSIDS (ie private_ssid, mesh_backhaul)

12. Set static IP for brlan0 interface in Extender1

ifconfig brlan0 10.0.0.215 netmask 255.255.255.0 up

13. Test the connectivity to EM-Controller through backhaul

ping 10.0.0.1 -c 5

Extender2 (For Daisy-Chain topology)

Prerequisites - One Time Process

  1. Delete the dnsmasq binary.
rm /usr/bin/dnsmasq

2. Remove default gw entry from routing table since WAN access will be through backhaul connection.

route del default gw

3. Copy below content to /nvram/EasymeshCfg.json file.

Extender2 EasymeshCfg.json
{
	"AL_MAC_ADDR":	"00:0c:43:26:60:21",
	"Colocated_mode":	0,
	"Backhaul_SSID":	"mesh_backhaul",
	"Backhaul_KeyPassphrase":	"test-backhaul",
        "sta_4addr_mode_enabled": true
}

4. Copy below content to /nvram/InterfaceMap.json file.

Extender2 InterfaceMap.json
 {
    "PhyList": [
        {
            "Index": 0,
            "RadioList": [
                 {
                    "Index": 2,
                    "RadioName": "wifi2",
                    "InterfaceList": [
                        {
                            "InterfaceName": "wifi2",
                            "Bridge": "brlan0",
                            "vlanId": 0,
                            "vapIndex": 3,
                            "vapName": "private_ssid_6g"
                        }
                    ]
                },
                {
                    "Index": 1,
                    "RadioName": "wifi1",
                    "InterfaceList": [
                        {
                            "InterfaceName": "wifi1",
                            "Bridge": "brlan0",
                            "vlanId": 0,
                            "vapIndex": 2,
                            "vapName": "private_ssid_5g"
                        }
                        
                    ]
                },
                {
                    "Index": 0,
                    "RadioName": "wifi0",
                    "InterfaceList": [
                        {
                            "InterfaceName": "wifi0.1",
                            "Bridge": "brlan0",
                            "vlanId": 0,
                            "vapIndex": 1,
                            "vapName": "mesh_sta_2g"
                        },
                        {
                            "InterfaceName": "wifi0",
                            "Bridge": "brlan0",
                            "vlanId": 0,
                            "vapIndex": 0,
                            "vapName": "private_ssid_2g"
                        }
                    ]
                }
            ]
        }
    ]
}

5. Copy below content to /usr/ccsp/wifi/onewifi_pre_script.sh.

Extender2 onewifi_pre_script.sh
 #!/bin/sh
sleep 5

#To update al_mac_addr in EasyMeshCfg.json to avoid onewifi restarting during fresh boot-up
#wan_mac="$(cat /sys/class/ieee80211/phy0/macaddress)"
#old_al_mac_addr=`cat /nvram/EasymeshCfg.json | grep AL_MAC_ADDR  | cut -d '"' -f4`
#if [ "$old_al_mac_addr" == "00:00:00:00:00:00" ]; then
#  sed -i "s/$old_al_mac_addr/$wan_mac/g" /nvram/EasymeshCfg.json
#fi  

iw phy phy0 interface add wifi0 type __ap
iw phy phy0 interface add wifi0.1 type __ap
iw phy phy0 interface add wifi1 type __ap
iw phy phy0 interface add wifi2 type __ap

#Obtain the wifi0 mac address
wifi_mac="$(cat /sys/class/ieee80211/phy0/macaddress)"
#Strip the : and increment mac by 1 to get wifi1 macaddress
mac=$(echo $wifi_mac | tr -d ':')
mac_incr=$((0x$mac + 16))
wifi0_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
mac_incr=$(($mac_incr + 1))
wifi0_1_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
mac_incr=$(($mac_incr + 1))
wifi1_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
#Increment again by 1 to get wifi2 address
mac_incr=$(($mac_incr + 1))
wifi2_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
#print the mac address
echo $wifi0_mac
echo $wifi0_1_mac
echo $wifi1_mac
echo $wifi2_mac

#Update the mac address using ip link command
ifconfig wifi0 down
ifconfig wifi0.1 down
ifconfig wifi1 down
ifconfig wifi2 down
ip link set dev wifi0 address $wifi0_mac
ip link set dev wifi0.1 address $wifi0_1_mac
ip link set dev wifi1 address $wifi1_mac
ip link set dev wifi2 address $wifi2_mac
ifconfig wifi0 up
ifconfig wifi1 up
ifconfig wifi2 up

exit 0

6. Remove default onewifi db from /opt/secure/wifi to be on safer side.

rm /opt/secure/wifi/*.db

7. Restart OneWifi

systemctl restart onewifi

8. Ensure mesh backhaul connectivity is established over 2.4G through wifi0.1 interface.

iw dev wifi0.1 info

9. Verify mesh backhaul connection in Extender1 side as well.

iw dev wifi0.1.sta info
iw dev wifi0.1.sta station dump ## This command gives information on connected client ie Extender2.

10. Upon successful backhaul connectivity, run EM-Agent in Extender2 in new tab.

Extender2 Agent
cd /usr/ccsp/EasyMesh/
onewifi_em_agent

11. Wait for few minutes( for Agent to propagate SSID information from Controller to OneWifi in Extender2) and then check

  • Check all configured VAPs should be up and running with "iw dev" command
  • VAPs should be broadcasting default EasyMesh SSIDS (ie private_ssid, mesh_backhaul)

12. Set static IP for brlan0 interface in Extender2

ifconfig brlan0 10.0.0.210 netmask 255.255.255.0 up

13. Test the connectivity to EM-Controller through backhaul

ping 10.0.0.1 -c 5


Test the wireless client connectivity



Extender2 (For Star Topology)

Prerequisites - One Time Process

  1. Delete the dnsmasq binary.
rm /usr/bin/dnsmasq

2. Remove default gw entry from routing table since WAN access will be through backhaul connection.

route del default gw

3. Copy below content to /nvram/EasymeshCfg.json file.

Extender2 EasymeshCfg.json
{
	"AL_MAC_ADDR":	"00:0c:43:26:60:2a",
	"Colocated_mode":	0,
	"Backhaul_SSID":	"mesh_backhaul",
	"Backhaul_KeyPassphrase":	"test-backhaul",
    "sta_4addr_mode_enabled": true 
}

4. Copy below content to /nvram/InterfaceMap.json file.

Extender2 InterfaceMap.json
 {
    "PhyList": [
        {
            "Index": 0,
            "RadioList": [
                 {
                    "Index": 2,
                    "RadioName": "wifi2",
                    "InterfaceList": [
                        {
                            "InterfaceName": "wifi2",
                            "Bridge": "brlan0",
                            "vlanId": 0,
                            "vapIndex": 3,
                            "vapName": "private_ssid_6g"
                        }
                    ]
                },
                {
                    "Index": 1,
                    "RadioName": "wifi1",
                    "InterfaceList": [
                        {
                            "InterfaceName": "wifi1.1",
                            "Bridge": "brlan0",
                            "vlanId": 0,
                            "vapIndex": 2,
                            "vapName": "mesh_sta_5g"
                        },
                        {
                            "InterfaceName": "wifi1",
                            "Bridge": "brlan0",
                            "vlanId": 0,
                            "vapIndex": 1,
                            "vapName": "private_ssid_5g"
                        }
                        
                    ]
                },
                {
                    "Index": 0,
                    "RadioName": "wifi0",
                    "InterfaceList": [
                        {
                            "InterfaceName": "wifi0",
                            "Bridge": "brlan0",
                            "vlanId": 0,
                            "vapIndex": 0,
                            "vapName": "private_ssid_2g"
                        }
                    ]
                }
            ]
        }
    ]
}

5. Copy below content to /usr/ccsp/wifi/onewifi_pre_script.sh.

Extender2 onewifi_pre_script.sh
#!/bin/sh
sleep 5

iw phy phy0 interface add wifi0 type __ap
iw phy phy0 interface add wifi1 type __ap
iw phy phy0 interface add wifi2 type __ap
iw phy phy0 interface add wifi1.1 type __ap


#Obtain the wifi0 mac address
wifi_mac="$(cat /sys/class/ieee80211/phy0/macaddress)"
#Strip the : and increment mac by 1 to get wifi1 macaddress
mac=$(echo $wifi_mac | tr -d ':')
mac_incr=$((0x$mac + 24))
wifi0_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
#Increment again by 1 to get wifi2 address
mac_incr=$(($mac_incr + 1))
wifi1_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
mac_incr=$(($mac_incr + 1))
wifi1_1_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
mac_incr=$(($mac_incr + 1))
wifi2_mac=$(printf "%012x" $mac_incr | sed 's/../&:/g;s/:$//')
#print the mac address
echo $wifi0_mac
echo $wifi1_mac
echo $wifi2_mac

#Update the mac address using ip link command
ifconfig wifi0 down
ifconfig wifi1 down
ifconfig wifi1.1 down
ifconfig wifi2 down
ip link set dev wifi0 address $wifi0_mac
ip link set dev wifi1 address $wifi1_mac
ip link set dev wifi1.1 address $wifi1_1_mac
ip link set dev wifi2 address $wifi2_mac
ifconfig wifi0 up
ifconfig wifi1 up
ifconfig wifi1.1 up
ifconfig wifi2 up

exit 0

6. Remove default onewifi db from /opt/secure/wifi to be on safer side.

rm /opt/secure/wifi/*.db

7. Restart OneWifi

systemctl restart onewifi

8. Ensure mesh backhaul connectivity is established over 5G through wifi1.1 interface.

iw dev wifi1.1 info

9. Verify mesh backhaul connection in EM-Controller side as well.

iw dev wifi1.1.sta2 info
iw dev wifi1.1.sta2 station dump ## This command gives information on connected client ie Extender2.

10. Upon successful backhaul connectivity, run EM-Agent in Extender2 in new tab.

Extender2 Agent
cd /usr/ccsp/EasyMesh/
onewifi_em_agent

11. Wait for few minutes( for Agent to propagate SSID information from Controller to OneWifi in Extender2) and then check

  • Check all configured VAPs should be up and running with "iw dev" command
  • VAPs should be broadcasting default EasyMesh SSIDS (ie private_ssid, mesh_backhaul)

12. Set static IP for brlan0 interface in Extender2

ifconfig brlan0 10.0.0.205 netmask 255.255.255.0 up

13. Test the connectivity to EM-Controller through backhaul

ping 10.0.0.1 -c 5


Test the connected clients


Sample logs

EM-Controller and EM-Agent success logs

Debugging tips and reference success logs 

Create following file to get onewifi debug and info logs and check corresponding files in /tmp folder.

touch /nvram/wifiHalDbg
touch /nvram/wifiCtrlDbg
touch /nvram/wifiMgrDbg
touch /nvram/wifiLibhostapDbg
touch /nvram/wifiWebConfigDbg
touch /nvram/wifiPasspointDbg
touch /nvram/wifiDMCLI
touch /nvram/wifiDbDbg
touch /nvram/wifiPsm
touch /nvram/wifiHalStatsDbg

Child pages



  • No labels