beckdac / ESP8266-transparent-bridge

Absolutely transparent bridge for the ESP8266
GNU General Public License v2.0
367 stars 95 forks source link

AT command to set Tx RF power level #53

Open nbonniere opened 7 years ago

nbonniere commented 7 years ago

For a short range point to point WiFi serial communication, it would be nice to be able to reduce the Tx power. It would also reduce power consumption on battery.

beckdac commented 7 years ago

Is this possible with the ESP libraries?

nbonniere commented 7 years ago

It seems to be possible to set the power from 0 to 20.5 according to some comments such as on: https://github.com/esp8266/Arduino/issues/764 and https://github.com/esp8266/Arduino/blob/41074245a8d3029270622a8b489d53fdfedb2a22/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp#L169-L179

/* set the output power of WiFi

nbonniere commented 7 years ago

The datasheet for the AT command set also has power control support in 0.25 db steps, 0 to 20.5 : maximum value of RF TX power, range 0 ~ 82, unit:0.25dBm

https://www.itead.cc/wiki/images/5/53/Esp8266_at_instruction_set_en_v1.5.4_0.pdf