Re: WiFi works on Squeeze Now! October 31, 2010 12:01PM |
Registered: 14 years ago Posts: 406 |
Re: WiFi works on Squeeze Now! October 31, 2010 03:25PM |
Registered: 14 years ago Posts: 54 |
Re: WiFi works on Squeeze Now! October 31, 2010 08:08PM |
Registered: 14 years ago Posts: 406 |
Re: Using USB WiFi adapter on Dockstar? October 31, 2010 08:27PM |
Registered: 13 years ago Posts: 261 |
apt-get install wireless-tools wpasupplicant2. edit network interfaces: vi /etc/network/interfaces
auto lo iface lo inet loopback # wlan wifi interface #auto wlan0 iface wlan0 inet dhcp wpa-ssid MY_SSID wpa-psk MY_WPA2_PASSWORD # wired ethernet #auto eth0 # <--- commented out line so dockstar boots without cable iface eth0 inet dhcp3. created a script to monitor connectivity and reconnect if connection stalls /usr/local/bin/netwatch.sh
#!/bin/bash INTERFACE[0]="eth0" INTERFACE[1]="wlan0" ROUTER_IP="192.168.1.1" CHECK_INTERVAL_SECS=10 echo `date` ": $0 started" function iface_packets { local IFACE=$1 local REGEX="^[ ]*$IFACE:[ ]*([0-9]*)[ ]*([0-9]*)"; while read line; do if [[ $line =~ $REGEX ]]; then echo -n ${BASH_REMATCH[2]} && exit fi done < /proc/net/dev echo -n 0 } function interface_status { local IFACE=$1 local PKTS1=$(iface_packets $IFACE) ping -I $IFACE -W 1 -c 1 -r $ROUTER_IP >/dev/null 2>&1 sleep 2 # allow some time for ping response local PKTS2=$(iface_packets $IFACE) if [[ $PKTS1 != $PKTS2 ]]; then echo -n 'UP' && exit fi echo -n 'DOWN' } CURRENT=0 while [ 1 ] do IFACE=${INTERFACE[$CURRENT]} sleep $CHECK_INTERVAL_SECS if [[ $(interface_status $IFACE) == DOWN ]]; then echo `date` ": bouncing interface $IFACE" ifdown $IFACE ifup $IFACE if [[ $(interface_status $IFACE) == DOWN ]]; then ifdown $IFACE CURRENT=$(( 1-$CURRENT )) echo `date` ": switching to interface ${INTERFACE[$CURRENT]}" continue else echo `date` ": interface $IFACE is up" fi fi sleep $CHECK_INTERVAL_SECS done4. modified /etc/rc.local to start the script (added the following before exit 0 line)
nohup /usr/local/bin/netwatch.sh < /dev/null >> /var/log/netwatch.log 2>&1 &5. reboot
Re: WiFi works on Squeeze Now! November 01, 2010 06:02AM |
Registered: 14 years ago Posts: 54 |
Re: Using USB WiFi adapter on Dockstar? November 01, 2010 10:21PM |
Registered: 13 years ago Posts: 261 |
Re: WiFi works on Squeeze Now! November 02, 2010 12:28PM |
Registered: 14 years ago Posts: 406 |
Re: Using USB WiFi adapter on Dockstar? November 02, 2010 08:58PM |
Registered: 13 years ago Posts: 261 |
auto lo iface lo inet loopback auto wlan0 iface wlan0 inet dhcp wpa-ssid MY_ROUTER_SSID wpa-psk MY_ROUTER_PASSWORD auto wlan1 iface wlan1 inet dhcp wpa-ssid MY_ROUTER_SSID wpa-psk MY_ROUTER_PASSWORD auto wlan2 iface wlan2 inet dhcp wpa-ssid MY_ROUTER_SSID wpa-psk MY_ROUTER_PASSWORD auto eth0 iface eth0 inet dhcp
Re: Using USB WiFi adapter on Dockstar? November 03, 2010 12:05AM |
Registered: 14 years ago Posts: 406 |
NanoBot
Re: Using USB WiFi adapter on Dockstar? November 04, 2010 05:26PM |
Re: Using USB WiFi adapter on Dockstar? November 04, 2010 05:50PM |
Registered: 14 years ago Posts: 166 |
Re: Using USB WiFi adapter on Dockstar? November 04, 2010 05:53PM |
Registered: 13 years ago Posts: 261 |
NanoBot
Re: Using USB WiFi adapter on Dockstar? November 04, 2010 07:00PM |
Re: Using USB WiFi adapter on Dockstar? November 04, 2010 09:14PM |
Registered: 14 years ago Posts: 166 |
NanoBot
Re: Using USB WiFi adapter on Dockstar? November 05, 2010 05:35AM |
NanoBot
Re: Using USB WiFi adapter on Dockstar? November 05, 2010 10:32AM |
Re: Using USB WiFi adapter on Dockstar? November 05, 2010 11:11AM |
Registered: 14 years ago Posts: 54 |
Re: Using USB WiFi adapter on Dockstar? November 05, 2010 04:28PM |
Registered: 14 years ago Posts: 406 |
NanoBot
Re: Using USB WiFi adapter on Dockstar? November 06, 2010 05:17PM |
Re: Using USB WiFi adapter on Dockstar? November 13, 2010 09:19PM |
Registered: 13 years ago Posts: 2 |
Re: Using USB WiFi adapter on Dockstar? November 16, 2010 12:29AM |
Registered: 13 years ago Posts: 2 |
Re: Using USB WiFi adapter on Dockstar? November 16, 2010 07:11AM |
Registered: 14 years ago Posts: 166 |
Re: Using USB WiFi adapter on Dockstar? November 16, 2010 09:17PM |
Registered: 13 years ago Posts: 261 |
Mike
Re: Using USB WiFi adapter on Dockstar? November 20, 2010 02:57PM |
Re: Using USB WiFi adapter on Dockstar? November 20, 2010 03:01PM |
Registered: 13 years ago Posts: 261 |
cp zd1211-firmware/* /lib/firmware/zd1211/
auto wlan0 iface wlan0 inet dhcp wpa-ssid MY_ROUTER_SSID wpa-psk MY_ROUTER_PASSWORD
Draps
Re: Using USB WiFi adapter on Dockstar? November 23, 2010 11:09AM |
Re: Using USB WiFi adapter on Dockstar? November 23, 2010 11:46AM |
Registered: 14 years ago Posts: 107 |
Re: Using USB WiFi adapter on Dockstar? November 23, 2010 01:25PM |
Registered: 13 years ago Posts: 261 |
ramuk
Re: Using USB WiFi adapter on Dockstar? December 26, 2010 10:46PM |
Re: Using USB WiFi adapter on Dockstar? December 27, 2010 05:21PM |
Registered: 14 years ago Posts: 54 |