mirror of https://github.com/aredn/aredn.git
feature: Change SSID format to include rf channel bandwidth and protocol version
From now on all node SSID's will be NAME-<rf bandwidth>-v<protocol version> tag: RequiresProtocolIncrement
This commit is contained in:
parent
6036dc3ff6
commit
6da1ad8b4e
|
@ -1,7 +1,7 @@
|
|||
wifi_proto = static
|
||||
wifi_ip = 10.<MAC2>
|
||||
wifi_mask = 255.0.0.0
|
||||
wifi_ssid = BroadbandHamnet-v2
|
||||
wifi_ssid = BroadbandHamnet
|
||||
wifi_mode = adhoc
|
||||
wifi_txpower = 19
|
||||
wifi_channel = 1
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
wifi_proto = static
|
||||
wifi_ip = 10.<MAC2>
|
||||
wifi_mask = 255.0.0.0
|
||||
wifi_ssid = BroadbandHamnet-v2
|
||||
wifi_ssid = BroadbandHamnet
|
||||
wifi_mode = adhoc
|
||||
wifi_txpower = 19
|
||||
wifi_channel = 1
|
||||
|
|
|
@ -10,7 +10,7 @@ config wifi-iface
|
|||
option device radio0
|
||||
option network wifi
|
||||
option mode <wifi_mode>
|
||||
option ssid "<wifi_ssid>"
|
||||
option ssid "<wifi_ssid>-<wifi_chanbw>-v2"
|
||||
option encryption none
|
||||
|
||||
config wifi-iface
|
||||
|
|
|
@ -151,7 +151,7 @@ sub is_wifi_chanbw_valid
|
|||
my $boardinfo=hardware_info();
|
||||
if ( ( exists($boardinfo->{'rfband'}) ) && ( $boardinfo->{'rfband'} == "2400" ) && ( $wifi_chanbw != 20 ) )
|
||||
{
|
||||
if ( (( length $wifi_ssid >= 33 ) || ( length $wifi_ssid == 0 )) || ( $wifi_ssid =~ /BroadBandHamnet-v.*/i ))
|
||||
if ( (( length $wifi_ssid >= 33 ) || ( length $wifi_ssid == 0 )) || ( $wifi_ssid =~ /BroadBandHamnet/i ))
|
||||
{
|
||||
# 2.4ghz and default ssid not 20mhz wide -- Invalid chan_bw
|
||||
return 0;
|
||||
|
|
|
@ -171,8 +171,13 @@ if($parms{button_save})
|
|||
push @errors, "invalid WiFi IP address";
|
||||
}
|
||||
}
|
||||
|
||||
push (@errors, "invalid WiFi SSID") unless length $wifi_ssid <= 32;
|
||||
|
||||
if ($config eq "mesh"){
|
||||
push (@errors, "invalid WiFi SSID") unless length $wifi_ssid <= 27;
|
||||
} else
|
||||
{
|
||||
push (@errors, "invalid WiFi SSID") unless length $wifi_ssid <= 32;
|
||||
}
|
||||
|
||||
if ( is_channel_valid($wifi_channel) != 1 )
|
||||
{
|
||||
|
@ -488,7 +493,14 @@ else
|
|||
if($wifi_proto ne "disabled")
|
||||
{
|
||||
print "<tr><td>SSID</td>\n";
|
||||
print "<td><input type=text size=15 name=wifi_ssid value='$wifi_ssid'></td></tr>\n";
|
||||
print "<td><input type=text size=15 name=wifi_ssid value='$wifi_ssid'>";
|
||||
if ($config eq "mesh")
|
||||
{
|
||||
print "-$wifi_chanbw-v2</td></tr>\n";
|
||||
} else
|
||||
{
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
if($wifi_mode eq "ap")
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue