View previous topic :: View next topic |
Author |
Message |
yermandu n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/4555410844ad8b1445ca8c.jpg)
Joined: 16 Oct 2009 Posts: 12 Location: Shamballa
|
Posted: Sat Dec 17, 2011 1:58 pm Post subject: Boot startup wireless |
|
|
How i can start up my wireless card wlan0 at init system?
The idea is when the PC reaches the login screen, my connection has already been wifi ready.
Im using NetworkManager to control wlan0.
:?: _________________ [yermandu] |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mahdi1234 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 19 Feb 2005 Posts: 559 Location: Being There
|
Posted: Sat Dec 17, 2011 5:09 pm Post subject: |
|
|
You can add any service to whatever init runlevel with Code: | rc-update add <service> <runlevel> | e.g. in you case could be Code: | rc-update add net.wlan0 default | if you wanted to add it to the default level.
You can get more info here - http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
WvR Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 03 Mar 2011 Posts: 200 Location: Tsuruga, Japan
|
Posted: Tue Dec 20, 2011 3:57 am Post subject: |
|
|
You may need to set the net.wlan0 link in /etc:
Code: | name@host> cd /etc
name@host> ln net.eth0 net.wlan0
name@host> rc-update add net.wlan0 default
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
wizulis n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 07 Nov 2010 Posts: 46
|
Posted: Tue Dec 20, 2011 7:07 am Post subject: |
|
|
The latest versions of NetworkManager starts connecting to known wireless right after the service starts. So, at least for me, as i finished login, i have a fully working network. Don't know if the network is already available at gdm screen, but i think it would be connected to how fast you boot and how fast is the the network card initiated. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
yermandu n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/4555410844ad8b1445ca8c.jpg)
Joined: 16 Oct 2009 Posts: 12 Location: Shamballa
|
Posted: Tue Dec 20, 2011 11:36 am Post subject: |
|
|
Alright i can understand now how to set up wlan0.
But, i was thinking in to power on the interface, because the init work only if i turn on manual the device.
Maybe is something to set in kernel configuration? Or power management. You have some tips? _________________ [yermandu] |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
WvR Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 03 Mar 2011 Posts: 200 Location: Tsuruga, Japan
|
Posted: Tue Dec 20, 2011 12:12 pm Post subject: |
|
|
Yermandu:
If you use Network Manager, can you connect with your wireless card to your network? If yes, then the hardware and the kernel are configured correctly, if not, you need to do some more work.
In my case, I have
Code: | name@host> rc-update add net.wlan0 default |
Then, when I start up my laptop, the network card is started. But that is not all! Because you also need to set the configuration of your wireless card in /etc/conf.d/net. In my case:
Code: |
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
# modules_eth0=( "ifconfig" )
# config_eth0=( "128.61.140.185 netmask 255.255.255.0" )
# routes_eth0=( "default gw 128.61.140.1" )
# dns_servers_eth0=( "130.207.244.251 130.207.244.244" )
config_eth0="dhcp"
modules_wlan0="wpa_supplicant"
wpa_supplicant_wlan0="-Dwext"
config_wlan0="dhcp"
|
This tells the PC to use "wpa_supplicant" to manage the hardware, to use the "wext" driver, and to use dhcp to set the IP of the card. To use wpa_supplicant, you need to set some information in /etc/wpa_supplicant/wpa_supplicant.conf:
Code: | # This is a network block that connects to any unsecured access point.
# We give it a low priority so any defined blocks are preferred.
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
ap_scan=1
network={
ssid="my_ssid"
psk="my_psk"
}
|
Depending on the hardware of your laptop, you may need different drivers, and depending on your wireless router, you may need different settings in /etc/wpa_supplicant/wpa_supplicant.conf
If you set something like this, the card is automatically started. If you use Network Manager, then NM will take care of these settings for you, but only after you log in and you manually set NM to the correct values.
Let us know if this works; if your card does not work at all, then you need to set the kernel parameters to the correct values. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
yermandu n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/4555410844ad8b1445ca8c.jpg)
Joined: 16 Oct 2009 Posts: 12 Location: Shamballa
|
Posted: Tue Dec 20, 2011 9:11 pm Post subject: |
|
|
Wow WvR
Nice, but i think is my hard problem, the card is start only manually , the led confirm ...
Answering the questions:
Quote: | If you use Network Manager, can you connect with your wireless card to your network? If yes, then the hardware and the kernel are configured correctly, if not, you need to do some more work. |
Yes i can connect with wlan0 to my network. But i can do it only if i turn on my card in the painel button, i have a laptop.
Im thinking in a way to turn on card at boot process. Some idea? _________________ [yermandu] |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|