1. My goal is:
Call a callback after trying to connect to wifi network
2. My actions are:
I set a callback for the ip_aquired event from wifi lib:
mgos_event_add_handler(MGOS_WIFI_EV_STA_IP_ACQUIRED, connection_successed_cb, ri);
3. The result I see is:
the net lib (from mongoose-os core) and the wifi lib (from mongoose-os-libs) triggers the same event
[Oct 17 21:56:05.161] mgos_wifi.c:136 WiFi STA: Connected, BSSID 00:1a:3f:97:c5:da ch 1 RSSI -46
[Oct 17 21:56:05.161] mgos_net.c:89 WiFi STA: connected
[Oct 17 21:56:09.106] ip:10.0.0.105,mask:255.255.255.0,gw:10.0.0.1
[Oct 17 21:56:09.106] main.c:30 callback here
[Oct 17 21:56:09.106] main.c:30 callback here
4. My expectation & question is:
Why this happens and how to prevented?