<br><div>Hello there,</div><div><br></div><div>I'd like to share a couple of things I've learned today trying to setup my alix as a wireless access point with WPA2. Surely these are obvious tips for the most advanced users, but maybe I'm not the only one who doesn't find these things obvious.</div>

<div><br></div><div>My thanks to other contributors in the list. Reading many posts helped me getting to this result.</div><div><br></div><div>1st tip: when you try to create a bridge, remember that the physical interface should NOT have an IP address. The IP address should be assigned to the bridge interface.</div>

<div>2nd tip: WPA-PSK passwords should be at least 8 chars long. So if you set up something temporary just for the tests be careful, since it's very hard to get a meaningful error message from hostapd.</div><div><br>
</div>
<div>And now the long version. ;-)</div><div><font class="Apple-style-span" color="#500050"><span class="Apple-style-span" style="border-collapse: collapse;"><font class="Apple-style-span" color="#000000"><span class="Apple-style-span" style="border-collapse: separate;"><br>

</span></font></span></font></div><div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(80, 0, 80); "><div><div><div><div>distribution: Voyage 0.6.2</div><div>HW: alix3d3 + Wistron DCMA81 [wifi0: Atheros AR5414 chip found (MAC 10.5, PHY SChip 6.1, Radio 6.3)]</div>

<div><br></div><div>steps:</div><div><br></div><div>assign a STATIC IP address (A.B.C.D) to the alix (since the IP address will be assigned to the bridged interface br0, not the phyisical interface, so dhcp might cause problems)</div>

<div><br></div><div>ifconfig eth0 0.0.0.0 up (this is REALLY 0.0.0.0 since the real IP address should be assigned to br0)</div><div><br></div><div>wlanconfig ath0 destroy</div><div>wlanconfig ath0 create wlandev wifi0 wlanmode ap</div>

<div>iwconfig ath0 essid "voyage" channel 1</div><div>ifconfig ath0 up</div><div>brctl addbr br0</div><div>ifconfig br0 A.B.C.D netmask 255.255.255.0</div><div>brctl addif br0 eth0</div><div>brctl addif br0 ath0</div>

<div><br></div><div>wait few secs</div><div><br></div><div>ping your default gateways (should work!)</div><div><br></div><div>edit /etc/hostapd/hostapd.conf (note: WPA-PSK minimum 8 chars! see the example later)</div><div>

<br></div><div>edit /etc/default/hostapd (otherwise hostapd won't start. it's very self explanatory)</div><div><br></div><div>/etc/init.d/hostapd restart</div><div><br></div></div></div><div>note: if hostapd returns an error, you can try to run "hostapd -dd <conf_file>" to receive additional information on the cause of the problem</div>

<div><div></div><div><div><br></div><div>## /etc/hostapd/hostapd.conf ##</div><div><br></div><div># based on howto at <a href="http://www.linux.com/articles/55617" target="_blank" style="color: rgb(17, 65, 112); ">http://www.linux.com/articles/55617</a></div>

<div>interface=ath0</div><div>bridge=br0</div><div>driver=madwifi</div><div>logger_syslog=-1</div><div>logger_syslog_level=2</div><div>logger_stdout=-1</div><div>logger_stdout_level=2</div><div>debug=2</div><div>dump_file=/tmp/hostapd.dump</div>

<div>ctrl_interface=/var/run/hostapd</div><div>ctrl_interface_group=0</div><div>ssid=voyage</div><div>#macaddr_acl=1</div><div>#accept_mac_file=/etc/hostapd/accept</div><div>auth_algs=3</div><div>eapol_key_index_workaround=0</div>

<div>eap_server=0</div><div>#the following setting is for WPA2 and it works (alfonso)</div><div>wpa=2</div><div>#wpa_psk_file=/etc/hostapd/hostapd.wpa_psk</div><div>wpa_passphrase=simple123</div><div>wpa_key_mgmt=WPA-PSK</div>

<div>wpa_pairwise=CCMP</div><div>wpa_group_rekey=600</div><div>wpa_gmk_rekey=86400</div><div><br></div><div>##EOF##</div><div><br></div><div><span class="Apple-style-span" style="color: rgb(0, 0, 0); "><div>## /etc/network/interfaces<br>

<br></div><div>auto lo<br><span style="white-space: pre; ">     </span>iface lo inet loopback<br><br></div><div>auto eth0<br><span style="white-space: pre; ">      </span>iface eth0 inet manual<br><span style="white-space: pre; ">  </span>up ifconfig eth0 0.0.0.0 up<br>

<span style="white-space: pre; ">       </span>down ifconfig eth0 down<br><span style="white-space: pre; "> </span># address 0.0.0.0</div><div><br>auto ath0<br><span style="white-space: pre; ">     </span>iface ath0 inet static<br>

<span style="white-space: pre; ">       </span>address 192.168.1.251<div class="im" style="color: rgb(80, 0, 80); "><span style="white-space: pre; ">   </span>netmask 255.255.255.0<br><span style="white-space: pre; ">   <span class="Apple-style-span" style="color: rgb(0, 0, 0); white-space: normal; ">broadcast 192.168.1.255</span></span></div>

<span style="white-space: pre; ">       </span>madwifi-base wifi0<br><span style="white-space: pre; ">      </span>wireless-mode Master<br><span style="white-space: pre; ">    </span>up iwpriv ath0 mode 3<br><span style="white-space: pre; ">   </span>up iwconfig ath0 mode master<br>

<span style="white-space: pre; ">       </span>up iwconfig ath0 essid voyage<br><span style="white-space: pre; ">   </span>up iwconfig ath0 txpower auto<br><span style="white-space: pre; ">   </span>up iwconfig ath0 enc off<br><span style="white-space: pre; ">        </span>up iwconfig ath0 rate auto<br>

<span style="white-space: pre; ">       </span>#up nat.sh ath0 eth0 "<a href="http://192.168.1.0/24" target="_blank" style="color: rgb(17, 65, 112); ">192.168.1.0/24</a>"<br><br></div><div>auto br0<br><span style="white-space: pre; ">      </span>iface br0 inet static<br>

<span style="white-space: pre; ">       </span>address 192.168.1.250<div class="im" style="color: rgb(80, 0, 80); "><span style="white-space: pre; ">   </span>netmask 255.255.255.0<br><span style="white-space: pre; ">   <span class="Apple-style-span" style="color: rgb(0, 0, 0); white-space: normal; ">network 192.168.1.0</span></span></div>

<span style="white-space: pre; ">       </span>broadcast 192.168.1.255<br><span style="white-space: pre; "> </span>gateway 192.168.1.254<br><span style="white-space: pre; ">   </span>bridge_ports eth0 ath0<br><span style="white-space: pre; ">  </span>pre-up wlanconfig ath0 destroy<br>

<span style="white-space: pre; ">       </span>pre-up wlanconfig ath0 create wlandev wifi0 wlanmode ap<br><span style="white-space: pre; "> </span>pre-up iwpriv ath0 mode 11g<br><span style="white-space: pre; ">     </span>pre-up iwconfig ath0 essid "voyage" channel 1<br>

<span style="white-space: pre; ">       </span>up ifconfig ath0 down ; ifconfig ath0 up # this is a workaround<br><span style="white-space: pre; "> </span>post-down wlanconfig ath0 destroy<br><br></div><div>#### EOF ####</div>
<div>
<br></div><div>Cheers,</div><div><br></div><div>alfonso</div></span></div></div></div></div></span></div>