# [wireless] conecting to another ap

## cloc3

edit: now the thread is going on here

Thank the same for your support.

I've a wireless atheros card to use as an ap for my network.

The card is configured as an access point:

```

 s939 ~ # iwconfig ath0

ath0      IEEE 802.11g  ESSID:"ath0"

          Mode:Master  Frequency:2.412 GHz  Access Point: 00:14:6C:2D:AE:43

          Bit Rate:0 kb/s   Tx-Power:18 dBm   Sensitivity=0/3

          Retry:off   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm

          Rx invalid nwid:64928  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

I need to connect this card to another access point.

The access point correctly detects the existing ap on my server, but the server doesn't see the access point:

```

s939 ~ # iwlist ath0 s

ath0      No scan results

```

If I create the ath0 interface in mode sta, I have a good connection to the ap, but my bridge on the ethernet lan does'nt work.

how may I solve my problem?

----------

## no_hope

could you clarify what you are trying to do? You can't connect two access points together. You either need to set up a repeater or create a second sta VAP on your card and connect it to the other AP. This might help:  http://madwifi.org/wiki/UserDocs (note the WDSBridge section  :Smile: )

You don't get scan results because a VAP in master mode can't scan

----------

## cloc3

 *no_hope wrote:*   

> You can't connect two access points together.

 

Instead, that's exactly what I want to do.

I need this goal to have a repeater (sorry for my english, I hope you may understand the same... even if your nick is no_hope).

Now, configuring my wireless card as ap, I can connect my laptop and I can bridge all my home-ethernet-network together.

But, If I move the laptop far too much, I lose the connession and I need to put another access point (netgear WG602) in the middle way.

The access point detects my wireless card, even if it is configured as ap, but they can't ping together, because I'm not able to correctly set the wireless card. The netgear ap is also able to conncect itself with another ap, but not with my wireless card (configured as ap).

If I configure the wireless card as a station, I can connect it to the remote ap and I can ping the laptop between it.

But I lose the bridge on my ethernet network, which does not work anymore.

I think (I'm not expert, but I've read something somewhere) that the bridge can't work if the card is configured as a station.

Is there a way to workaround this stalemate?

----------

## no_hope

To clarify what I said before: two APs cannot be connected to each other in the same way a client connects to an AP (i.e. using 802.11 lingo an AP cannot associate with another AP). Virtual access points change that, but basically, if you have wireless interface in master mode, it cannot connect to another interface in master mode.

Let me know if I correctly understand what your network topology is and what you are trying to do:

You have a laptop, WG602 and a server. 

The server is connected to a wired network that connects it to the Internet.  

You want to be able to access the Internet using the laptop.

The laptop is too far away from the server

You want to extend the range of the server with WG602.

You set WG602 to be a repeater but it doesn't work with your server?

Is this correct?

(I's sorry I have trouble understanding you. English isn't my first language either  :Smile: )

----------

## cloc3

 *no_hope wrote:*   

> 
> 
> You want to be able to access the Internet using the laptop.
> 
> 

 

Not only the Internet, but all my lan.

So, the eth printer, the adsl modem via pppoe and other eth devices.

My problem is to have a working bridge.

 *no_hope wrote:*   

> 
> 
> (I's sorry I have trouble understanding you. English isn't my first language either )
> 
> 

 

 :Cool: 

----------

## no_hope

did you try this:

http://madwifi.org/wiki/UserDocs/WDSBridge

----------

## cloc3

 *no_hope wrote:*   

> did you try this:
> 
> http://madwifi.org/wiki/UserDocs/WDSBridge

 

Thank you. But that howto seems related to a bridge between a local ap and a local sta.

That's not my case. I need a bridge between my local wireless card (ap or sta doesn't matter, if it works) and my lan.

I was not able to adapt it for my needs.

anyway , I'll try something else tomorrow.

----------

## no_hope

That guide should still for wired adapter as well. I think that by default bridging isn't going to work with madwifi-ng driver, you need to enable wds or something like this. the guide should tell you what you need to do.

----------

## cloc3

 *no_hope wrote:*   

> That guide should still for wired adapter as well. I think that by default bridging isn't going to work with madwifi-ng driver, you need to enable wds or something like this. the guide should tell you what you need to do.

 

here I found something close to my situation.

I'll try it when I' ve enough time.

Yesterday I did something similar but with no lucky.

Thank's again.

----------

## cloc3

 *cloc3 wrote:*   

> 
> 
> here I found something close to my situation.
> 
> 

 

I don't understand.

This procedure is very close to the first one I tried. And it not works in the same manner.

My server should be a station: between an AP wireless and a device (the laptop of the example) on the enet.

So I do The same steps:

```

s939 ~ # wlanconfig ath0 destroy

s939 ~ # wlanconfig ath0 create wlandev wifi0 wlanmode sta

ath0

s939 ~ # iwconfig ath0 essid NETGEAR

s939 ~ # iwpriv ath0 wds 1

s939 ~ # ifconfig eth0 0.0.0.0 up

s939 ~ # ifconfig ath0 0.0.0.0 up

s939 ~ #

```

Now my atheros card is connected to the ap:

```

s939 ~ # iwconfig ath0

ath0      IEEE 802.11g  ESSID:"NETGEAR"

          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:0F:B5:0E:EA:5B

          Bit Rate:36 Mb/s   Tx-Power:18 dBm   Sensitivity=0/3

          Retry:off   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=56/94  Signal level=-39 dBm  Noise level=-95 dBm

          Rx invalid nwid:1  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

s939 ~ #

```

So I go on:

```

939 ~ # brctl addbr br0

s939 ~ # brctl addif br0 eth0

s939 ~ # brctl addif br0 ath0

s939 ~ # ifconfig br0 s939 up

```

Anything should be done.

Instead:

```

s939 ~ # ping netgear

PING netgear.paschini.net (192.168.100.227) 56(84) bytes of data.

From s939.paschini.net (192.168.100.128) icmp_seq=1 Destination Host

Unreachable

From s939.paschini.net (192.168.100.128) icmp_seq=2 Destination Host

Unreachable

From s939.paschini.net (192.168.100.128) icmp_seq=3 Destination Host

Unreachable

--- netgear.paschini.net ping statistics ---

5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4088ms

, pipe 3

s939 ~ # ping stampante

PING stampante (192.168.100.253) 56(84) bytes of data.

64 bytes from dns (192.168.100.253): icmp_seq=1 ttl=60 time=14.8 ms

```

I ping just the enet, not the wireless.

What may I do to find the problem?

----------

