-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reason for change: Support for configuring Onewifi to support below VAP configuration in Raspberry Pi 1) Private_5G using built-in Raspberry Pi Wifi adapter. 2) Raspberry Pi External Wifi adapter with SKU:RSP-PI-WIFI1 (Link: https://www.canakit.com/raspberry-pi-wifi.html) to support following VAP - Mesh sta backhaul 2G - Private_2G - Guest AP using iot_ssid vap - DPP configurator on lnf_psk vap - Mesh VAP backhaul 2G 3) Necessary sample Json file for multivap and sta configuration 4) Linux Makefile change to include label "vapsetup" to copy the configuration to appropriate location.
- Loading branch information
1 parent
bbeb69c
commit b22ec71
Showing
7 changed files
with
221 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"_comment": [ | ||
"This is a sample JSON configuration for Backhaul configuration to be read for Mesh Sta" | ||
], | ||
"Backhaul_SSID": "XFSETUP-433C", | ||
"Backhaul_KeyPassphrase": "cactus9246fancy" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"_comment": [ | ||
"This is a sample JSON configuration for Raspberry PI with below assumptions:", | ||
" 1) External USB wifi adapter being used is Canakit usb wifi adapter, which supports 8 2.4G VAPs.", | ||
" Link: https://www.canakit.com/raspberry-pi-wifi.html", | ||
" 2) Interfaces specified in InterfaceName have already been created seperately and", | ||
" this file is only providing the interface mapping associated for that interface.", | ||
" 3) Built in Wifi of Rpi is using interface wlan0.", | ||
"Some details on the outline of the elements:", | ||
"PhyList is an array of phys supported on device with Index specifying the actual phy index.", | ||
"Each phy has an array of RadioList which depicts the radios supported on that phy.", | ||
"The index in the RadioList specifies the radio type 0 means 2.4G, 1 means 5G and 2 means 6G.", | ||
"The RadioName in the RadioList specifies the primary interface associate with that radio.", | ||
"The fields in InterfaceList is self-explanatory with vapName specifying the type of VAP." | ||
], | ||
"PhyList": [ | ||
{ | ||
"Index": 0, | ||
"RadioList": [ | ||
{ | ||
"Index": 1, | ||
"RadioName": "wlan0", | ||
"InterfaceList": [ | ||
{ | ||
"InterfaceName": "wlan0", | ||
"Bridge": "brlan0", | ||
"vlanId": 0, | ||
"vapIndex": 1, | ||
"vapName": "private_ssid_5g" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"Index": 1, | ||
"RadioList": [ | ||
{ | ||
"Index": 0, | ||
"RadioName": "wlan1", | ||
"InterfaceList": [ | ||
{ | ||
"InterfaceName": "wlan1.1", | ||
"Bridge": "brlan0", | ||
"vlanId": 0, | ||
"vapIndex": 2, | ||
"vapName": "private_ssid_2g" | ||
}, | ||
{ | ||
"InterfaceName": "wlan1.2", | ||
"Bridge": "brlan0", | ||
"vlanId": 0, | ||
"vapIndex": 3, | ||
"vapName": "iot_ssid_2g" | ||
}, | ||
{ | ||
"InterfaceName": "wlan1.3", | ||
"Bridge": "brlan0", | ||
"vlanId": 0, | ||
"vapIndex": 4, | ||
"vapName": "lnf_psk_2g" | ||
}, | ||
{ | ||
"InterfaceName": "wlan1.4", | ||
"Bridge": "brlan0", | ||
"vlanId": 0, | ||
"vapIndex": 5, | ||
"vapName": "mesh_backhaul_2g" | ||
}, | ||
{ | ||
"InterfaceName": "wlan1", | ||
"Bridge": "brlan0", | ||
"vlanId": 0, | ||
"vapIndex": 0, | ||
"vapName": "mesh_sta_2g" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
|
||
#This file creates virtual interfaces on the primary interface passed in argument#1 | ||
#The number of interfaces created is specified in argument#2. | ||
|
||
#check whether number of input argument is 2 | ||
if [ $# -ne 2 ]; then | ||
echo "Usage: $0 <primary_interface> <number_of_interfaces>" | ||
exit 1 | ||
fi | ||
|
||
primary_intf=$1 | ||
num_intf=$2 | ||
|
||
#check if primary interface exists before proceeding | ||
if [ ! -e "/sys/class/net/$primary_intf" ]; then | ||
echo "Error: Primary interface $primary_intf does not exist" | ||
exit 1 | ||
fi | ||
|
||
# Create virtual interfaces | ||
for i in $(seq 1 $num_intf); do | ||
virtual_intf="${primary_intf}.$i" | ||
sudo iw dev "$primary_intf" interface add "$virtual_intf" type managed | ||
if [ -e "/sys/class/net/$virtual_intf" ]; then | ||
echo "Created virtual interface: $virtual_intf" | ||
sudo ifconfig "$virtual_intf" down | ||
else | ||
echo "Error: Unable to create virtual interface: $virtual_intf" | ||
exit 1 | ||
fi | ||
done | ||
|
||
echo "Created $num_intf virtual interfaces based on $primary_intf" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters