View previous topic :: View next topic |
Author |
Message |
chris... Apprentice
Joined: 26 Sep 2006 Posts: 179 Location: Melbourne, AU
|
Posted: Sat Nov 21, 2009 8:24 pm Post subject: Howto re-try wireless [almost solved] |
|
|
How do i setup the wireless network so that that it keeps retrying to connect
At the moment it tries to connect once then stops
I'd like it to alternate between managed and ad-hoc
Code: | modules=("iwconfig")
essid_wlan0="chris"
adhoc_essid_wlan0="stuff"
config_chris=("192.168.1.113/24")
routes_chris=("default via 192.168.1.254")
dns_servers_chris=( "192.168.1.254" )
config_stuff=("192.168.1.10/24")
|
Code: |
Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection
|
Last edited by chris... on Sun Nov 22, 2009 4:50 am; edited 1 time in total |
|
Back to top |
|
|
erik258 Advocate
Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
Posted: Sat Nov 21, 2009 9:06 pm Post subject: |
|
|
wpa-supplicant can manage AP connections like this pretty well (perhaps 5-20 seconds of time to reconnect to new AP) and apparently supports adhoc mode too. It allows configuring priorities to specify preferred wireless networks. I think it would work well for you. It doesn't necessarily require wpa, by the way, but supports unsecured, and probably poorly secured (WEP) networks too. _________________ Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit! |
|
Back to top |
|
|
chris... Apprentice
Joined: 26 Sep 2006 Posts: 179 Location: Melbourne, AU
|
Posted: Sat Nov 21, 2009 11:23 pm Post subject: |
|
|
wpa-supplicant will continuously try connecting between ad-hoc and managed? |
|
Back to top |
|
|
d2_racing Bodhisattva
Joined: 25 Apr 2005 Posts: 13047 Location: Ste-Foy,Canada
|
Posted: Sun Nov 22, 2009 2:02 am Post subject: |
|
|
I'm not an expert on that, but WICD can do a lot of stuff, so instead of using the manual way, maybe you should try WICD to test if it's working with that little program. |
|
Back to top |
|
|
erik258 Advocate
Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
Posted: Sun Nov 22, 2009 2:23 am Post subject: |
|
|
I'm pretty sure wicd uses wpa_supplicant.
Quote: | instead of using the manual way |
it's fully automated, just doesn't provide more than a crappy interface to wpa_supplicant.conf (wpa_cli exists but is a pain to use). but wpa_supplicant.conf is easy enough to create. here's an example with a low-priority block for connection to open networks and a block with WPA enabled.
Code: |
network={
key_mgmt=NONE
priority=-9999999
}
network={
ssid="your-essid"
scan_ssid=1
key_mgmt=WPA-PSK
psk="your-passkey"
priority=10
}
|
You'll have to figure out how to add an ad-hoc network yourself. It seems to be supported according to google, but I've never done it.
Quote: | wpa-supplicant will continuously try connecting between ad-hoc and managed? |
It will continually poll the surrounding air, checking to see what wireless networks are available, and connect to a higher priority network when it is available. it will then stay on that network until it is either unavailable or an even higher priority network is available. _________________ Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit! |
|
Back to top |
|
|
chris... Apprentice
Joined: 26 Sep 2006 Posts: 179 Location: Melbourne, AU
|
Posted: Sun Nov 22, 2009 3:26 am Post subject: |
|
|
ok i've got wpa_supplicant working but not with an ad-hoc network
in the doco it says to add "mode=1" to the network block, but that doesnt seem to work
i can manually get an ad-hoc network working
ok ad-hoc seems to work when i set
will have to wait till i get back home to see if it works as expected with a managed ap |
|
Back to top |
|
|
chris... Apprentice
Joined: 26 Sep 2006 Posts: 179 Location: Melbourne, AU
|
Posted: Sun Nov 22, 2009 9:56 am Post subject: |
|
|
OK, it mostly works apart from connecting to a managed network
It'll connect to an ad-hoc network
It'll connect as ad-hoc but doesnt realise its the only computer and wont try a managed network, but that may be becuase it wont connect to a managed network in the first place
It'll swap between trying to connect to 2 different access points but not connect to either
wpa-supplicant wont seem work with ad-hoc and managed
if i want to use managed i need to set ap_scan=1
if i want to use ad-hoc i need to set ap_scan=2 |
|
Back to top |
|
|
erik258 Advocate
Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
Posted: Sun Nov 22, 2009 6:35 pm Post subject: |
|
|
interesting. I can see that being the case. Did you set the managed network priority higher than the ad-hoc network? care to post your wpa_supplicant.conf? _________________ Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit! |
|
Back to top |
|
|
chris... Apprentice
Joined: 26 Sep 2006 Posts: 179 Location: Melbourne, AU
|
Posted: Sun Nov 22, 2009 8:50 pm Post subject: |
|
|
one is 11n
two is 11g
I'm using iwlagn and iwl3945 wireless modules
all work manually in ad-hoc and managed mode
Code: | ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
ap_scan=1
country=AU
network={
ssid="one"
key_mgmt=NONE
priority=2
}
network={
ssid="two"
key_mgmt=NONE
priority=1
}
network={
ssid="adhoc"
key_mgmt=NONE
mode=1
} |
iwl3945 has "two" as a higher priority so it prefers the 11g router |
|
Back to top |
|
|
erik258 Advocate
Joined: 12 Apr 2005 Posts: 2650 Location: Twin Cities, Minnesota, USA
|
Posted: Mon Nov 23, 2009 9:10 pm Post subject: |
|
|
Shouldn't the advocate net have a priority too? _________________ Configuring a Firewall? Try my iptables configuration
LinuxCommando.com is my blog for linux-related scraps and tidbits. Stop by for a visit! |
|
Back to top |
|
|
chris... Apprentice
Joined: 26 Sep 2006 Posts: 179 Location: Melbourne, AU
|
Posted: Tue Nov 24, 2009 3:57 am Post subject: |
|
|
no, its the default 0
however, setting it makes no difference |
|
Back to top |
|
|
|