Espruino WiFi: WiFi tweaking possible?

Posted on
  • While my Espruino WiFi works perfectly well I want to reduce the power consumption. Is there a good way to do this? I see there is a Wifi .at module, are the any useful 'at' commands that don't mess up Wifi?

  • Yes, absolutely! The WiFi module on Espruino WiFi is a standard ESP8266 running AT command firmware - and the docs for it are here: https://www.espressif.com/sites/default/¬≠files/documentation/4a-esp8266_at_instru¬≠ction_set_en.pdf

    The best way to reduce power is to stay disconnected from WiFi with the ESP8266 off for as long as possible, but there are some AT commands that might help. AT+RFPOWER and maybe AT+RFVDD look promising, but I'm not sure if there are any others.

    To send the command, try:

    wifi.at.cmd("AT+RFPOWER=50\r\n", 1000/*a timeout in ms*/, function(d) {
      if (d=="OK") console.log("All Ok.");
      else console.log("Error",d);
    });
    
  • Just tried "AT+RFPOWER=10\r\n" and the ESP's temperature went down noticebly. Thanks!

  • Great! That might be an interesting command to add to Espruino WiFi... Does it seem to affect WiFi range for you?

  • It doesn't make any difference for me, but the device is only 5 m away from the access point.
    This command is definitely useful, but there seems to be a little more investigation desirable.
    The inquiry (AT+RFPOWER?) returns with an error. The ESP docs say something about disabling a pin (which I didn't know how to do). Also there is an acompanying command AT+RFVDD which seems to do the same thing or is even more powerful .

    While RFPOWER takes numbers as argument, there seems to be a direct conversion to dbm, which might be more desirable? If RFVDD works, it seems to be a voltage.

    In summary: quite a few people might like a new setRfPower(x), a complementary
    getRfPower() would be even better.

  • I guess it's possible that the PDF file I linked is for a different version of the ESP8266 firmware to the one that's actually on the ESP8266 - which I guess might explain if something like AT+RFPOWER? fails. You could try AT+RFPOWER=?? If I recall, sometimes commands use that form instead.

  • The ...=? form returns the possible values, the one without '=' the current value (or vice versa).
    I tried both forRFPOWER and they don't work for me.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Espruino WiFi: WiFi tweaking possible?

Posted by Avatar for Steffen @Steffen

Actions