View previous topic :: View next topic |
Author |
Message |
tallmtt n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 08 Mar 2008 Posts: 12
|
Posted: Sat Mar 08, 2008 10:07 pm Post subject: wireless config |
|
|
There are lots of posts to get your card working but not much to configure your startup and config.
There is a great site under the documentation and also under the conf.d/wireless.example file but I cannot find the answer to my problem.
Every time I turn on my computer at home I need to:
1) iwconfig ath0 essid MyNetwork
2) ifconfig ath0 192.168.1.123
3) iwconfig ath0 ap auto
4) iwconfig ath0 ap auto (I know - I have to do it twice??)
5) route add default gw 192.168.1.1
Then my Internet works.
I want it to automatically log onto my home network (MyNetwork) and if that essid is not available - to use dhcp to log into unsecured networks with the strongest signal.
Any ideas?
I have heard to put both my eth0 and ath0 (wireless interface) in the file conf.d/net but I like the idea of using conf.d/wireless because I plan on stopping eth0 from even turning on at boot because I never use it (except to install gentoo)
I can find information to set my network but not my network and dhcp for when my network is unavailable to the stongest unsecured network.
Ok, I feel I am talking in circles. I look forward to anyone's reply. Thank you in advance. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
avx Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/22194535045e47d317d4f5.jpg)
Joined: 21 Jun 2004 Posts: 2152
|
Posted: Sat Mar 08, 2008 11:06 pm Post subject: |
|
|
Have you read this? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
tallmtt n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 08 Mar 2008 Posts: 12
|
Posted: Sun Mar 09, 2008 12:19 am Post subject: |
|
|
Yes - I have read it and it is an excellent resource - the exact one I was referencing in my first post.
My question is that I used that article to set up my card for "my" network, but how do I set it up to also connect to ANY unsecured network with dhcp if my network is not available, and how do I make my card connect to the strongest signal if there are more than 1 unsecured networks around?
Will this involve writing a script?
Thanks again for your quick reply. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
avx Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/22194535045e47d317d4f5.jpg)
Joined: 21 Jun 2004 Posts: 2152
|
Posted: Sun Mar 09, 2008 5:22 am Post subject: |
|
|
Code: | network={
key_mgmt=NONE
priority=-9999999
} |
That's a default in wpa_supplicant.conf and should be able to handle any unencrypted network. Note the "priority"-string, the higher that is, the sooner it will connect to the specified network, so you want to make sure, you're home-wlan has the highest priority in your config.
If you've got something like this in your config, a simple '$dhcp-client $interface' should do it for any unencrypted network.
hope that helps...
Edit, don't know, if you could automate the dhcp-thingy, but I guess something in /etc/conf.d/net like config_ath0=( "dhcp" ) should do it, this would also require you to get an ip via dhcp on your own network - if you need a fixed ip there, I don't know an easy solution. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|