How connect 2 PC with ath in hostap mode ?

Marcin Jessa lists at yazzy.org
Tue Oct 4 00:35:22 PDT 2005


On Tue, 4 Oct 2005 10:25:40 +0400
Andrey Smagin <samspeedu at mail.ru> wrote:

> Hello Marcin,
> 
> MJ> man ifconfig should be the place to start.
>  :) re read it 2 year, for information about
> MJ> Anyway, you can connect two PCs when one of them runs in
> MJ> hostap and the other one in ad-hoc mode.
> MJ> This will set up one of them as AP:
> MJ> ifconfig_ath0="inet 12.23.34.1 netmask 255.255.255.0 ssid Andrey
> MJ> mode 11g mediaopt hostap"
> 
> MJ> And one in adhoc:
> MJ> ifconfig_ath0="inet 12.23.34.1 netmask 255.255.255.0 ssid Andrey
> MJ> channel 6 mode 11g mediaopt adhoc"
> 
> MJ> You can also run both atheros nics in ad-hoc mode and bridge their
> MJ> interfaces with wired nics.
> 
>  My most qestion - how increase speed for ad-hoc<=>ad-hoc connection.
> It mode have very small speed(40KBy/s) . For me important  bridge on
> both sides for connect 2 wired LAN segments through air. When i
> connect client<=>hostup bridging not work (but speed 2MBy/s between
> this hosts). I am will try ad-hoc<=>hostap.

How are you bridging the interfaces? What kind of bridging mechanism
are you using?

Anyway, the difference in speed is indeed strange.
Try to set following:
sysctl dev.ath.0.tpscale=1
sysctl dev.ath.0.tpc=1
sysctl dev.ath.0.diversity=0
ifconfig ath0 protmode off
ifconfig ath0 mtu 2290

You could also use device tap (virtual ethernet) and connect two lan's
that way running one link in hostap and the other bss mode. Check out
the vtun port.

> MJ> And you can set up your atheros access point as apbridge which
> MJ> will pass packets between wireless clients directly.
> 
>  For me not enough for connect another WiFi clients, now configured
> -apbridge.
> 
> MJ> You cannot connect two APs in hostap mode as they will never
> MJ> associate to one another.
> 

I am not sure why you have such a speed loss running in adhoc mode.
What I noticed on NetBSD (where the ath driver is not yet fully ported)
was I got pretty decent speed with the same setup as yours (2xath in
adhoc bridged with wired nics) but my embedded devices allways crashed
when I sent over many small packets.

Cheers
Marcin


More information about the freebsd-net mailing list