slitaz-doc-wiki-data view pages/en/guides/wifi-easy.txt @ rev 7

Add pages/en folder.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Feb 26 12:17:18 2011 +0000 (2011-02-26)
parents
children
line source
1 ====== Wifi configuration, easy method ======
3 ===== Introduction =====
5 To install wifi under Linux, two methods are possible:
7 * Use the kernel module specific to your wifi card
8 * Use the Ndiswrapper module to install a Windows driver
11 Here, we will discuss the usage of a kernel module specific to your card (Ndiswrapper will one day have another page on the wiki).
13 To use a specific kernel module, you'll need to:
15 - Know your wifi hardware
16 - Know which module your card needs
17 - Install this module, and possibly firmware too
18 - Configure your connection to the access point
19 - Get connected and surf
21 Netbox is a tool which can do that just by clicking a few buttons.
22 But it's also possible to configure your wifi from the command line.
24 ===== Wifibox/Netbox Graphical Utility =====
26 With //netbox// or //wifibox// you can configure your wifi with only a few mouse clicks. As you already know which module you need, it's easy to use //wifibox//:
27 <code>
28 $ subox wifibox
29 </code>
30 //Wifibox// will install all the software needed and then launch the wifi. You won't have to manually install your wifi.
32 Here are the necessary steps for //Wifibox//:
34 * First, go to the Drivers tab, and install the module you need. SliTaz will load the firmware (if needed), the kernel module, configure your wifi, and connect to the access point.
35 * Then, go to "//Configuration//", and start to configure. If you don't know what to add, have a look at the sample /etc/network.conf - wifibox uses the same parameters. Click on "//Start//"
36 * If all goes well, you may start surfing!
38 ===== Manually Configure your Wifi =====
40 If you want to understand how wifi works in SliTaz, then you can try configuring your wifi manually.
42 But if you want to know how wifi generally works under linux, or if your kernel module is not on this list, you should look at the step by step wifi.
44 Here is a quick summary of the steps needed:
46 * Know your wifi card
47 * Check and install if your wifi card needs any firmware, e.g., b43
48 * Load the kernel module specific to your wifi card
49 * Check that your wifi card is detected and your module is loaded
50 * Configure /etc/network.conf
51 * Load up your WIFI interface
52 * Start /etc/init.d/network.sh
54 The following commands do all of the above steps. This is also the easiest way:
56 <code>
57 # tazhw detect-pci --get-firmware
58 # /etc/init.d/network.sh restart
59 </code>
61 Now for more detailed instructions:
63 ===== Detailed Instructions =====
64 === Identifying your hardware (Which wifi card do I have?) ===
66 You can list your hardware using the terminal. It's useful to know which wifi card you have.
68 If you have an integrated wifi card:
69 <code>
70 $ lspci | grep -i network
71 </code>
73 If your card is an usb one, you'll need //lsusb// which is available in the package //usbutils//:
74 <code>
75 # tazpkg get-install usbutils
76 $ lsusb
77 </code>
79 In either case, you'll see something like this:
80 <code>
81 02:02.0 Network controller: Intel Corporation PRO/Wireless LAN 2100 3B Mini PCI Adapter (rev 04)
82 </code>
84 This tells us the following:
86 * //Intel Corporation// made the card
87 * The card is a //Pro/Wireless Lan 2100 3B//
88 * The chipset is a //IPW 2100 (Intel Pro Wireless 2100)//
89 * The interface is a //Mini PCI//
91 === Which module do I need, and do I need firmware? ===
93 The SliTaz linux kernel is made to be light. Some software modules; especially those needed by wifi cards are not installed by default, but have to be loaded by the user.
95 Many wifi cards will work if you load the correct module. The easiest way is to let SliTaz auto-detect your hardware.
97 For integrated wifi cards:
98 <code>
99 # tazhw detect-pci
100 </code>
102 For usb cards:
103 <code>
104 # tazhw detect-usb
105 </code>
107 Sometimes, however, the module alone is not enough. Some types of card (Intel for example) also need firmware. Such firmware is not free software, so we can't distribute it as part of SliTaz. You may need to obtain the firmware from the website of your card manufacturer and download it to ///lib/firmware//. But you'll see that SliTaz can sometimes do this for you!
109 === For b43, b43legacy, ipw2100 or ipw2200 kernel modules ===
112 If the kernel module you need is either b43, b43legacy, ipw2100 or ipw2200, you also need to install the package: get-wifi-firmware. You can install it like this:
113 <code>
114 # tazpkg get-install get-wifi-firmware
115 </code>
117 === Launch wifi ===
119 get-wifi-firmware will install some commands named get-"//a module//"-firmware. To see the list:
120 <code>
121 # ls /usr/bin/get-*-firmware
122 </code>
123 Launch the software that corresponds to your module (ipw2100 in the earlier example):
124 <code>
125 # get-my_module-firmware
126 </code>
128 For example, say your module is ipw2200, you can type:
130 <code>
131 # get-ipw2200-firmware
132 </code>
134 This command will:
136 - Get the needed firmware for "//my_module//", make the package //my_module-firmware//, and install it.
137 - Get useful software for wifi support (iwconfig, wpa_supplicant if needed...)
138 - Load the module "//my_module//" into the linux kernel.
139 - Launch ///etc/init.d/network.sh restart//, which starts wifi.
141 If ///etc/network.conf// is correctly configured, you can surf!
143 The easiest way is to do this is to download the firmware graphically using Wifibox (Slitaz Wireless Manager). Yes, Slitaz graphical wireless manager (wifibox) can do these steps on the Driver tab (after selecting the correct module, say ipw2200 and pressing install).
147 ===== Troubleshoot your wifi =====
149 Here is a quick summary of the steps needed (Repeated again for understanding):
151 * Know your wifi card
152 * Check and install if your wifi card needs any firmware, e.g., b43
153 * Load the kernel module specific to your wifi card
154 * Check that your wifi card is detected and your module is loaded
155 * Configure /etc/network.conf
156 * Load up your WIFI interface
157 * Start /etc/init.d/network.sh
159 The following commands do all of the above steps. This is also the best way to troubleshoot. To get maximum help on the forums; please post the output of each of these commands.
161 <code bash>
162 lspci | grep -i network
163 modprobe your_module
164 dmesg | tail
165 lsmod
166 nano /etc/network.conf
167 ifconfig eth1 up
168 ifconfig -a
169 iwconfig
170 /etc/init.d/network.sh restart
171 ifconfig -a
172 </code>
174 ===== Configure /etc/network.conf =====
176 Slitaz launches wifi using the script ///etc/init.d/network.sh//. This script uses the config file: ///etc/network.conf//. You should first edit your config file using the instructions in the sample /etc/network.conf.
177 You'll find more information about /etc/init.d/network.sh [[en:guides:network-script|here]]
179 Now your module must be loaded at each boot. To automate, add "//my_module//" to the line //LOAD_MODULES// in ///etc/rcS.conf//:
180 <code>
181 # geany /etc/rcS.conf
182 </code>
184 LOAD_MODULES="nls_utf8 my_module"
186 ===== Sample /etc/network.conf file with comments =====
188 <code bash>
189 # start wifi on boot "yes" or "no"
190 WIFI="yes"
192 # wifi interface, (usually "wlan0" or "eth0")
193 WIFI_INTERFACE="wlan0"
196 # ESSID of access point: "my_essid" or "any"
197 # if any is chosen, slitaz will try to connect to the first access point
198 # Be careful:
199 # In some states (in France for example), you are not allowed to connect
200 # to a private access point if it is not secured.
201 # WIFI_ESSID="any"
204 # type of connection:
205 # you can chose between:
206 # ad-hoc : Connect to one cell without access point.
207 # managed : One or more cell, with access point.
208 # master : Your card is a master card
209 # repeater : Your card acts as a repeater.
210 # Useful for long distances.
211 # secondary : Your card is a backup for master or repeater
212 # monitor : Your card only receives messages.
213 # For most of the time, you'll use managed.
214 # (Home, cyber-coffe, work, university...)
215 WIFI_MODE="managed"
218 # Key
219 WIFI_KEY="ma8clef8de8chiffrement8difficilement8déchiffrable"
222 # Key type wep or wpa or any or none
223 # If you're using WPA-EAP (at work for example),
224 # try any.
225 WIFI_KEY_TYPE="wpa"
228 # driver needed by wpa_supplicant.
229 # It depends on your kernel module.
230 # The possible drivers are:
231 # wext = Linux wireless extensions (in most cases, use this one.)
232 # hostap = Host AP driver (Intersil Prism2/2.5/3)
233 # atmel = ATMEL AT76C5XXx (USB, PCMCIA)
234 # wired = wpa_supplicant wired Ethernet driver
235 WPA_DRIVER="wext"
238 # Wifi channel. Leave it blank, if you don't know what it is.
239 WIFI_CHANNEL=""
242 # More args to pass to iwconfig.
243 # Look at iwconfig man page for more information.
244 WIFI_IWCONFIG_ARGS=""
246 </code>
248 ===== Extra Information =====
249 Now for more detailed instructions:
250 First do "lspci" to know which card you have. Once we know which card you have, we can surf the internet to find which module you require, and if we need any special firmware. To help you, here are some useful links:
252 * [[http://linux-wless.passys.nl/|Linux wireless LAN support]] (The column on the right, tells you where to get the firmware, if applicable)
253 * [[http://help.ubuntu.com/|Ubuntu documentation]] (Good Ubuntu website, wifi page)
254 * [[http://www.google.com/|Google]] with "//the name of your wifi card//" + "//modprobe//" or "//linux//"
255 If these links are not useful, you can ask at the [[http://forum.slitaz.org/|forum]]
257 So we learn that the //Intel Corporation PRO/Wireless LAN 2100 3B Mini PCI Adapter// works with the //IPW2100// module and the firmware is available at http://ipw2100.sourceforge.net/.
259 ----
260 \\
261 ^ Page Review Section ^^
262 |Quality| Good |
263 |Review| Minor Updates |
264 |Priority| Medium |
265 |Problems| add a [[http://forum.slitaz.org|forum post link]]|
266 |::: | OR add a [[http://labs.slitaz.org/issues |lab issue tracker link ]]|
267 |How to Improve| Suggest briefly|
268 |::: | |
270 \\
271 ----