Index: scripts/wifi_generate_wpa_supplicant.sh =================================================================== diff -u -r13ac42cf8bdc5038dedd3302ba79dc387e5704b4 -rfa1cf5c0749a6249bec9a5f5653e3a19cbaba24a --- scripts/wifi_generate_wpa_supplicant.sh (.../wifi_generate_wpa_supplicant.sh) (revision 13ac42cf8bdc5038dedd3302ba79dc387e5704b4) +++ scripts/wifi_generate_wpa_supplicant.sh (.../wifi_generate_wpa_supplicant.sh) (revision fa1cf5c0749a6249bec9a5f5653e3a19cbaba24a) @@ -3,19 +3,34 @@ password=$2 dest=$3 securityType=$4 +psk=$(wpa_passphrase "$ssid" "$password" | grep "psk=" | grep -v "#psk" | sed -nr 's/.*psk=(.*)/\1/p') case $securityType in - wpa2|wpa) - echo "Security: wpa2/wpa"; - psk=$(wpa_passphrase "$ssid" "$password" | grep "psk=" | grep -v "#psk" | sed -nr 's/.*psk=(.*)/\1/p') + wpa2) + echo "Security: wpa2"; echo "ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=0 update_config=1 network={ ssid=\"$ssid\" + key_mgmt=WPA-PSK + pairwise=CCMP TKIP + group=CCMP TKIP + scan_ssid=1 #psk=\"\" psk=$psk }" > $dest;; + wpa) + echo "Security: wpa"; + echo "ctrl_interface=/var/run/wpa_supplicant +ctrl_interface_group=0 +update_config=1 + +network={ + ssid=\"$ssid\" + #psk=\"\" + psk=$psk +}" > $dest;; wep) echo "Security: wep"; echo "ctrl_interface=/var/run/wpa_supplicant Index: scripts/wifi_request_auto_assigned_ip.sh =================================================================== diff -u -r13ac42cf8bdc5038dedd3302ba79dc387e5704b4 -rfa1cf5c0749a6249bec9a5f5653e3a19cbaba24a --- scripts/wifi_request_auto_assigned_ip.sh (.../wifi_request_auto_assigned_ip.sh) (revision 13ac42cf8bdc5038dedd3302ba79dc387e5704b4) +++ scripts/wifi_request_auto_assigned_ip.sh (.../wifi_request_auto_assigned_ip.sh) (revision fa1cf5c0749a6249bec9a5f5653e3a19cbaba24a) @@ -1,6 +1,39 @@ #!/bin/sh +#udhcpc -? +#udhcpc: invalid option -- ? +#BusyBox v1.20.1 (2013-02-08 03:29:16 UTC) multi-call binary. +#Usage: udhcpc [-fbnqoCRB] [-i IFACE] [-r IP] [-s PROG] [-p PIDFILE] +#[-V VENDOR] [-x OPT:VAL]... [-O OPT]... + +#-i,--interface IFACE Interface to use (default eth0) +#-p,--pidfile FILE Create pidfile +#-s,--script PROG Run PROG at DHCP events (default /usr/share/udhcpc/default.script) +#-B,--broadcast Request broadcast replies +#-t,--retries N Send up to N discover packets +#-T,--timeout N Pause between packets (default 3 seconds) +#-A,--tryagain N Wait N seconds after failure (default 20) +#-f,--foreground Run in foreground +#-b,--background Background if lease is not obtained +#-n,--now Exit if lease is not obtained +#-q,--quit Exit after obtaining lease +#-R,--release Release IP on exit +#-S,--syslog Log to syslog too +#-a,--arping Use arping to validate offered address +#-O,--request-option OPT Request option OPT from server (cumulative) +#-o,--no-default-options Don't request any options (unless -O is given) +#-r,--request IP Request this IP address +#-x OPT:VAL Include option OPT in sent packets (cumulative) + #Examples of string, numeric, and hex byte opts: + #-x hostname:bbox - option 12 + #-x lease:3600 - option 51 (lease time) + #-x 0x3d:0100BEEFC0FFEE - option 61 (client id) +#-F,--fqdn NAME Ask server to update DNS mapping for NAME +#-V,--vendorclass VENDOR Vendor identifier (default 'udhcp VERSION') +#-C,--clientid-none Don't send MAC as client identifier iface=wlan0 if [ $# -eq 1 ]; then iface=$1 fi -killall udhcpc; udhcpc --timeout=3 --retries=2 --tryagain=5 -n -i $iface +killall udhcpc +sleep 1 +udhcpc --timeout=5 --retries=8 -n -i $iface Index: scripts/wifi_start_wpa_supplicant.sh =================================================================== diff -u -r2085962f7bd0a2239ee5c857928a11d5e38fe0a2 -rfa1cf5c0749a6249bec9a5f5653e3a19cbaba24a --- scripts/wifi_start_wpa_supplicant.sh (.../wifi_start_wpa_supplicant.sh) (revision 2085962f7bd0a2239ee5c857928a11d5e38fe0a2) +++ scripts/wifi_start_wpa_supplicant.sh (.../wifi_start_wpa_supplicant.sh) (revision fa1cf5c0749a6249bec9a5f5653e3a19cbaba24a) @@ -1,4 +1,7 @@ #!/bin/sh iface=$1 wpa_supplicant_path=$2 -killall wpa_supplicant; wpa_supplicant -B -i $iface -c $wpa_supplicant_path wext +killall udhcpc +wpa_cli terminate +sleep 1 +wpa_supplicant -B -i $iface -c $wpa_supplicant_path wext