Project

General

Profile

Actions

Bug #1121

closed

wireless interface antenna settings not applied at boot

Added by Bipin Chandra over 13 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Wireless
Target version:
Start date:
12/20/2010
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.0
Affected Architecture:

Description

wireless interface antenna settings not applied at boot as well as if u click save on the wireless page

Actions #1

Updated by Erik Fonnesbeck over 13 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.

Actions #2

Updated by Bipin Chandra over 13 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
  1. pfSense wireless configuration script.
  1. sysctls for ath0
    /sbin/sysctl dev.ath.0.txantenna='1'
    /sbin/sysctl dev.ath.0.rxantenna='1'
  2. 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
sysctl dev.ath.0.rxantenna=1
sysctl dev.ath.0.txantenna=1

Actions #3

Updated by Erik Fonnesbeck over 13 years ago

Is the diversity setting in there as well, or is it missing? Do the commands work when used in the exact order in which they are placed in that file?

Actions #4

Updated by Bipin Chandra over 13 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.

Actions #5

Updated by Erik Fonnesbeck over 13 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.

Actions #6

Updated by Bipin Chandra over 13 years ago

i tried the latest snap now what happens is as soon as the system boots the values r
dev.ath.0.txantenna: 0
dev.ath.0.rxantenna: 2
dev.ath.0.diversity: 0
then after a few minutes they change to this
dev.ath.0.txantenna: 0
dev.ath.0.rxantenna: 1
dev.ath.0.diversity: 0
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.

Actions #7

Updated by Erik Fonnesbeck about 13 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.

Actions #8

Updated by Bipin Chandra about 13 years ago

/tmp/ath0_wlan0_setup.sh has the below

/sbin/sysctl dev.ath.0.diversity='0'
/sbin/sysctl dev.ath.0.txantenna='1'
/sbin/sysctl dev.ath.0.rxantenna='1'

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

Actions #9

Updated by Jim Pingle over 12 years ago

  • Status changed from New to Feedback

I can't reproduce this on current snapshots. If I set to Diversity=Off, And TX/RX for antenna 2, then it shows 2/2/0 after I set it, at boot, and even 10 minutes after bootup.

Actions #10

Updated by Bipin Chandra over 12 years ago

for me i have set diversity off and tx/rx to 1 but after boot those values r all 0 and even after leaving it as it is for 24hrs still same, they never get applied till i type out the command and do it manually

Actions #11

Updated by Bipin Chandra over 12 years ago

i use the below command to check the applied settings
sysctl dev.ath

then i set them properly by using
sysctl dev.ath.0.txantenna=1
sysctl dev.ath.0.rxantenna=1
sysctl dev.ath.0.diversity=0

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

Actions #12

Updated by Jim Pingle over 12 years ago

There may be something specific to your card or config going on then, as no matter what I do, the settings always apply, and they always stay.

Actions #13

Updated by Bipin Chandra over 12 years ago

what info can i provide for analysis coz i have 2 atheros cards and both the same, both different makes but same atheros chip

Actions #14

Updated by Jim Pingle over 12 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?

Actions #15

Updated by Bipin Chandra over 12 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

Actions #16

Updated by Jim Pingle over 12 years ago

  • File deleted (config-firewall.pfsense-20110801195635.xml)
Actions #17

Updated by Jim Pingle over 12 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.

Actions #18

Updated by Bipin Chandra over 12 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.

Actions #19

Updated by Jim Pingle over 12 years ago

  • Status changed from Feedback to Closed

Nothing puts them in the config. You had to have done that manually.

Actions #20

Updated by Bipin Chandra over 12 years ago

i never put anything manually coz i have no knowledge in freebsd etc, i dont even know where the config file is stored, i simply exported the config, removed the line and restored it using the web gui, neways ill respond if any such thing happens again

Actions

Also available in: Atom PDF