I try to use ESP8266 with independent aku power supply, so mimimizing power consumption is important.
DeepSleep uses 0,2 mA
Wake up and WiFi activity uses 70-150 mA for a 3-6 seconds to connect to a router.
Is it possible to reduce WiFi negotiation time?
I think assign static IP address would be a solution or something else...
Speed up boot time after "deep sleep" and reduce WiFi activity
Speed up boot time after "deep sleep" and reduce WiFi activity
Last edited by VladVons on Sat Mar 14, 2020 9:53 am, edited 3 times in total.
Re: Speed up boot time after "deep sleep" and reduce WiFi activity
This is what I know on the topic: https://blog.voneicken.com/2018/lp-wifi-esp8266-1/
Re: Speed up boot time after "deep sleep" and reduce WiFi activity
loading micropython kernel and init own classes
1.7 seconds
WiFi Connection
With no parameters (previous ESP ROM data):
3.5 seconds for connect
With static IP address + 'bssid' parameter:
2.5 seconds for connect
In post above from 'tve' pointed about 0.175 sec with ssid, passwd, channel, bssid, ip, mask, gw, dns
I tried, but Net.connect() 'channel' is wrong keyword for STA_IF mode
As i understand bssid is a MAC address (B8:69:F4:BD:8F:DC) of WiFi interface MikroTik router
https://docs.micropython.org/en/latest/ ... .WLAN.html
https://docs.micropython.org/en/latest/ ... /wlan.html
But, when i connect my notebook to WiFi router with such fixed parameters it takes 0.1 seconds
ESP connects with 2.5 sec.
25 times slower as usual notebook !
1.7 seconds
WiFi Connection
With no parameters (previous ESP ROM data):
3.5 seconds for connect
With static IP address + 'bssid' parameter:
2.5 seconds for connect
In post above from 'tve' pointed about 0.175 sec with ssid, passwd, channel, bssid, ip, mask, gw, dns
I tried, but Net.connect() 'channel' is wrong keyword for STA_IF mode
Code: Select all
Net = network.WLAN(network.STA_IF)
Net.active(True)
Net.ifconfig(('192.168.2.206', '255.255.255.0', '192.168.2.1', '192.168.2.1'))
Net.connect('MyESSID', '1971xxxx', bssid = b'\xB8\x69\xF4\xBD\x8F\xDC')
while (not Net.isconnected()):
machine.idle()
time.sleep(0.25)
# read DHT sensor
# send MQTT data
# deep sleep
https://docs.micropython.org/en/latest/ ... .WLAN.html
https://docs.micropython.org/en/latest/ ... /wlan.html
But, when i connect my notebook to WiFi router with such fixed parameters it takes 0.1 seconds
ESP connects with 2.5 sec.
25 times slower as usual notebook !
Re: Speed up boot time after "deep sleep" and reduce WiFi activity
See my reply to your other thread about setting the channel. (Note you'll need to modify the C code to make this work).
Re: Speed up boot time after "deep sleep" and reduce WiFi activity
Does ESPNOW work in uPython environment? As ESP8266 devices cost so little, battery powered devices could use the ESPNOW utility for very rapid boot-tx-sleep cycles where a second device is on the same permanent power supply as the WAP infrastructure. In fact the receiving device could use a serial or serial to USB interface to relay on sensor data or what ever the case may be. This is not quite as versatile as for example LoRa for either range or low power but in an instance where typical WiFi range is acceptable but typical WiFi up-time is a power issue then this is surely a compromise.
Has anybody built a ESPNOW module for micropython?
Garry
Has anybody built a ESPNOW module for micropython?
Garry
- rcolistete
- Posts: 352
- Joined: Thu Dec 31, 2015 3:12 pm
- Location: Brazil
- Contact:
Re: Speed up boot time after "deep sleep" and reduce WiFi activity
M5Stack UIFlow flavor of MicroPython has ESPNow support :
https://github.com/m5stack/UIFlow-Code/ ... ed#esp-now
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).