connect to a Free Wi-Fi Hotspot

Hi

I've notebook EEE PC 1000H from Asus with freeBSD 7.2 and ndis module.
There is WPA2-PSK configured.

Howto configure wireless interface to switch from WPA2-PSK to a free open Wi-Fi Hotspot
and back if needed?
 
Yep and THX.
My problem is, I have configured WPA2-PSK for my home wireless router, but if I'm traveling my notebook should switch to the open, unencrypted Wi-Fi Hotspots.
Should I write an extra script to change the network settings or there is an other solution?
 
Re-read the wpa_supplicant.conf man page :) You can configure different wireless networks in there with different priorities:

Code:
network={
        ssid="myssid"
        key_mgmt=WPA-PSK
        pairwise=TKIP
        psk=key
        priority=5
}

network={
        key_mgmt=NONE
        priority=0
}

It will connect to any available open wireless network, but only if "myssid" is not available.

If you are using DHCP in both locations, it will just work fine. If you switch from one location to another, without shutting down, you can force wpa_supplicant to rescan, and dhcp to restart, by running '/etc/rc.d/netif restart wlan0' (assuming wlan0 is your interface), but I believe this will happen as soon as wpa_supplicant detects the network change anyway.

Adam
 
  • Thanks
Reactions: ccc
Thx, I've tried the following configuration in /etc/wpa_supplicant.conf on my freeBSD 7.3 RELEASE:
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
eapol_version=2
ap_scan=1
fast_reauth=1


network={
        scan_ssid=1
        ssid="myessid"
        proto=RSN 
        key_mgmt=WPA-PSK
        pairwise=CCMP
        group=CCMP
	psk=secretkey
        priority=5
}

network={
        key_mgmt=NONE
        priority=0
}
If I understand correctly, the highest priority number has the highest priority.
Now if I try to restart network:
Code:
/etc/rc.d/netif restart
then I'm getting the IP address from my neighbour with unsecured instead of my secured wlan.
Howto set my secured wlan as a default connection?
 
Back
Top