Is the "Distance Setting" feature broken?
-
I just tested this here and it appears to work:
ath0_setup.sh
ath0_setup.sh: Command not found.
/bin/sh ath0_setup.sh
- /usr/bin/killall hostapd
- /sbin/athctrl.sh -i ath0 -d 100
Setup IFS parameters on interface ath0 for 100 meter p-2-p link
dev.ath.0.slottime: 20 -> 10
dev.ath.0.acktimeout: 23 -> 23
dev.ath.0.ctstimeout: 23 -> 23 - /sbin/ifconfig ath0 mediaopt hostap
- /sbin/ifconfig ath0 mode 11a
- /sbin/ifconfig ath0 channel 0
- /sbin/ifconfig ath0 mediaopt turbo
- /sbin/ifconfig ath0 ssid pfsense
- /sbin/ifconfig ath0 hidessid
- /sbin/ifconfig ath0 -mediaopt adhoc
- /sbin/ifconfig ath0 protmode off
- /sbin/ifconfig ath0 -pureg
- /sbin/ifconfig ath0 apbridge
- /sbin/ifconfig ath0 -wme
- /sbin/ifconfig ath0 authmode open wepmode off
- /sbin/ifconfig ath0 txpower 99
- /sbin/ifconfig ath0 up
- /usr/sbin/hostapd -B /var/etc/hostapd_ath0.conf
Configuration file: /var/etc/hostapd_ath0.conf
Using interface ath0 with hwaddr 00:0b:6b:36:14:e6 and ssid 'pfsense'
Flushing old station entries
Deauthenticate all stations
and on another run:
/bin/sh ath0_setup.sh
- /usr/bin/killall hostapd
- /sbin/athctrl.sh -i ath0 -d 1000
Setup IFS parameters on interface ath0 for 1000 meter p-2-p link
dev.ath.0.slottime: 20 -> 13
dev.ath.0.acktimeout: 29 -> 29
dev.ath.0.ctstimeout: 29 -> 29 - /sbin/ifconfig ath0 mediaopt hostap
- /sbin/ifconfig ath0 mode 11a
- /sbin/ifconfig ath0 channel 0
- /sbin/ifconfig ath0 mediaopt turbo
- /sbin/ifconfig ath0 ssid pfsense
- /sbin/ifconfig ath0 hidessid
- /sbin/ifconfig ath0 -mediaopt adhoc
- /sbin/ifconfig ath0 protmode off
- /sbin/ifconfig ath0 -pureg
- /sbin/ifconfig ath0 apbridge
- /sbin/ifconfig ath0 -wme
- /sbin/ifconfig ath0 authmode open wepmode off
- /sbin/ifconfig ath0 txpower 99
- /sbin/ifconfig ath0 up
- /usr/sbin/hostapd -B /var/etc/hostapd_ath0.conf
Configuration file: /var/etc/hostapd_ath0.conf
Using interface ath0 with hwaddr 00:0b:6b:36:14:e6 and ssid 'pfsense'
Flushing old station entries
Deauthenticate all stations
My sysctls show these values too after the script was run. Btw, if you want to debug, the webgui generates a script /tmp/ath0_setup.sh and runs it.
-
Hi, thanks for you response.
I've done some testing and got some conclusions, the first one is that the distance setting works fine with CM9 card, but not with SuperG SMC card (SMCWPCIT-G). It allways stays at the value of 48. The card is AR2414 chipset.
CM9 at 300 meters
$ sysctl dev.ath.0 dev.ath.0.%desc: Atheros 5212 dev.ath.0.%driver: ath dev.ath.0.%location: slot=13 function=0 dev.ath.0.%pnpinfo: vendor=0x168c device=0x0013 subvendor=0x185f subdevice=0x1012 class=0x020000 dev.ath.0.%parent: pci0 dev.ath.0.smoothing_rate: 95 dev.ath.0.sample_rate: 10 dev.ath.0.countrycode: 0 dev.ath.0.regdomain: 0 dev.ath.0.slottime: 20 dev.ath.0.acktimeout: 23 dev.ath.0.ctstimeout: 23 dev.ath.0.softled: 0 dev.ath.0.ledpin: 0 dev.ath.0.ledon: 0 dev.ath.0.ledidle: 270 dev.ath.0.txantenna: 0 dev.ath.0.rxantenna: 2 dev.ath.0.diversity: 1 dev.ath.0.txintrperiod: 5 dev.ath.0.diag: 0 dev.ath.0.tpscale: 0 dev.ath.0.tpc: 0 dev.ath.0.tpack: 63 dev.ath.0.tpcts: 63 dev.ath.0.rfsilent: 1 dev.ath.0.rfkill: 1 dev.ath.0.monpass: 24
SMCWPCIT-G at any distance
$ sysctl dev.ath.0 dev.ath.0.%desc: Atheros 5212 dev.ath.0.%driver: ath dev.ath.0.%location: slot=13 function=0 dev.ath.0.%pnpinfo: vendor=0x168c device=0x0013 subvendor=0x1113 subdevice=0xee23 class=0x020000 dev.ath.0.%parent: pci0 dev.ath.0.smoothing_rate: 95 dev.ath.0.sample_rate: 10 dev.ath.0.countrycode: 0 dev.ath.0.regdomain: 96 dev.ath.0.slottime: 20 dev.ath.0.acktimeout: 48 dev.ath.0.ctstimeout: 48 dev.ath.0.softled: 0 dev.ath.0.ledpin: 0 dev.ath.0.ledon: 0 dev.ath.0.ledidle: 2700 dev.ath.0.txantenna: 0 dev.ath.0.rxantenna: 1 dev.ath.0.diversity: 0 dev.ath.0.txintrperiod: 5 dev.ath.0.diag: 0 dev.ath.0.tpscale: 0 dev.ath.0.tpc: 0 dev.ath.0.tpack: 63 dev.ath.0.tpcts: 63 dev.ath.0.monpass: 24
I'm starting to think this is something that's locked in the firmware of the card.
I tried to find the distance calculated to achieve the value "dev.ath.0.acktimeout: 48" for the CM9, by inputing values in the WebGUI until I got a similar value, and got for 3900 meters "dev.ath.0.acktimeout: 47" and "dev.ath.0.acktimeout: 49" for 4000 meters. I found this strange, I don't think the SMC defaults to this distance. :oCan someone on the forum that's using other Atheros cards than CM9 post their default values?
Thanks in advance.
-
What does the card report when running "/bin/sh /tmp/ath0_setup.sh" from the shell. Maybe it gives you a hint what's going wrong with this card.
-
/bin/sh /tmp/ath0_setup.sh
- /sbin/athctrl.sh -i ath0 -d 600
getopt: not found
Usage: /sbin/athctrl.sh [-i athX] [-d meters] - /sbin/ifconfig ath0 -mediaopt hostap
- /sbin/ifconfig ath0 mode 11g
- /sbin/ifconfig ath0 channel 11
- /sbin/ifconfig ath0 -mediaopt turbo
- /sbin/ifconfig ath0 ssid wireless
- /sbin/ifconfig ath0 -hidessid
- /sbin/ifconfig ath0 -mediaopt adhoc
- /sbin/ifconfig ath0 protmode off
- /sbin/ifconfig ath0 -pureg
- /sbin/ifconfig ath0 -apbridge
- /sbin/ifconfig ath0 -wme
- /sbin/ifconfig ath0 authmode open wepmode off
- /sbin/ifconfig ath0 txpower 99
- /sbin/ifconfig ath0 up
- /sbin/athctrl.sh -i ath0 -d 600
-
really looks like your card doesn't support that setting as it returns an error. maybe lsf has more infos on that.
-
The SMC card has regdomain set to 96 while the CM9 has it set to 0, I don't know if this is something related to this.
I've also noticed that the card is recognized as Atheros 5212, but the chip is AR2414, perhaps there's something in the HAL that needs to be updated to support this card, there are a few models/brands that use this chip.If possible, I would like to ear feedback from other users of Atheros cards non-CM9, about this setting.
Thank you.
-
Could you try to change these settings manually ?
sysctl dev.ath.0.slottime=40 sysctl dev.ath.0.acktimeout=60 sysctl dev.ath.0.ctstimeout=60
The values are not important, as long as they are changeable.
If they are then athctl.sh might have a bug. If they are locked then either the HAL(driver) has a bug or the card has them locked (if it's HW locked then this would be very unusual.) -
I don't the chance to test this now, i'll test it in a few hours. I tried a different card, NTech SuperG Atheros PCI adapter, wich I believe its the same chip, with the same behavior.
-
@lsf:
Could you try to change these settings manually ?
sysctl dev.ath.0.slottime=40 sysctl dev.ath.0.acktimeout=60 sysctl dev.ath.0.ctstimeout=60
The values are not important, as long as they are changeable.
If they are then athctl.sh might have a bug. If they are locked then either the HAL(driver) has a bug or the card has them locked (if it's HW locked then this would be very unusual.)I tried to change the values manually, and it worked fine.
Where can I find the algorithm that converts meters to the correct value to input.
Also, how can I make the changes exist after a reboot?
Thank you
-
The "magic" happens in the /sbin/athctrl.sh script.