<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>No Znx! &#187; gentoo</title>
	<atom:link href="http://znx.no/tag/gentoo/feed/" rel="self" type="application/rss+xml" />
	<link>http://znx.no</link>
	<description>the pigeons!!!!</description>
	<lastBuildDate>Tue, 20 Dec 2011 22:42:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>WPA2 Wireless With Linux</title>
		<link>http://znx.no/2010/02/wpa2-wireless-with-linux/</link>
		<comments>http://znx.no/2010/02/wpa2-wireless-with-linux/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 18:02:57 +0000</pubDate>
		<dc:creator>znx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[gentoo]]></category>

		<guid isPermaLink="false">http://znx.no/?p=106</guid>
		<description><![CDATA[This is a simple tutorial produced by me and my good mate enigma. It is aimed at Gentoo and uses the Broadcom drivers but this should replicate to other systems. The first step is to get your drivers and for Broadcom, which is relatively easy as they produce them for us. So first download the [...]]]></description>
			<content:encoded><![CDATA[<p>This is a simple tutorial produced by me and my good mate <a href="http://www.gentoo-fun.com/">enigma</a>. It is aimed at Gentoo and uses the Broadcom drivers but this should replicate to other systems.</p>
<p>The first step is to get your drivers and for Broadcom, which is relatively easy as they produce them for us. So first <a href="http://www.broadcom.com/support/802.11/linux_sta.php">download</a> the driver (these drivers support BM4311-, BCM4312-, BCM4321-, and BCM4322-based cards) and was also successful in this case with BCM4328.</p>
<p>Check that the package &#8216;linux-headers&#8217; is installed, this is really just for completeness sakes. Gentoo would not work for long without this package!</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># emerge linux-headers</span>
... output ...</pre></div></div>

<p>Unpack the downloaded drivers and build for your current kernel:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># tar -xzf hybrid-portsrc-ARCH-VERSION.tar.gz</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># make -C /lib/modules/`uname -r`/build M=`pwd`</span>
... output ...</pre></div></div>

<p>Remove any existing wireless drivers.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># rmmod ndiswrapper b43 ssb bcm43xx b43legacy</span></pre></div></div>

<p>Add in some modules required for WPA wireless:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># modprobe ieee80211_crypt_tkip</span></pre></div></div>

<p>Test the newly built wireless driver:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># insmod wl.ko</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># iwconfig</span>
.. output ...
<span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># iwlist scanning</span>
... output ...</pre></div></div>

<p>If that is working we can copy in the driver to the kernel and add to the autoload:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># cp wl.ko /lib/modules/`uname-r`/kernel/net/wireless/</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># rmmod wl</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># modprobe wl</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># echo 'wl' &gt;&gt;/etc/modules.autoload.d/kernel-2.6</span></pre></div></div>

<p>So now we have a working driver we can go on to configure for WPA. Alter the <i>/etc/conf.d/net</i> (note we assume that eth0 is wireless):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Prefer wpa_supplicant over wireless-tools</span>
<span style="color: #007800;">modules</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #ff0000;">&quot;wpa_supplicant&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># It's important that we tell wpa_supplicant which driver we should</span>
<span style="color: #666666; font-style: italic;"># be using as it's not very good at guessing yet</span>
<span style="color: #007800;">wpa_supplicant_eth0</span>=<span style="color: #ff0000;">&quot;-Dmadwifi&quot;</span></pre></div></div>

<p>Next set up the network in the <i>/etc/wpa_supplicant/wpa_supplicant.conf</i>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># This setting is required or the connection will not work</span>
<span style="color: #007800;">ctrl_interface</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>wpa_supplicant
&nbsp;
<span style="color: #666666; font-style: italic;"># Ensure that only root can read the WPA configuration</span>
<span style="color: #007800;">ctrl_interface_group</span>=<span style="color: #000000;">0</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Let wpa_supplicant take care of scanning and AP selection</span>
<span style="color: #007800;">ap_scan</span>=<span style="color: #000000;">1</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Only WPA-PSK is used. Any valid cipher combination is accepted</span>
<span style="color: #007800;">network</span>=<span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #007800;">ssid</span>=<span style="color: #ff0000;">&quot;example&quot;</span>
  <span style="color: #007800;">proto</span>=WPA RSN   <span style="color: #666666; font-style: italic;"># RSN is needed for WPA2</span>
  <span style="color: #007800;">key_mgmt</span>=WPA-PSK
  <span style="color: #007800;">pairwise</span>=CCMP TKIP
  <span style="color: #007800;">group</span>=CCMP TKIP WEP104 WEP40
  <span style="color: #007800;">psk</span>=06b4be19da289f475aa46a33cb793029d4ab3db7a23ee92382eb0106c72ac7bb
  <span style="color: #666666; font-style: italic;">#The higher the priority the faster it connects</span>
  <span style="color: #007800;">priority</span>=<span style="color: #000000;">2</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>And that is it, you should find that your wireless is enabled on boot.</p>
<p>Thanks should also go to <a href="http://djkaos.wordpress.com/2008/10/25/installing-broadcom-80211-linux-sta-driver/">DJ Kaos</a> for the preparation of the driver.</p>
]]></content:encoded>
			<wfw:commentRss>http://znx.no/2010/02/wpa2-wireless-with-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

