OpenWrt Forum Archive

Topic: Connect as client to access point

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

I would like to know how to make a openrwt box connect to an access point. I don't want the thing to do any routing or bridging, just act as a normal linux box with with a wifi port and ethernet port. I have looked around a bit and cant find anything useful (the client stuff has sketchy documentation. And where is the documentation for the webgui? You can set it for client mode and scan from there but not select a network for connecting?!?)

I just want to use the openwrt box as a compact controller for other devices, wireless like.

Than you in advance.

So you just want your AP to act like a regular wireless PC client? Do you want it to use DHCP or static IP configuration?

If you want it to use DHCP to get it's IP information here is the way I would do it:

1) Login to the web interface and click Administration Mode
2) Click Network->WIFI->WL0
2a) check Enable wireless
2b) Select channel that matches your other AP
2c) Set ESSID to match your other AP
2d) Select "wan" network
2e) Set mode to "Client"
2f) Set encryption type and key to match other AP
2g) Click "Save and Apply"

That's pretty much it. Plug a cable in and log into the lan IP and you should see that your wl0 interface (assuming you are using 2.4 kernel) has an address served by the other AP. Remember the firewall would be currently configured to block everything on that wan interface by default so you would have to turn that off or configure to whatever incoming connections you want to allow. I wouldn't try to use the "lan" network for DHCP because if there is a problem and it doesn't get an address how are you going to connect to the unit? And if it does get an address how are you going to know what that is without being connected to the unit? Keeping a static address on the "lan" network gives you a way to get into the box via a cable.

Thats the first thing I tried. I used the "essentials" part of the interface though. I tried again, using the  administration part of the interface.  I did all the things you said and I am still not getting am ip. I double checked the wifi setting on the normal AP and I have every set correctly. And clicking the 'scan' button identified my wireless network and its channel. Are there other setting I need to change? Looking at the Interfaces page shows lan:eth0 as active but wan: wlan0 as not active. I tried clicking the check box to activate it but after a 'save & apply' it becomes unchecked again. The whole networking interface is far more confusing then it needs to be. Are it has links to nonexistent firewall config pages.  (I did not change the firewall, I can open ports after I have an IP address)  Thanks for the help so far.



By the way... I have the most recent release of kamikaze installed on an actiontec GT701-WG. (yay for $4.99 goodwill routers!)

When I created those instructions I wiped my router clean with a fresh copy of 8.09.2 (2.4 version) and it worked perfectly. Sounds like you need to figure why the checkbox doesn't stay checked. I'm pretty sure that's your problem. My checkbox stays checked. To be honest I didn't even look at the firewall page and never changed anything with it. What does "iwconfig" show?

root@BotzRoot:~# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11b+/g+  ESSID:"badlands"  Nickname:"acx v0.3.37"
          Mode:Managed  Frequency:2.452 GHz  Access Point: Not-Associated   
          Bit Rate:2 Mb/s   Tx-Power=15 dBm   Sensitivity=1/3 
          Retry min limit:7   RTS thr:off   
          Encryption key:(MY WEP KEY) [4]   Security mode:restricted
          Power Management:off
          Link Quality=50/100  Signal level=31/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

I got into linux after the GUI mas mature. I have been lucky not to have to mess with network stuff like this before (or unlucky perhaps)
I just installed the firmware on the router today. This is the first thing I tried to do with it.
Thanks again.

(Last edited by ndsharp on 15 Jan 2010, 09:18)

Looks like you are using the 2.6 kernel. I'm not familiar with your hardware but I know with the Linksys routers the 2.4 kernel seems to work the best for the most part. Is there a 2.4 version of Openwrt for that router? I would try it. It does appear that it recognizes your wireless card but it's not associating. Is there any clue in the output of the "dmesg" command?

I looked around the wiki for information on your hardware and firmware and I don't feel comfortable offering any advice in that area since I don't have that same hardware to test with. Hopefully someone here who is can help you.

Sorry, its long.

It finds the a matching ssid, and tries to connect. After that it just looks like a bunch of quth requests with no other info that I can identify. Just allot of awaiting response.
I looked and there does not seem to be a 2.4 kernel version like there is for the wrt54 routers.

Here is the tail end of the dmesg command:

scan table: SSID="badlands" CH=9 SIR=30 SNR=0
peer_cap 0x0471, needed_cap 0x0001
found station with matching ESSID! ('badlands' station, 'badlands' config)
matching station found: 00:0F:B3:35:2B:E5, joining
sending authentication1 request (auth algo 1), awaiting response
acx_set_status(2):WAIT_AUTH
AUTHEN adev->addr=00:20:E0:32:00:00 a1=00:20:E0:32:00:00 a2=00:0F:B3:35:2B:E5 a3=00:0F:B3:35:2B:E5 adev->bssid=00:0F:B3:35:2B:E5
auth algorithm 1, auth sequence 2, status 0
transmit_authen3!
rates_basic:0003, rates_supported:1FFF
BSS_Type = 2
JoinBSSID MAC:00:0F:B3:35:2B:E5
acx_i_timer: adev->status=2 (WAIT_AUTH)
resend authen1 request (attempt 2)
sending authentication1 request (auth algo 1), awaiting response
AUTHEN adev->addr=00:20:E0:32:00:00 a1=00:20:E0:32:00:00 a2=00:0F:B3:35:2B:E5 a3=00:0F:B3:35:2B:E5 adev->bssid=00:0F:B3:35:2B:E5
auth algorithm 1, auth sequence 2, status 0
transmit_authen3!
acx_i_timer: adev->status=2 (WAIT_AUTH)
resend authen1 request (attempt 3)
sending authentication1 request (auth algo 1), awaiting response
AUTHEN adev->addr=00:20:E0:32:00:00 a1=00:20:E0:32:00:00 a2=00:0F:B3:35:2B:E5 a3=00:0F:B3:35:2B:E5 adev->bssid=00:0F:B3:35:2B:E5
auth algorithm 1, auth sequence 2, status 0
transmit_authen3!
acx_i_timer: adev->status=2 (WAIT_AUTH)
resend authen1 request (attempt 4)
sending authentication1 request (auth algo 1), awaiting response
AUTHEN adev->addr=00:20:E0:32:00:00 a1=00:20:E0:32:00:00 a2=00:0F:B3:35:2B:E5 a3=00:0F:B3:35:2B:E5 adev->bssid=00:0F:B3:35:2B:E5
auth algorithm 1, auth sequence 2, status 0
transmit_authen3!
acx_i_timer: adev->status=2 (WAIT_AUTH)
resend authen1 request (attempt 5)
sending authentication1 request (auth algo 1), awaiting response
AUTHEN adev->addr=00:20:E0:32:00:00 a1=00:20:E0:32:00:00 a2=00:0F:B3:35:2B:E5 a3=00:0F:B3:35:2B:E5 adev->bssid=00:0F:B3:35:2B:E5
auth algorithm 1, auth sequence 2, status 0
transmit_authen3!
acx_i_timer: adev->status=2 (WAIT_AUTH)
resend authen1 request (attempt 6)
sending authentication1 request (auth algo 1), awaiting response
AUTHEN adev->addr=00:20:E0:32:00:00 a1=00:20:E0:32:00:00 a2=00:0F:B3:35:2B:E5 a3=00:0F:B3:35:2B:E5 adev->bssid=00:0F:B3:35:2B:E5
auth algorithm 1, auth sequence 2, status 0
transmit_authen3!
acx_i_timer: adev->status=2 (WAIT_AUTH)
resend authen1 request (attempt 7)
sending authentication1 request (auth algo 1), awaiting response
AUTHEN adev->addr=00:20:E0:32:00:00 a1=00:20:E0:32:00:00 a2=00:0F:B3:35:2B:E5 a3=00:0F:B3:35:2B:E5 adev->bssid=00:0F:B3:35:2B:E5
auth algorithm 1, auth sequence 2, status 0
transmit_authen3!
acx_i_timer: adev->status=2 (WAIT_AUTH)
resend authen1 request (attempt 8)
sending authentication1 request (auth algo 1), awaiting response
AUTHEN adev->addr=00:20:E0:32:00:00 a1=00:20:E0:32:00:00 a2=00:0F:B3:35:2B:E5 a3=00:0F:B3:35:2B:E5 adev->bssid=00:0F:B3:35:2B:E5
auth algorithm 1, auth sequence 2, status 0
transmit_authen3!
acx_i_timer: adev->status=2 (WAIT_AUTH)
resend authen1 request (attempt 9)
sending authentication1 request (auth algo 1), awaiting response
AUTHEN adev->addr=00:20:E0:32:00:00 a1=00:20:E0:32:00:00 a2=00:0F:B3:35:2B:E5 a3=00:0F:B3:35:2B:E5 adev->bssid=00:0F:B3:35:2B:E5
auth algorithm 1, auth sequence 2, status 0
transmit_authen3!
acx_i_timer: adev->status=2 (WAIT_AUTH)
resend authen1 request (attempt 10)
sending authentication1 request (auth algo 1), awaiting response
AUTHEN adev->addr=00:20:E0:32:00:00 a1=00:20:E0:32:00:00 a2=00:0F:B3:35:2B:E5 a3=00:0F:B3:35:2B:E5 adev->bssid=00:0F:B3:35:2B:E5
auth algorithm 1, auth sequence 2, status 0
transmit_authen3!

Man, it looks like your hardware is working and it can see the other AP but it's not associating. Are you sure the encryption types match and the key is correct? Do you control the other AP? Is there any sort of mac restrictions enabled that are preventing you from connecting? This one is beyond me. Hopefully a dev will be able to spot something.

Well, thanks for all your help. I know know more then I did.
I do control the access point. No mac restriction, just the most basic wep. So I will try disabling the wep and see if that fixes it.

Thank you again for the help.

The discussion might have continued from here.