Browse Source

Can connect to any open wifi

Bob Mottram 8 years ago
parent
commit
4815dcc806
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      src/freedombone-utils-wifi

+ 5
- 1
src/freedombone-utils-wifi View File

@@ -370,6 +370,8 @@ function networks_from_file {
370 370
     fi
371 371
 
372 372
     echo 'update_config=1' > $WIFI_CONFIG
373
+    echo 'ap_scan=2' >> $WIFI_CONFIG
374
+    echo 'eapol_version=1' >> $WIFI_CONFIG
373 375
     echo '' >> $WIFI_CONFIG
374 376
 
375 377
     ctr=0
@@ -384,7 +386,9 @@ function networks_from_file {
384 386
                     WIFI_TYPE="$line"
385 387
                     if [[ $WIFI_TYPE == $'none' || $WIFI_TYPE == $'open' ]]; then
386 388
                         echo 'network={' >> $WIFI_CONFIG
387
-                        echo "  ssid=\"${WIFI_SSID}\"" >> $WIFI_CONFIG
389
+                        if [[ "${WIFI_SSID}" != $'any' && "${WIFI_SSID}" != $'all' && "${WIFI_SSID}" != $'open' ]]; then
390
+                            echo "  ssid=\"${WIFI_SSID}\"" >> $WIFI_CONFIG
391
+                        fi
388 392
                         echo '  key_mgmt=NONE' >> $WIFI_CONFIG
389 393
                         echo '}' >> $WIFI_CONFIG
390 394
                         ctr=0