Page 1 of 1

How to remove wifi callback "ip log"

Posted: Tue Mar 13, 2018 3:58 pm
by zhanggx9
Hello everyone,

I found a strange "ip log" in wifi callback function with ESP8266_RTOS_SDK V1.5.0.

I regist wifi callback function in user_set_station_config(), and found a strange "ip log"
twice when power up, one of them is printed by cb funciotn list as follows, but where does
the other one come from?
I tried to comment the print log in cb function, and the "ip log" is still printed once.
Even more, the "ip log" is printed sometimes when the system works.

If the cb function not be called, the additional "ip log" dispears.
I want to know, where the additional "ip log" come from, and how to kill it.

Would you pls offer some help.
Thanks!

"ip log" printed as follows:
ip:192.168.43.187,mask:255.255.255.0,gw:192.168.43.1



void user_set_station_config(void)
{
//...
wifi_set_event_handler_cb(wifi_handle_event_cb)
//...
}

void wifi_handle_event_cb(System_Event_t *evt)
{
printf("event 0x%x\n", evt->event_id);
switch (evt->event_id)
{
//...
case EVENT_STAMODE_GOT_IP:
printf("zgxip:" IPSTR ",mask:" IPSTR ",gw:" IPSTR, IP2STR(&evt->event_info.got_ip.ip),
IP2STR(&evt->event_info.got_ip.mask), IP2STR(&evt->event_info.got_ip.gw));
printf("\r\n");
user_tcp_socket();
break;
//...
}
}

Re: How to remove wifi callback "ip log"

Posted: Tue Mar 27, 2018 5:23 pm
by Her Mary
I guess that it is printed by the system itself, and if you also add the log in your application as the code you provided, it will print twice.
You can just remove the one you add in your application.

Re: How to remove wifi callback "ip log"

Posted: Fri Mar 30, 2018 2:48 pm
by zhanggx9
Oh, it seems I can do nothing abou it. Still thanks for your replay.