wireless interface antenna settings not applied at boot
wireless interface antenna settings not applied at boot as well as if u click save on the wireless page
#1 Updated by Erik Fonnesbeck over 8 years ago
On a system I just tested it on, it is being applied just fine at boot. What type of card do you have? IIRC, I have one card in another system that doesn't seem to accept certain changes to those settings (might be relevant that it was a card with 802.11n support).
Are you saying that it doesn't take effect ever at all or only doesn't take effect at boot? If you have working wireless after boot, then it has surely at least tried to change those settings already. Check the contents of /tmp/ath0_wlan0_setup.sh (or similarly named file). It should have the commands for configuring the antenna settings.
#2 Updated by Bipin Chandra over 8 years ago
i use the atheros based Compex WLM54SAG23 which doesnt have 802.11n so that cant be an issue, on the opt1 page i have set diversity to disabled and transmit and receive both to antenna 1, now when i boot, its supposed to apply those settings but when i see using sysctl dev.ath command, it shows all set to 0, meaning diversity off and both antennas to auto as well and wireless seems to work fine, even after an hour the settings remain as they are but when i checked the /var/tmp/ath0_wlan0_setup.sh it has the following#!/bin/sh
- pfSense wireless configuration script.
- sysctls for ath0
- Enable ATH distance settings
/sbin/athctrl.sh -i ath0 -d '300'
/sbin/ifconfig 'ath0_wlan0' link 'xx:xx:xx:xx:xx:xx'
/usr/sbin/hostapd -B /var/etc/hostapd_ath0_wlan0.conf
/sbin/ifconfig 'ath0_wlan0' link 'xx:xx:xx:xx:xx:xx'
Now regarding the card not taking settings cant be true coz if i use the below commands then those come into effect right away
#4 Updated by Bipin Chandra over 8 years ago
diversity setting command doesn't appear in that file, i pasted the exact contents of the file.
the order of the commands r not important coz when i run them manually in any order, they get applied and stick to those settings till a reboot or at least till a stuck beacon.
#5 Updated by Erik Fonnesbeck over 8 years ago
I've committed a fix for an issue that it may possibly display the wrong option as selected and may possibly save the setting incorrectly in some circumstances (though I'm not completely sure of whether there are any cases where it would have done it incorrectly). When you get the fix, you could try re-saving the settings and applying to see if that makes the command show up for turning diversity off.
#6 Updated by Bipin Chandra over 8 years ago
i tried the latest snap now what happens is as soon as the system boots the values r
then after a few minutes they change to this
but they r never 1,1,0 as its set on the opt2 page, now suppose if i go to the opt1 page and click save and apply then the values change to 1,1,0 as required but again its back to square one on a reboot so i guess during boot, that antenna settings r enver applied at all because if i manually apply them using commands then it remains like that till a reboot meaning it cant fluctuate on its own if set properly so im assuming the settings are not apllied at all, if they would, it would stick to that.
#7 Updated by Erik Fonnesbeck over 8 years ago
Is the diversity setting still not showing up in /var/tmp/ath0_wlan0_setup.sh? (do you have it configured for default, off, or on?) If it is not there in that file, it is possible that the first time it tries to apply the txantenna/rxantenna settings it is only making the diversity setting change. If your WPA is working, it is definitely running those commands in that file - hostapd doesn't get started by pfSense any other way.
#8 Updated by Bipin Chandra over 8 years ago
/tmp/ath0_wlan0_setup.sh has the below
Persist common settings = ticked
behaviour is as usual, on boot antenna settings not applied untill u goto opt1 page and click save or manually reset antenna using command
#11 Updated by Bipin Chandra about 8 years ago
i use the below command to check the applied settings
then i set them properly by using
and they remain then till the next reboot even after days or months but on boot the values r not applied for me, im using a atheros card
what i think is after setting up the wireless card based on its config then some how running those commands would solve it rather than running those commands and then setting up the card
#14 Updated by Jim Pingle about 8 years ago
I am not sure what else might be relevant - If the code did not work, it would be broken for everyone, not just you.
How exactly do you have your wireless setup? Are you using VAPs? Or anything else besides one standard access point setup?
Are both of your misbehaving units setup the same?
Have you tried writing a clean image to a card, setting up only one wireless AP instance, and seeing if the settings stay?
#15 Updated by Bipin Chandra about 8 years ago
- File config-firewall.pfsense-20110801195635.xml added
i just use one card at a time that too as a access point only and nothing fancy, i have tried clearing the config and trying each of those cards and resetting up the access point from scratch but doesnt help, attached is my config, plz delete once u get it
#17 Updated by Jim Pingle about 8 years ago
For starters, in that config you have:
<shellcmd>sysctl dev.ath.0.rxantenna=0;sysctl dev.ath.0.txantenna=0;sysctl dev.ath.0.diversity=0</shellcmd>
That is not needed, you set those on Interfaces > (your wireless interface name), using the drop-down fields. I see you have them selected in the GUI as well, but as 1/1/0.
Get rid of that tag and see if it helps.
#18 Updated by Bipin Chandra about 8 years ago
i removed that line and rebooted, so far the antenna settings r applied, let me test for further 24hrs and if its remains the same, ill report back and then u can close this ticket, u might need to check what r causing those shellcmds to be written to the config.