vfs: check userland buffers before reading them.
[haiku.git] / docs / userguide / en / workshop-wlan.html
blob41c6087e7e52722c2d4817784786712165f5fedf
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
4 <head>
5 <!--
7 * Copyright 2012-2016, Haiku, Inc. All rights reserved.
8 * Distributed under the terms of the MIT License.
10 * Authors:
11 * Humdinger <humdingerb@gmail.com>
13 -->
14 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
15 <meta http-equiv="Content-Style-Type" content="text/css" />
16 <meta name="robots" content="all" />
17 <title>Workshop: Wireless networking</title>
18 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
19 <link rel="stylesheet" type="text/css" href="../Haiku-doc.css" />
20 </head>
21 <body>
23 <div id="banner">
24 <div><span>User guide</span></div>
25 </div>
27 <div class="nav">
28 <div class="inner">
29 <ul class="lang-menu">
30 <li class="now"><img src="../images/flags/gb.png" alt="" /> English</li>
31 <li><a href="../ca/workshop-wlan.html"><img src="../images/flags/ca.png" alt="" />Català</a></li>
32 <li><a href="../de/workshop-wlan.html"><img src="../images/flags/de.png" alt="" />Deutsch</a></li>
33 <li><a href="../es/workshop-wlan.html"><img src="../images/flags/es.png" alt="" />Español</a></li>
34 <li><a href="../fr/workshop-wlan.html"><img src="../images/flags/fr.png" alt="" />Français</a></li>
35 <li><a href="../it/workshop-wlan.html"><img src="../images/flags/it.png" alt="" />Italiano</a></li>
36 <li><a href="../hu/workshop-wlan.html"><img src="../images/flags/hu.png" alt="" />Magyar</a></li>
37 <li><a href="../pl/workshop-wlan.html"><img src="../images/flags/pl.png" alt="" />Polski</a></li>
38 <li><a href="../pt_PT/workshop-wlan.html"><img src="../images/flags/pt_PT.png" alt="" />Português</a></li>
39 <li><a href="../pt_BR/workshop-wlan.html"><img src="../images/flags/pt_BR.png" alt="" />Português (Brazil)</a></li>
40 <li><a href="../ro/workshop-wlan.html"><img src="../images/flags/ro.png" alt="" />Română</a></li>
41 <li><a href="../sk/workshop-wlan.html"><img src="../images/flags/sk.png" alt="" />Slovenčina</a></li>
42 <li><a href="../fi/workshop-wlan.html"><img src="../images/flags/fi.png" alt="" />Suomi</a></li>
43 <li><a href="../sv_SE/workshop-wlan.html"><img src="../images/flags/sv_SE.png" alt="" />Svenska</a></li>
44 <li><a href="../zh_CN/workshop-wlan.html"><img src="../images/flags/zh_CN.png" alt="" /> 中文 [中文]</a></li>
45 <li><a href="../ru/workshop-wlan.html"><img src="../images/flags/ru.png" alt="" />Русский</a></li>
46 <li><a href="../uk/workshop-wlan.html"><img src="../images/flags/uk.png" alt="" />Українська</a></li>
47 <li><a href="../jp/workshop-wlan.html"><img src="../images/flags/jp.png" alt="" />日本語</a></li>
48 </ul>
50 <span>
51 «  <a href="workshop-email.html">Workshop: Managing Email</a> 
52 ::  <a href="contents.html" class="uplink">Contents</a> 
53 ::  <a href="applications.html">Applications</a>  »
54 </span></div>
55 </div>
57 <div id="content">
58 <div>
61 <table class="index" id="index" summary="index">
62 <tr class="heading"><td>Index</td></tr>
63 <tr class="index"><td>
64 <a href="#firmware">Getting supported hardware to work</a><br />
65 <a href="#gui">Joining a wireless network</a><br />
66 <a href="#commandline">Joining from the command line</a><br />
67 <a href="#tips">Tips</a>
68 </td></tr>
69 </table>
71 <h1>Workshop: Wireless networking</h1>
73 <p>Getting the networking to run is essential in today's need for permanent internet connection. As keeping up to date with all the different and ever changing hardware and drivers is quite impossible for a small project, Haiku relies on a <a href="http://www.freebsd.org">FreeBSD</a> compatibility layer for its networking drivers.<br />
74 This ensures a massive amount of supported hardware, though probably not 100% of what's out there. See <a href="https://www.haiku-os.org/guides/daily-tasks/wireless#hardware-notes">this list online</a> for a list of supported models or check <a href="http://www.freebsd.org/releases/9.3R/hardware.html#wlan">FreeBSD 9.3's release hardware notes</a>.</p>
75 <div class="box-info">Currently only PCI, PCI-X, PCI-Express, Mini PCI, and Mini PCI-Express devices are expected to work.<br />
76 PCMCIA, CardBus, ExpressCard, USB and ISA devices still need more work to become functional.</div>
78 <h2>
79 <a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
80 <a id="firmware" name="firmware">Getting supported hardware to work</a></h2>
81 <p>Even if the first hurdle of generally supported hardware is taken, some wireless network cards require binary firmware modules to properly operate. Haiku cannot include some of these proprietary firmware files due to licensing issues. Haiku does however include a simple script which will retrieve and install all of the needed proprietary bits for you. Generally, if you are planning to use wireless networking, it is a good idea to run this script to ensure your system has all of these firmwares available when they are needed.</p>
82 <p>Open a Terminal and type:</p>
83 <pre class="terminal">install-wifi-firmwares.sh</pre>
84 <p>Now review the licenses and accept them to install all of the available firmware files.</p>
86 <p>If you don't have internet access to download those lacking firmwares under Haiku, there's an offline method, see under <a href="#tips">tips</a> below.</p>
88 <h2>
89 <a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
90 <a id="gui" name="gui">Joining a wireless network</a></h2>
91 <p>By default, Haiku will join the first unencrypted wireless network it finds after booting up. To connect to a specific network, you use the Desktop applet <a href="desktop-applets/networkstatus.html">NetworkStatus</a>.</p>
92 <p>Right-click on its icon in the Deskbar and choose the network's public name (which is the "SSID" it broadcasts) from the context menu.</p>
93 <img src="images/workshop-wlan-images/join-network.png" alt="join-network.png" />
94 <p>A window opens where you enter the type of authentication (probably WPA/WPA2, WEP is not a secure encryption anymore!) and the password for that wireless network. Click <span class="button">OK</span> to start the login process.<br /> Depending on your hardware and network configuration this may take a while. You'll be kept informed of the progress by notifications:</p>
95 <img src="images/workshop-wlan-images/join-status.gif" alt="join-network.gif" />
96 <p>Once it reads "Ready" and the NetworkStatus icon in the Deskbar shows a green round light, the connection is established. If the notifications end in "No link" and a yellow triangle, something went wrong, probably an incorrect password.</p>
98 <h2>
99 <a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
100 <a id="commandline" name="commandline">Joining from the command line</a></h2>
101 <p>If you prefer to use the command line or would like to use scripting or the <span class="path">~/config/settings/boot/UserBootscript</span> to automate things to join a specific network on bootup, there's the command <tt>ifconfig</tt>.</p>
102 <p>Start a Terminal and enter the first line to scan for available wireless networks:</p>
103 <pre class="terminal">ifconfig /dev/net/iprowifi3945/0 scan
104 name address signal auth
105 haiku-top 01:d0:19:a6:88:42 30 WPA
106 ArcorInternet123 00:20:12:a4:29:e1 15 WPA</pre>
107 <p>The path to your wireless network adapter has to be adjusted, of course.<br />
108 The output shows the public name (SSID), MAC address, signal strength and authentication method of all found networks.</p>
109 <p>To join a network, use this line and insert the respective public name (SSID) and password:</p>
110 <pre class="terminal">ifconfig /dev/net/iprowifi3945/0 join {SSID} {password}</pre>
111 <p>Make sure the initial configuration of the wireless network adapter after booting up has finished, before issuing <tt>ifconfig</tt> commands or they might be ignored. Depending on your hardware and network configuration that may take a while. Watch those notifications...</p>
113 <h2>
114 <a href="#"><img src="../images/up.png" style="border:none;float:right" alt="index" /></a>
115 <a id="tips" name="tips">Tips</a></h2>
116 <h3>Offline download of binary firmware files</h3>
117 <p>If you cannot obtain the binary firmware files via the <tt>install-wifi-firmwares.sh</tt> script (for example due to lack of internet connection within Haiku), you can also download <a href="http://www.haiku-os.org/files/download-data-for-wlan-firmwares.txt">this shell script</a>, and run it from another OS that has <tt>wget</tt> and <tt>zip</tt> installed.<br />
118 Windows users need to have <a href="http://gnuwin32.sourceforge.net/packages/wget.htm">wget</a> and <a href="http://gnuwin32.sourceforge.net/packages/zip.htm">zip</a> for Windows installed in their default locations and use <a href="https://www.haiku-os.org/files/download-data-for-wlan-firmwares.bat">this batch script</a>.<br />
119 The script will download the needed files and create a zip file that is to be extracted to Haiku's <tt>/boot</tt>. Once unpacked, open a Terminal and type:</p>
120 <pre class="terminal">install-wifi-firmwares.sh</pre>
121 <p>Review the licenses and accept them to install all of the now available firmware files.</p>
122 <h3>Avoiding connection loss</h3>
123 <p>Haiku's drivers for some WLAN chipsets like the iprowifi4965 are prone to lose connection when using WPA encryption. If you're affected by that, try to disable the "HT mode" (high throughput, 802.11n) before connecting to a network:</p>
124 <pre class="terminal">ifconfig /dev/net/iprowifi4965/0 -ht</pre>
125 <p>If that fixes the problem, put the line into <span class="path">~/config/settings/boot/UserBootscript</span> to have it applied automatically every boot-up.</p>
126 </div>
127 </div>
129 <div class="nav">
130 <div class="inner"><span>
131 «  <a href="workshop-email.html">Workshop: Managing Email</a> 
132 ::  <a href="contents.html" class="uplink">Contents</a> 
133 ::  <a href="applications.html">Applications</a>  »
134 </span></div>
135 </div>
137 </body>
138 </html>