For the ESP32 ESP-NOW image on page 1:
I would like to run WiFi for two tasks and ESP-NOW for one task.
Rather than leave my datalogger continuously connected to a hotspot
I thought I would only connect when I want to get the time and when I
want to send a log.
Starting from a hard-reset (ESP32) the first connection to get time
works OK but the 2nd connection to send a log, say 5 minutes later, fails
with a hard reset.
Code: Select all
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:5052
load:0x40078000,len:10600
load:0x40080400,len:5684
entry 0x400806bc
which I think is expected.
After I get the time I do:
Code: Select all
sta_if.disconnect()
sta_if.active(False)
I have read that a connection persists until you do a hard-reboot.
Does this mean you can't do a disconnect and then another re-connect
without a hard-reset? Is it a "persistent" issue that after
searching-around doesn't seem to be available on the ESP series in
Micropython.
Also, if I do a soft-reset just after the 1st connect is closed the
2nd connect runs properly ... sometimes.
I haven't tried the standard image from Micropython Downloads, but will do to check if nothing pops into your mind.
Would you prefer I put these issues on GitHub?
Any suggestions on how to fix this issue appreciated.