Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

BPI-R4 build instruction 

Controller

Code Block
titleBuild
repo init -u https://code.rdkcentral.com/r/manifests -b rdkb-2025q2-kirkstone -m rdkb-bpi-extsrc.xml
repo sync -j`nproc` --no-clone-bundle
 
AddPlease & CPpick the below changes,
cd ~/meta-cmf-broadband
git fetch https://code.rdkcentral.com/r/rdk/components/generic/rdk-oe/meta-cmf-broadband refs/changes/40/117640/1 && git cherry-pick FETCH_HEAD
cd -

sed -i "s/\${AUTOREV}/4eca0f60752cb76a6e5ac86b10ba08e2ce6210bd/g"  machine command based on your requirement
# to build the image with AL_SAP
MACHINE=bananapi4-rdk-broadband FEATURE_TYPE=EasyMesh  source meta-cmf-bananapi/metasetup-rdkenvironment-mtk-bpir4/recipes-ccsp/unified-wifi-mesh/unified-wifi-mesh-header.bb
refboard-rdkb
# to build the image without AL_SAP
MACHINE=bananapi4-rdk-broadband FEATURE_TYPE=EasyMesh WITHOUT_ALSAP=yes source meta-cmf-bananapi/setup-environment-refboard-rdkb
 
#to CP the below change for fynecli access for utopia component
https://github.com/rdkcentral/utopia/pull/47
 
bitbake rdk-generic-broadband-image

Test EM on BPI R4

BPI Controller

Prerequisites :  (one time process)

...

borderColorblack
borderStyledashed
titleDB Setup

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

Extender


Code Block
languagebash
titleExt Build Instructions
repo init -u https://code.rdkcentral.com/r/manifests -b kirkstone -m rdkb-bpi-ap-extsrc.xml
repo sync -j4 --no-clone-bundle
 
Please pick the below machine command based on your requirement,
#to build the image with AL_SAP
MACHINE=bananapi4-rdk-broadband-ap-extender  source meta-cmf-bananapi/setup-environment-refboard-rdkb
#to build the image without AL_SAP
MACHINE=bananapi4-rdk-broadband-ap-extender FEATURE_TYPE=EasyMesh WITHOUT_ALSAP=yes source meta-cmf-bananapi/setup-environment-refboard-rdkb
 
bitbake rdk-generic-ap-extender-image



Test EM on BPI R4

BPI Controller

...

Panel
borderColorblack
borderStyledashed
titlebpi root

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

...

Panel
borderColorblack
borderStyledashed
titleCreating database

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

...

Code Block
languagebash
titleEasymeshCfg.json
collapsetrue
{
	"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

Code Block
languagebash
titleInterfaceMap.json
collapsetrue
{
    "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_start.sh

Code Block
languagebash
titleonewifi_pre_script_ctrl
collapsetrue
#!/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.

Code Block
languagebash
 rm /opt/secure/wifi/*

8. Restart OneWifi to take effect.

Code Block
languagebash
titleRestart services
systemctl restart onewifi

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

Code Block
languagebash
titleRunning EM-Controller
cd /usr/ccsp/EasyMesh/
onewifi_em_ctrl bpi@root

NOTE: Controller log for the first time.

Code Block
languagebash
titleController 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. 

...

borderColorblack
borderStyledashed
titleonewifi_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.
Image RemovedImage Removed
Image Removed

...

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

Code Block
languagebash
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'

...

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

Code Block
languagebash
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.

Code Block
languagebash
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.
Code Block
languagebash
rm /usr/bin/dnsmasq

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

Code Block
languagebash
route del default gw

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

Code Block
languagebash
titleExtender1 EasymeshCfg.json
collapsetrue
 {
	"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.

Code Block
languagebash
titleExtender1 InterfaceMap.json
collapsetrue
{
    "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_start.sh.

Code Block
languagebash
titleExtender1 onewifi_pre_script.sh
collapsetrue
#!/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.

Code Block
languagebash
rm /opt/secure/wifi/*.db

7. Restart OneWifi

Code Block
languagebash
systemctl restart onewifi

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

Code Block
languagebash
iw dev wifi1.1 info

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

Code Block
languagebash
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.

Code Block
languagebash
titleExtender1 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

Code Block
languagebash
ifconfig brlan0 10.0.0.215 netmask 255.255.255.0 up

13. Test the connectivity to EM-Controller through backhaul

Code Block
languagebash
ping 10.0.0.1 -c 5

Extender2 (For Daisy-Chain topology)

Prerequisites - One Time Process

  1. Delete the dnsmasq binary.
Code Block
languagebash
rm /usr/bin/dnsmasq

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

Code Block
languagebash
route del default gw

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

Code Block
languagebash
titleExtender2 EasymeshCfg.json
collapsetrue
{
	"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.

Code Block
languagebash
titleExtender2 InterfaceMap.json
collapsetrue
 {
    "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_start.sh.

Code Block
languagebash
titleExtender2 onewifi_pre_script.sh
collapsetrue
 #!/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.

Code Block
languagebash
rm /opt/secure/wifi/*.db

7. Restart OneWifi

Code Block
languagebash
systemctl restart onewifi

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

Code Block
languagebash
iw dev wifi0.1 info

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

Code Block
languagebash
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.

Code Block
languagebash
titleExtender2 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

Code Block
languagebash
ifconfig brlan0 10.0.0.210 netmask 255.255.255.0 up

13. Test the connectivity to EM-Controller through backhaul

Code Block
languagebash
ping 10.0.0.1 -c 5

Test the connectivity with wireless clients.

Extender2 (For Star Topology)

Prerequisites - One Time Process

  1. Delete the dnsmasq binary.
Code Block
languagebash
rm /usr/bin/dnsmasq

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

Code Block
languagebash
route del default gw

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

Code Block
languagebash
titleExtender2 EasymeshCfg.json
collapsetrue
{
	"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.

Code Block
languagebash
titleExtender2 InterfaceMap.json
collapsetrue
 {
    "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_start.sh.

Code Block
languagebash
titleExtender2 onewifi_pre_script.sh
collapsetrue
#!/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.

Code Block
languagebash
rm /opt/secure/wifi/*.db

7. Restart OneWifi

Code Block
languagebash
systemctl restart onewifi

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

Code Block
languagebash
iw dev wifi1.1 info

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

Code Block
languagebash
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.

Code Block
languagebash
titleExtender2 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

Code Block
languagebash
ifconfig brlan0 10.0.0.205 netmask 255.255.255.0 up

13. Test the connectivity to EM-Controller through backhaul

Code Block
languagebash
ping 10.0.0.1 -c 5

...
















































































Sample logs

EM-Controller and EM-Agent success logs

...