Gentoo Archives: gentoo-user

From: Florian Philipp <lists@××××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Wireless: Limit rate to strengthen connection?
Date: Fri, 28 Mar 2008 18:02:40
Message-Id: 1206727330.30987.119.camel@NOTE_GENTOO64.PHHEIMNETZ
In Reply to: Re: [gentoo-user] Wireless: Limit rate to strengthen connection? by Richard Marzan
1 On Thu, 2008-03-27 at 20:42 -0400, Richard Marzan wrote:
2 > On Wed, 2008-03-26 at 19:52 -0700, Grant wrote:
3 > > > > > > > I'm trying to strengthen a wireless connection that spans about 150
4 > > > > > > > feet and has to go through about 5 walls. I bought two of these:
5 > > > > > > >
6 > > > > > > > http://www.newegg.com/Product/Product.aspx?Item=N82E16833164110
7 > > > > > > >
8 > > > > > > > for either end of the connection, but I'm having trouble making it
9 > > > > > > > work well. I've noticed the connection will be perfect for a short
10 > > > > > > > time, but then disappear. When watching iwconfig during this process,
11 > > > > > > > it looks like the connection is good when on a low rate, but when it
12 > > > > > > > goes to 54 Mbps it falls apart.
13 > > > > > > >
14 > > > > > > > Should limiting the rate solve this problem? If so, how can I do
15 > > > > > > > that? I'm using hostapd on the AP and wpa_supplicant on the client.
16 > > > > > > >
17 > > > > > > > - Grant
18 > > > > > >
19 > > > > > > Grant,
20 > > > > > >
21 > > > > > > Yes, lowering the rate to a "slower" speed will help greatly. The lower
22 > > > > > > rates use less compression and modulation... less complex wave forms
23 > > > > > > better connects over long hauls.
24 > > > > > >
25 > > > > > > The antennas look very good, but what's driving them? I use and whole
26 > > > > > > heartedly endorse SENAO products and have had very good luck with these
27 > > > > > > models: ECB-3220 (400 mw) or 2611CB3 PLUS (200 mw) at:
28 > > > > > > http://www.wlansolution.com. Either unit with the high gain antennas you
29 > > > > > > have, will penetrate what you stated and probably go pretty high on the
30 > > > > > > speed scale doing it too.
31 > > > > >
32 > > > > > I'm using a Netgear PCI adapter on the AP and an Edimax USB adapter on
33 > > > > > the client. Do you know how I can limit the rate? Should it be done
34 > > > > > on the Gentoo AP or the client?
35 > > > > >
36 > > > > > - Grant
37 > > > >
38 > > > > I use wireless-tools from portage. In it is iwconfig. A simple man iwconfig
39 > > > > will show you what you need. Other thing you could do is configure the
40 > > > > Wireless AP for a fixed rate... works for me.
41 > > >
42 > > > I found this:
43 > > >
44 > > > rate_wlan0=( "5.5M" )
45 > > >
46 > > > which isn't documented in net.wireless, but it doesn't seem to have
47 > > > any affect. I've tried it on the router and the client which uses
48 > > > wpa_supplicant. I still see the rate on the client fluctuate all the
49 > > > way up to 54 Mb/s in the output from iwconfig. The router's rate is
50 > > > always reported as 0 kb/s.
51 > > >
52 > > > - Grant
53 > >
54 > > It appears 'iwconfig wlan0 rate 11M' works (at least as far as the
55 > > output from iwconfig is concerned) but how can I set /etc/conf.d/net
56 > > to always use this rate?
57 > >
58 > > - Grant
59 >
60 > The best way I found to do this is to just write your own script and run
61 > it at the default runlevel. write a script called wireless-up save it in
62 > your /root directory. Then in /etc/conf.d/local.start add the script
63 > name to the list: /root/wireless-up. Make sure the script is executable
64 > with chmod 666 /root/wireless-up. Here is what mine looks like. I laugh
65 > when I read this thing that I call a script. I'll be upgrading this in
66 > the future but for now maybe someone has a better idea and/or script.
67 >
68 > #!/bin/bash
69 > DATE=`date +%m_%d_%Y`
70 > ifconfig wlan0 up || "echo wlan up failed"
71 > iwconfig wlan0 essid ACCESSPOINTNAME || "echo setting essid failed"
72 > iwconfig wlan0 mode Managed || echo "setting mode to managed failed"
73 > iwconfig wlan0 key restricted YOURKEYHERE || echo "key failed
74 > verification"
75 > dhclient wlan0 || echo "wlan0 failed to receive dhcp request response"
76 > # if [ $DATE -ne `date +%m_%d_%Y -r /tmp/.wireless.*
77 > rm /tmp/.wireless.*
78 > iwconfig >> /tmp/.wireless.$DATE
79 > exit 0
80 >
81 >
82 >
83
84 For custom scrips, you can add a preup, failup or postup-function
85 to /etc/conf.d/net, there should be examples in the file.
86
87 Something like
88
89 pastup() {
90 if [[ ${IFACE} = "wlan0" ]]; then
91 iwconfig [...]
92 fi
93 return 0
94 }
95
96 should work.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Wireless: Limit rate to strengthen connection? Florian Philipp <lists@××××××××××××××××××.net>
Re: [gentoo-user] Wireless: Limit rate to strengthen connection? "Aleksey V. Kunitskiy" <alexey.kv@×××××.com>