How to remove wifi callback "ip log"

zhanggx9
Posts: 7
Joined: Fri Mar 02, 2018 11:11 pm

How to remove wifi callback "ip log"

Postby zhanggx9 » Tue Mar 13, 2018 3:58 pm

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;
//...
}
}

Her Mary
Posts: 537
Joined: Mon Oct 27, 2014 11:09 am

Re: How to remove wifi callback "ip log"

Postby Her Mary » Tue Mar 27, 2018 5:23 pm

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.

zhanggx9
Posts: 7
Joined: Fri Mar 02, 2018 11:11 pm

Re: How to remove wifi callback "ip log"

Postby zhanggx9 » Fri Mar 30, 2018 2:48 pm

Oh, it seems I can do nothing abou it. Still thanks for your replay.

Who is online

Users browsing this forum: No registered users and 314 guests