#306: Can't set txpower by iwconfig command
------------------------------------+---------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: dyqith
Type: defect | Status: assigned
Priority: major | Milestone:
Component: madwifi: other | Version: trunk
Resolution: | Keywords: txpower
Patch_attached: 0 |
------------------------------------+---------------------------------------
Comment (by [EMAIL PROTECTED]):
I am *POSITIVE* on the release. The build deletes everything and extracts
from the .tar.gz. I keep replacing it with newer ones. Change to NG was
to get support for the 400mW card && required script changes for
wlanconfig.
I've built a simple script extracting the active code above, Lets walk
this by hand . . .
{{{
===> This shuts everything off (interfaces) and removes the modules . . .
===> NOTE: This only fails on first pass after loading the modules, so we
===> make sure the machine is like it is at bootup.
[netstation]/tmp<16>/etc/rc.d/init.d/ethx.i stop ath0
rmmod wlan_scan_ap
rmmod ath_pci
rmmod ath_rate_sample
rmmod wlan
rmmod ath_hal
===> Now let's look at a freshly created script . . .
[netstation]/tmp<17>cat madwifi-test
#!/bin/sh
modprobe ath_pci autocreate=none
wlanconfig ath0 create wlandev wifi0 wlanmode ap
iwconfig ath0
athctrl -i wifi0 -d 300
ifconfig ath0 up
iwconfig ath0
iwconfig ath0 essid CasaFiestaA
iwconfig ath0
iwconfig ath0 channel 161
iwconfig ath0
iwconfig ath0 txpower 25
iwconfig ath0
===> NOTE: load module, create ap device, Up iface, set id,
===> then channel, then power . . .
===> Let's run it noisily and look after every step . . .
[netstation]/tmp<18>sh -x madwifi-test
+ modprobe ath_pci autocreate=none
Note: /etc/modules.conf is more recent than
/lib/modules/2.4.31/modules.dep
Warning: loading /lib/modules/2.4.31/misc/ath_hal.o will taint the kernel:
non-GPL license - Proprietary
See http://www.tux.org/lkml/#export-tainted for information about
tainted modules
Module ath_hal loaded, with warnings
Module wlan loaded, with warnings
Module ath_rate_sample loaded, with warnings
Module ath_pci loaded, with warnings
+ wlanconfig ath0 create wlandev wifi0 wlanmode ap
ath0
===> I dunno what to tell you,. At this point there is no reported channel
and a
===> reported TX power of 50. Total nonsense in this case as this test is
now
===> running on a CM6, max power = 18db/11b by spec
+ iwconfig ath0
ath0 IEEE 802.11b ESSID:""
Mode:Master Channel:0 Access Point: 00:00:00:00:00:00
Bit Rate:0 kb/s Tx-Power:50 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:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
+ athctrl -i wifi0 -d 300
Setting distance on interface wifi0 to 300 meters
===> Turning on the interface as an AP now gives us some sane stuff.
===> 11g/18dBm AP on channel 1, sans ESSID
+ ifconfig ath0 up
+ iwconfig ath0
ath0 IEEE 802.11g ESSID:""
Mode:Master Frequency:2.412 GHz Access Point:
00:00:00:00:00:00
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:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
===> Now lets change the ESSID to a word, and it's happy . . .
+ iwconfig ath0 essid CasaFiestaA
+ iwconfig ath0
ath0 IEEE 802.11g ESSID:"CasaFiestaA"
Mode:Master Frequency:2.412 GHz Access Point:
00:00:00:00:00:00
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:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
===> Now change the channel to 161 (11a)
===> FAILS!
+ iwconfig ath0 channel 161
+ iwconfig ath0
ath0 IEEE 802.11g ESSID:"CasaFiestaA"
Mode:Master Frequency:2.412 GHz Access Point:
00:00:00:00:00:00
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:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
===> And of course the power setting barfs too.
+ iwconfig ath0 txpower 25
Error for wireless request "Set Tx Power" (8B26) :
SET failed on device ath0 ; Operation not supported.
+ iwconfig ath0
ath0 IEEE 802.11g ESSID:"CasaFiestaA"
Mode:Master Frequency:2.412 GHz Access Point:
00:00:00:00:00:00
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:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
}}}
There it is 6 commands in a row, fails every time.
Couple of other config/hw items:
{{{
[netstation]/tmp<19>cat /proc/cpuinfo
processor : 0
vendor_id : Geode by NSC
cpu family : 5
model : 4
model name : Geode(TM) Integrated Processor by National Semi
stepping : 0
cpu MHz : 266.637
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu tsc msr cx8 cmov mmx
bogomips : 532.48
[netstation]/tmp<20>free
total used free shared buffers cached
Mem: 127152 44368 82784 0 2252 34708
-/+ buffers/cache: 7408 119744
[netstation]/tmp<21>df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/ram0 20821 14895 4851 76% /
tmpfs 63488 108 63380 1% /var
/dev/hda1 20328 7857 11422 41% /cf
/dev/loop0 10816 10816 0 100% /disk
[netstation]/tmp<22>ifconfig
ath0 Link encap:Ethernet HWaddr 00:0B:6B:33:5A:D0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
eth0 Link encap:Ethernet HWaddr 00:0D:B9:01:FF:94
inet addr:192.168.64.117 Bcast:192.168.64.127
Mask:255.255.255.128
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:724 errors:0 dropped:0 overruns:0 frame:0
TX packets:266 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:57943 (56.5 Kb) TX bytes:38267 (37.3 Kb)
Interrupt:10 Base address:0x4000
eth1 Link encap:Ethernet HWaddr 00:0D:B9:01:FF:95
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:11 Base address:0x6000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
wifi0 Link encap:UNSPEC HWaddr 00-0B-6B-33-5A-D0-00-00-00-00-00-00-
00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11 errors:0 dropped:0 overruns:0 frame:911839
TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:1164 (1.1 Kb) TX bytes:2714 (2.6 Kb)
Interrupt:9 Memory:c888f000-c889f000
}}}
U tell me. I'm at a loss
--
Ticket URL: <http://madwifi.org/ticket/306>
MadWifi <http://madwifi.org/>
Multiband Atheros Driver for Wireless Fidelity