Basically the change makes it impossible to run an idle loop and receive wifi change events. I wrote a short test program which is available at https://github.com/tve/esp-test and the key code is at https://github.com/tve/esp-test/blob/ma ... .c#L57-L64 When compiled with SDK 1.3 (see https://github.com/tve/esp-test/blob/ma ... kefile#L22) it prints something like:
Code: Select all
** esp-test ready
mode : sta(18:fe:34:a6:e8:8f)
add if0
f 0, 8853> wifi status=1 tick=0
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
pm open phy_2,type:1 0 0
cnt
connected with tve-home, channel 1
*** WIFI EVENT 0
Wifi connected to ssid tve-home, ch 1
dhcp client start...
10853> wifi status=1 tick=1
12853> wifi status=1 tick=2
*** WIFI EVENT 3
Wifi got ip:192.168.0.114,mask:255.255.255.0,gw:192.168.0.1
ip:192.168.0.114,mask:255.255.255.0,gw:192.168.0.1
14853> wifi status=5 tick=3
16853> wifi status=5 tick=4
Notice the lines with "*** WIFI EVENT" coming from the callback handler at https://github.com/tve/esp-test/blob/ma ... tate.c#L32 (you have to scroll down in the forum code display box).
When compiled against SDK 1.4 the callback handler is not invoked:
Code: Select all
** esp-test ready
mode : sta(18:fe:34:a6:e8:8f)
add if0
f r0, 8689> wifi status=1 tick=0
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 4
cnt
connected with tve-home, channel 1
dhcp client start...
10689> wifi status=1 tick=1
12689> wifi status=1 tick=2
ip:192.168.0.114,mask:255.255.255.0,gw:192.168.0.1
14689> wifi status=5 tick=3
16689> wifi status=5 tick=4
Setting opmode to SOFTAP
state: 5 -> 0 (0)
rm 0
del if0
usl
mode : softAP(1a:fe:34:a6:e8:8f)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
18689> wifi status=255 tick=5
20689> wifi status=255 tick=6
NB: to compile use esp-open-sdk and
Code: Select all
STA_SSID=your-ssid STA_PASS=your-password make
Please fix asap or perhaps better, provide an official way to register an idle handler that gets invoked whenever the system is idle.