Is there any way to reduce the power of the built in WiFi on the Verdin imx8mp?
When I run iw dev uap0 info, it shows the txpower as 0.00dBm, and any userspace commands (or changes to hostapd.conf) to change this have been unsuccessful. Any suggestions that might limit the power used by WiFi are welcome (we are ok with reduced range).
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello!
The Verdin iMX8M Plus System on Module (SoM) is equipped with the AW-CM276NF module, which provides WiFi capabilities supporting 802.11a/b/g/n/ac standards with dual-band operation at 5 GHz and 2.4 GHz. While the documentation provides guidance on setting up basic WiFi access point functionality, it does not include specific methods for adjusting the WiFi transmit power level.
For power management, the WiFi module on the Verdin iMX8M Plus does feature a power-down pin. This can be controlled via the GPIO2_IO11 pin to reduce power consumption when WiFi is not in use. By setting this GPIO pin to a low state, the WiFi module enters a power-down mode, effectively conserving energy.
If you are looking for ways to manage WiFi power settings, you might consider general approaches used in Linux systems, such as configuring the wireless regulatory domain or using tools like iw to adjust power settings where possible. However, please note that these methods may vary in effectiveness depending on the specific hardware and driver support.
I hope this information helps you with your project. If you have any more questions about Toradex hardware or software, feel free to ask!
I was able to adjust the power on my wifi using the iw command.
root@verdin-imx8mp-07106925:~# iw dev uap0 info
Interface uap0
ifindex 7
wdev 0x2
addr 48:e7:da:78:12:d3
type AP
wiphy 0
txpower 8.00 dBm
root@verdin-imx8mp-07106925:~# iw dev uap0 set txpower fixed 200
root@verdin-imx8mp-07106925:~# iw dev uap0 info
Interface uap0
ifindex 7
wdev 0x2
addr 48:e7:da:78:12:d3
type AP
wiphy 0
txpower 2.00 dBm
I am confused that your device would be reading as 0.00 while mine starts at 8.00.
Can you share more details about your software setup? Are you using Torizon or some other custom Yocto image?
I did a bit more digging and it seems that the BSP reference images report 0.00dBM for some reason even when the interface is active. Not sure why that would differ from the Torizon image I originally tested with.
I did a bit more testing and it seems that the device must be connected in STA mode as well for the power values to be displayed and set. In my case when I connected mlan0 to my home office network I was then able to change the power of both interfaces using the iw commands above and specifying mlan0.
Thank you for the info! I am using a Yocto build, starting from the reference project.
My custom carrier is using uap0 as an access point, and doesn’t use the mlan0 interface. My understanding is that the mlan0 interface is for wifi clients, and uap0 is the interface intended for use as an access point? Is that correct?
Yes, the uap0 interface is used for the access point. This seems to be a limitation of the firmware or the hardware and unfortunately out of our control.There is only one MAC and radio on the chip so there is at least some sense to this behavior.
One thing I want to try is to change the power, before connecting mlan0 and see if the correct power value is shown. My desktop PC is down for maintenance at the moment but I’ll try to test a few things later this afternoon and report back.
It looks to me like setting the power with iw dev works even if it is only reporting a value of 0 when the STA mode interface is down. I don’t have serious testing gear but I was able to run a wifi analyzer on my Mac book and see the signal strength changing for the AP interface when I ran the commands.
Yes, that seems to be the case. My colleague, who is much more knowledgeable about these drivers than I am, indicated he thought that was the expected behavior. I realize it’s not ideal but hopefully won’t be a blocker for you.