我们的一个项目需要处理WIFI事件的回调,我们注册了WIFI回调了,但是收不到事件,从LOG看,一直会打印如发送事件失败,LOG如下:
SDK version:1.3.0(68c9e7b)
mode : sta(5c:cf:7f:12:65:42) + softAP(5e:cf:7f:12:65:42)
add if0
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
add if1
bcn 100
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
add 1
aid 1
sta
tion: 68:3e:34:61:d5:61 join, AID = 1
send EVENT_SOFTAPMODE_STACONNECTED failed
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
send EVENT_SOFTAPMODE_PROBEREQRECVED error
我们的代码如下:
extern void led_wifi_event_handle(System_Event_t *event);
void ICACHE_FLASH_ATTR
user_init(void)
{
wifi_set_event_handler_cb(led_wifi_event_handle);
// Change CPU FREQ to 160MHZ
system_update_cpu_freq(SYS_CPU_160MHZ);
// Add by Harry
uart_init_new();
os_printf("SDK version:%sn", system_get_sdk_version());
// Wifi init
led_wifi_init();
}
void IRAM_ATTR led_wifi_event_handle(System_Event_t *event)
{
os_printf("led_wifi_event_handle evt = %dn",event->event_id);
}
使用的是wifi_set_opmode(STATIONAP_MODE);
请问这是什么原因?