OpenWrt Forum Archive

Topic: Install and Setup wpa_supplicant for using WPA, WPA2.

The content of this topic has been archived on 27 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

I am giving up. Can't be that hard? Yes, it can! I was trying to get OpenWrt running on my Netgear WGT634U today. The flashing procedure worked flawlessly. I could flash Kamikaze using the webinterface. Changed the password and disabled telnet and enabled SSH. Great.

The next thing I did was activating the WLAN-signal. Edited the /etc/config/wireless and the /etc/config/network. Used the samples from this page:

http://openwrt.loswillios.de/

I rebooted and the WLAN-signal was active, but: not encrypted. I read on and on and figured out that wpa_supplicant has to be installed. But that seems not available in the packages-file. What is going on here?

How do I setup this one? And why is there no working tutorial for such a common task?


Greetings.

gentlesea wrote:

I rebooted and the WLAN-signal was active, but: not encrypted. I read on and on and figured out that wpa_supplicant has to be installed. But that seems not available in the packages-file. What is going on here?

As always. It's the best if you build (I recommend latest trunk) by yourself and use your own package repository created during the build proccess. Only build the package and features you need (select only them in menuconfig).

For WPA encryption in AP mode you need hostapd and in client-mode you need wpa-supplicant packages.

I have not tested client-mode (routed nor bridged) for a long time and so I don't now if that works at all.

To get WPA2-PSK in AP mode working you have to do the following after flashing on the router

> ipkg update
> ipkg install hostapd

> uci set wireless.@wifi-device[0].disabled=0
> uci set wireless.@wifi-iface[0].encryption=psk2
> uci set wireless.@wifi-iface[0].key='mytopsecretkey'
> uci commit wireless
> wifi

You can do the same in the LuCI WebUI (if you have LuCI installed) like this (http://192.168.1.1/):
Administration

System / Software
  - Click on Update package lists
  - Download and install package: hostapd
       - Click OK

Network / Wifi / WIFI0
  - Device wifi0 / enable: check
  - Interfaces / Encryption: WPA2-PSK
  - Interfaces / Key: mytopsecretkey
  - Click the Save & Apply button

(Last edited by Yanira on 6 Sep 2008, 11:06)

Hi,

Thanks for briniging this up, I'd been banging my head against this problem for hours.

I could get a WEP network working without a problem but when I tried PSK if wouldn't encrypt, I just got an open network, no errors, nothing.
I installed hostapd and it worked magically.

It's worth pointing out that this works even if you are using the "wireless" file for config rather than "uci set...".



Cheers.

Andy.

Yeah, many thanks for giving clear advice. But actually I'm still stuck compiling the firmware. First of all I had to checkout the current version and then I did a

make menuconfig

I selected

Target Profile (Netgear WGT634U)
Target System (Broadcom BCM947xx/953xx [2.6])

saved and started compiling with

make world V=99

That results in the following error:

In file included from ./include/sys/types.h:31,
                 from ./include/stdlib.h:306,
                 from ./ldso/include/ldso.h:28,
                 from ldso/ldso/ldso.c:33:
./include/bits/types.h:206:32: error: bits/pthreadtypes.h: No such file or directory
make[4]: *** [ldso/ldso/ldso.oS] Error 1

I guess there is still some package missing on my buils-system. But which one?

The discussion might have continued from here.