mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-02-19 10:42:14 +01:00
map-controller: update default config and add uci-defaults generation
This commit is contained in:
parent
077337b0ea
commit
286e5ce814
2 changed files with 68 additions and 33 deletions
|
|
@ -1,5 +1,5 @@
|
|||
config controller 'controller'
|
||||
option enabled '0'
|
||||
option enabled '1' # may be modified by other package start-up scripts (i.e. map-agent)
|
||||
option profile '4'
|
||||
option registrar '2 5 6'
|
||||
option debug '0'
|
||||
|
|
@ -28,39 +28,58 @@ config sta_steering
|
|||
option report_rcpi_threshold_5g '96'
|
||||
option report_rcpi_threshold_6g '96'
|
||||
|
||||
#config ap
|
||||
# option band '2'
|
||||
# option encryption 'sae-mixed'
|
||||
# option vid '1'
|
||||
# option ssid 'IOWRT-2.4GHz'
|
||||
# option encryption 'sae-mixed'
|
||||
# option key '1234567890'
|
||||
###################
|
||||
# Default AP sections credentials will by updated
|
||||
# by uci-defaults script 99-mapcntlr
|
||||
###################
|
||||
|
||||
#config ap
|
||||
# option band '5'
|
||||
# option type 'fronthaul'
|
||||
# option vid '1'
|
||||
# option ssid 'IOWRT-5GHz'
|
||||
# option encryption 'sae-mixed'
|
||||
# option key '1234567890'
|
||||
config ap
|
||||
option band '5'
|
||||
option ssid '$DEVICE_MANUFACTURER-$BASEMAC_ADDR'
|
||||
option encryption 'sae-mixed'
|
||||
option key '$WIFI_FH_KEY'
|
||||
option vid '1'
|
||||
option type 'fronthaul'
|
||||
|
||||
#config ap
|
||||
# option band '2'
|
||||
# option type 'backhaul'
|
||||
# option vid '1'
|
||||
# list disallow_bsta '0'
|
||||
# option ssid 'MAP-BH-2.4GHz'
|
||||
# option encryption 'sae'
|
||||
# option key '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ0'
|
||||
config ap
|
||||
option band '2'
|
||||
option ssid '$DEVICE_MANUFACTURER-$BASEMAC_ADDR'
|
||||
option encryption 'sae-mixed'
|
||||
option key '$WIFI_FH_KEY'
|
||||
option vid '1'
|
||||
option type 'fronthaul'
|
||||
|
||||
#config ap
|
||||
# option band '5'
|
||||
# option type 'backhaul'
|
||||
# option vid '1'
|
||||
# list disallow_bsta '0'
|
||||
# option ssid 'MAP-BH-5GHz'
|
||||
# option encryption 'sae'
|
||||
# option key '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ0'
|
||||
config ap
|
||||
option band '6'
|
||||
option ssid '$DEVICE_MANUFACTURER-$BASEMAC_ADDR'
|
||||
option encryption 'sae'
|
||||
option key '$WIFI_FH_KEY'
|
||||
option vid '1'
|
||||
option type 'fronthaul'
|
||||
|
||||
config ap
|
||||
option band '5'
|
||||
option ssid 'MAP-$BASEMAC_ADDR-BH-5GHz'
|
||||
option encryption 'sae'
|
||||
option key '$WIFI_BH_KEY'
|
||||
option type 'backhaul'
|
||||
option vid '1'
|
||||
|
||||
config ap
|
||||
option band '2'
|
||||
option ssid 'MAP-$BASEMAC_ADDR-BH-2.4GHz'
|
||||
option encryption 'sae'
|
||||
option key '$WIFI_BH_KEY'
|
||||
option type 'backhaul'
|
||||
option vid '1'
|
||||
|
||||
config ap
|
||||
option band '6'
|
||||
option ssid 'MAP-$BASEMAC_ADDR-BH-6GHz'
|
||||
option encryption 'sae'
|
||||
option key '$WIFI_BH_KEY'
|
||||
option type 'backhaul'
|
||||
option vid '1'
|
||||
|
||||
# node and radio sections (per node) are auto
|
||||
# generated per Multi-AP Agent in the network
|
||||
|
|
@ -71,8 +90,6 @@ config sta_steering
|
|||
# option backhaul_ul_macaddr '00:00:00:00:00:00'
|
||||
# option backhaul_dl_macaddr '00:00:00:00:00:00'
|
||||
# option backhaul_type 'none'
|
||||
# option primary_vid '1'
|
||||
# option primary_pcp '0'
|
||||
# option report_sta_assocfails '0'
|
||||
# option report_sta_assocfails_rate '0'
|
||||
# option report_metric_periodic '0'
|
||||
|
|
|
|||
18
map-controller/files/etc/uci-defaults/99-mapcntlr
Normal file
18
map-controller/files/etc/uci-defaults/99-mapcntlr
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
. /etc/device_info
|
||||
|
||||
WIFI_BH_KEY=$(openssl rand -rand /dev/urandom -hex 64 2>/dev/null | openssl dgst -hex -sha256 | cut -d " " -f 2)
|
||||
WIFI_BH_KEY=${WIFI_BH_KEY::-1}
|
||||
|
||||
BASEMAC_ADDR="$(fw_printenv -n ethaddr | tr -d ':')"
|
||||
[ ${#BASEMAC_ADDR} -eq 12 ] || BASEMAC_ADDR="$(db -q get device.deviceinfo.BaseMACAddress | tr -d ':')"
|
||||
|
||||
WIFI_FH_KEY="$(db get hw.board.wpa_key)"
|
||||
WIFI_FH_KEY="${WIFI_FH_KEY:-1234567890}"
|
||||
|
||||
sed -i -e "s/\$BASEMAC_ADDR/$BASEMAC_ADDR/g" \
|
||||
-e "s/\$WIFI_FH_KEY/$WIFI_FH_KEY/g" \
|
||||
-e "s/\$WIFI_BH_KEY/$WIFI_BH_KEY/g" \
|
||||
-e "s/\$DEVICE_MANUFACTURER/$DEVICE_MANUFACTURER/g" \
|
||||
/etc/config/mapcontroller 2>/dev/null
|
||||
Loading…
Add table
Reference in a new issue