Bug #5121
closedinterfaces.php - Wireless Antenna Selection should default to "Default"
Description
The Transmit and Receive antenna options under "Antenna Settings" are defaulting to "Auto" on bootstrap rather than the "Default" option which was the default on 2.2.x.
Files
Updated by Anonymous about 9 years ago
- Status changed from Confirmed to Feedback
- Assignee changed from Anonymous to Jim Pingle
Antenna controls now default to "Default"
Updated by Anonymous about 9 years ago
- % Done changed from 0 to 100
Applied in changeset pfsense:c71c434b63dfa2bb628cb7dce769d361d385a9b6.
Updated by Jim Pingle about 9 years ago
- Status changed from Feedback to Assigned
- Assignee changed from Jim Pingle to Anonymous
On a fully up-to-date system with a wireless card, it's still defaulting to Auto for me.
Updated by Anonymous about 9 years ago
- Status changed from Assigned to Feedback
- Assignee changed from Anonymous to Jim Pingle
If $pconfig['txantenna'] is not set, the selector value is null, and the null array element is 'Default'.
Would you check your config file please and see what valueis in there for rxantenna and txantenna? Blank, '0' or '1' ?
Thanks
Code:
if (isset($wl_sysctl["{$wl_sysctl_prefix}.txantenna"])) {
$group->add(new Form_Select(
'txantenna',
null,
(isset($pconfig['txantenna'])) ? $pconfig['txantenna']:'',
['' => 'Default', '0' => 'Auto', '1' => '#1', '2' => '#2']
))->setHelp('Transmit antenna');
Updated by Jim Pingle about 9 years ago
- Status changed from Feedback to Assigned
- Assignee changed from Jim Pingle to Anonymous
Before adding the interface it did not exist in config.xml at all and there was nothing in in the wireless tag.
Assigning the interface, it appears like so:
<opt2> <descr><![CDATA[OPT2]]></descr> <if>ath0</if> <wireless/> </opt2>
And farther down in the config:
<wireless/>
Navigating to Interfaces > OPT2 it shows Auto for antennas.
Inspecting the source shows both options marked selected:
<select id="txantenna" class="form-control" name="txantenna"> <option selected="" value="">Default</option> <option selected="" value="0">Auto</option> <option value="1">#1</option> <option value="2">#2</option> </select>
Updated by Anonymous about 9 years ago
- Status changed from Assigned to Feedback
- Assignee changed from Anonymous to Jim Pingle
Thanks for your help in finding this!
It was an obscure issue in the Select.class.php framework file wherein '' == '0' if one is a string and the other an int.
Updated by Anonymous about 9 years ago
Applied in changeset pfsense:87c59979a0624f3ea0ee1ae900b06bcd7e50c98e.
Updated by Jim Pingle about 9 years ago
- Status changed from Feedback to Assigned
- Assignee changed from Jim Pingle to Anonymous
It defaults to "default" now, but when manually set to auto, it still marks default as selected. I know PHP is pretty quirky when it comes to use of empty() on "" vs 0, 0 even as a string all evaluate to true. Might be related.
Updated by Chris Buechler about 9 years ago
Jim T. said the antenna selection is of no use anyway, so should just remove it, then this can be closed out.
Updated by Jim Pingle about 9 years ago
That's probably a good move, though if the framework has a general issue with the scenario it may still come back to haunt us in other areas.
Updated by Anonymous about 9 years ago
- Status changed from Assigned to Feedback
- Assignee changed from Anonymous to Jim Pingle
Fixed and removed.
Updated by Anonymous about 9 years ago
Applied in changeset pfsense:6dee9957d799f5d1254f80d8aa7149ccae1dfa72.
Updated by Jim Pingle about 9 years ago
- Status changed from Feedback to Assigned
- Assignee changed from Jim Pingle to Anonymous
- % Done changed from 100 to 0
The Antenna selection options are still showing up here for me when synced to master.
Updated by Anonymous about 9 years ago
- Status changed from Assigned to Feedback
- Assignee changed from Anonymous to Jim Pingle
Mia culpa
if(ANTENNAS) condition corrected
Updated by Anonymous about 9 years ago
- % Done changed from 0 to 100
Applied in changeset pfsense:725f987f52d6d770d4d4ee522fa71eeb5790b13c.
Updated by Chris Buechler over 8 years ago
- Affected Version changed from All to 2.3
Updated by Jonathan Lee about 1 year ago
Hello, what about 3 antenna port pcie cards? I learned the AR5BXB112 functions in some appliances. Is the 3rd port not utilized in this situation?
ref:
Regression #14703