| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

ClientMode (Managed Mode) with WPA-Supplicant

This version was saved 18 years ago View current version     Page history
Saved by PBworks
on March 11, 2006 at 7:06:59 pm
 

ClientMode with WPA-Supplicant

 

  • first of all you need to install wpa-supplicant, if you have not compiled in

 

$ ipkg install wpa-supplicant

 

This will also install libopenssl...

Or you use:

(Thanks to Yasha)

 

  • then create a configuration file for wpa-supplicant named "wpa_supplicant.conf"

 

$ vi /etc/wpa_supplicant.conf

 

Here you can find some information and an example configuration file: http://hostap.epitest.fi/wpa_supplicant/

 

  • let's have a look into /etc/modules.d/20-madwifi ... change "ath_pci" to "ath_pci autocreate=sta"

 

  • now "reboot"

 

  • now it's time for more input:

 

$ iwconfig ath0 essid channel ap xx:xx:xx:xx:xx:xx

 

 

ap-ssid = ssid of the ap you want to connect to

ch# = channel number of the ap

xx:xx:xx:xx:xx:xx = mac of the ap you want to connect to

 

To enhance the connection you can also activate some additional features

 

$ iwpriv ath0 turbo 1

$ iwpriv ath0 xr 1

$ iwpriv ath0 burst 1

 

These settings can be added to /etc/init.d/S20madwifi to automate this.

 

  • now run wpa-supplicant:

 

$ wpa_supplicant -c /etc/wpa_supplicant.conf -iath0 -B -Dmadwifi

 

Now wait a bit to get the connection completed.

You can controll this running "wpa_cli" (status).

 

  • after the connection to the ap has status COMPLETED you have to enter:

 

$ iwpriv ath0 wds 1

$ brctl addif br0 ath0

 

This will enable bridging mode and will add the wireless device to the bridge.

It is important, that you make this after the connection is completed, otherwise the connection will timeout and fail.

 

Now the router works as a wireless bridge an you can connect some clients to the lan side of the wgt634u.

 

If somebody has a sollution to automate the process, please let me know.

 

Here is my /etc/config/network as an example:

 

#### VLAN configuration

vlan0hwname=et0

vlan0ports="0 1 2 3 4 5*"

vlan1hwname=et0

vlan1ports="5"

# I don't need the wan port, because the wgt is only client...

# so I have added the wan port to vlan0

 

#### LAN configuration

lan_proto="static"

lan_ifname="vlan0"

lan_ifnames="vlan0 eth1"

lan_ipaddr="192.168.11.254"

lan_dns="192.168.11.254"

lan_gateway="192.168.11.254"

 

#### WAN configuration

wan_proto=none

wan_ifname=""

# not using wan

#wan_device="vlan1"

#wan_dns=""

Comments (0)

You don't have permission to comment on this page.