Gl-mifi and ar150 wifi monitor mode and txpower

Hi,

We have stock of gl-mifi and ar-150 on which we run the wifi chip in monitor mode.

I’m trying to reduce the txpower on the device. The reason for this is that I believe this may stop the wifi chipset from frying when our customers ignore our advice and plug the antenna in while the device is powered up. We don’t need any txpower in monitor mode as we are not transmitting any data.

When the wifi chip is in AP mode, I am able to successfully lower the wifi dBm setting either from the luci interface or /etc/config/wireless or iw commands. I have tested attaching/detaching antenna with device powered on when the txpower is set to 0dBm and I don’t appear to have fried the antenna. This is great!

However, as soon as I set the wifi chip to ‘monitor mode’ the txpower is automatically set to 18dBm (as shown by ‘iw wlan0 info’). No matter what I try, I can’t get it to accept a change to 0dBm. I know that the wifi chipset is bound by regulatory limitations in terms of txpower and channels. However, surely I am allowed to reduce the txpower to as little as I desire?

Any ideas as to what I can do to change this, or any workarounds, would be really appreciated. Thanks.

In “Monitoring mode”, the device do not transmit signals. So only RX is meaningful.

Txpower is only for AP and is not related to monitor mode.

Hi Alzhao,

Thanks for your reply. Indeed we don’t need any TX power for monitoring mode (although actually I think there are flags for monitoring mode where you would need to TX data, e.g. ‘use active mode (ACK incoming unicast packets)’ - though we don’t use this. This is the output of iw info in monitor mode.

root@bm110143:~# iw wlan0 info
Interface wlan0
ifindex 10
wdev 0x2
addr e4:95:6e:41:a8:5f
type monitor
wiphy 0
channel 11 (2462 MHz), width: 20 MHz (no HT), center1: 2462 MHz
txpower 18.00 dBm

So even if we aren’t sending any data when monitor mode enabled, my theory is that just by having 18dBm configured, 63mW of power is enabled somewhere on the chip (rather than 1mW when the txpower is set to 0dBm) and this is enough to short the sensitive RX circuitry when our users attach antenna while device powered on.

I appreciate this is a niche use-case and that users shouldn’t be attaching the antenna with the device powered on. However, it would be really good to stop the shorts from happening in our-case as we have a lot of damaged stock. Customers just don’t listen when we tell them about the antenna attachment procedure :frowning:

TXpower should be device wide and I am not sure why it is not respected if you only config monitor mode.

Is it possible that you can try to set the txpower manually using iw. Just to check if this is possible.

Changing manually using iw has no effect unfortunately:

root@[redacted]:~# iw wlan0 set txpower fixed 100
root@[redacted]:~# iw wlan0 info
Interface wlan0
	ifindex 11
	wdev 0x2
	addr [redacted]
	type monitor
	wiphy 0
	channel 11 (2462 MHz), width: 20 MHz (no HT), center1: 2462 MHz
	txpower 18.00 dBm

Then it is monitor interface don’t accept txpower parameter.

Try make a AP interface along with monitor interface and check.

@alzhao - sorry for delay in response. I’ve tried your suggestion, with some success, thanks!

If I set up an AP interface (for our use-case, it is hidden and with maxassoc=0 - we never want anyone to try to connect to it) and then the monitor interface, then iw info returns txpower of 0 for both interfaces. I think it has to be set up with the AP as the first interface, i.e. in position wireless.@wifi-iface[0].

I have done probably more than 100 antenna ‘hotplugs’ now without causing any damage. HOWEVER, I am now struggling to damage any devices even with the changes reverted. So I can’t be sure that my changes are really helpful.

I suspect that different component tolerances in different units mean that some are less prone to damage. Any electrical measurements you can suggest to help test that my changes are effective would be really appreciated.

Why you do so many hot plugs of antennas.

If you can just use without doing that, then that should be OK. I don’t think we will do such kind of testing because it is not a normal way.

Hi,

The 100+ hotplugs are just me trying to test my solution.

In real life, our (non-technical) customers (who hire the devices from us) hotplug occasionally because they forget our instruction to not do it.