Inability to get IP

Ojisan Seiuchi
Posts: 2
Joined: Thu May 03, 2018 5:22 pm

Inability to get IP

Postby Ojisan Seiuchi » Mon Dec 17, 2018 12:10 am

Recently, I'm unable to obtain an IP address for an application that runs a TCP server. Even the example tcp_server.c application fails in a similar fashion.

ESP-IDF version 3.1.1 (though 3.3 beta-something behaved similarly)
Netgear Nighthawk R8500 router (though other WiFi networks that bypass that router also fail similarly) - rebooted several times without change.

Notably, I've been able to able to connect in the past without any difficulties. In the interim, no change in network topology. No change in the application code, etc.

In short, this is what I see. This pattern continues ad infinitum. Happy to post code, but it's essentially just the tcp_server.c example application minimally modified.

Code: Select all

I (179) wifi: wifi driver task: 3ffc100c, prio:23, stack:3584, core=0
I (179) wifi: wifi firmware version: b2c9a19
I (179) wifi: config NVS flash: enabled
I (189) wifi: config nano formating: disabled
I (189) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (199) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (219) wifi: Init dynamic tx buffer num: 32
I (219) wifi: Init data frame dynamic rx buffer num: 32
I (219) wifi: Init management frame dynamic rx buffer num: 32
I (229) wifi: Init static rx buffer size: 1600
I (229) wifi: Init static rx buffer num: 10
I (239) wifi: Init dynamic rx buffer num: 32
I (239) example: Setting WiFi configuration SSID UhYesAndNo...
I (329) phy: phy_version: 4000, b6198fa, Sep  3 2018, 15:11:06, 0, 0
I (329) wifi: mode : sta (30:ae:a4:8f:56:1c)
I (329) example: Waiting for AP connection...
I (339) example: SYSTEM_EVENT_STA_START
I (459) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (1439) wifi: state: init -> auth (b0)
I (2439) wifi: state: auth -> init (200)
I (2439) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (2439) example: SYSTEM_EVENT_STA_DISCONNECTED
I (3769) wifi: n:11 0, o:1 0, ap:255 255, sta:11 0, prof:1
I (3769) wifi: state: init -> auth (b0)
I (4769) wifi: state: auth -> init (200)
I (4779) wifi: n:11 0, o:11 0, ap:255 255, sta:11 0, prof:1
I (4779) example: SYSTEM_EVENT_STA_DISCONNECTED
I (7189) example: SYSTEM_EVENT_STA_DISCONNECTED

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Inability to get IP

Postby Ritesh » Mon Dec 17, 2018 6:39 pm

Ojisan Seiuchi wrote:
Mon Dec 17, 2018 12:10 am
Recently, I'm unable to obtain an IP address for an application that runs a TCP server. Even the example tcp_server.c application fails in a similar fashion.

ESP-IDF version 3.1.1 (though 3.3 beta-something behaved similarly)
Netgear Nighthawk R8500 router (though other WiFi networks that bypass that router also fail similarly) - rebooted several times without change.

Notably, I've been able to able to connect in the past without any difficulties. In the interim, no change in network topology. No change in the application code, etc.

In short, this is what I see. This pattern continues ad infinitum. Happy to post code, but it's essentially just the tcp_server.c example application minimally modified.

Code: Select all

I (179) wifi: wifi driver task: 3ffc100c, prio:23, stack:3584, core=0
I (179) wifi: wifi firmware version: b2c9a19
I (179) wifi: config NVS flash: enabled
I (189) wifi: config nano formating: disabled
I (189) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (199) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (219) wifi: Init dynamic tx buffer num: 32
I (219) wifi: Init data frame dynamic rx buffer num: 32
I (219) wifi: Init management frame dynamic rx buffer num: 32
I (229) wifi: Init static rx buffer size: 1600
I (229) wifi: Init static rx buffer num: 10
I (239) wifi: Init dynamic rx buffer num: 32
I (239) example: Setting WiFi configuration SSID UhYesAndNo...
I (329) phy: phy_version: 4000, b6198fa, Sep  3 2018, 15:11:06, 0, 0
I (329) wifi: mode : sta (30:ae:a4:8f:56:1c)
I (329) example: Waiting for AP connection...
I (339) example: SYSTEM_EVENT_STA_START
I (459) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (1439) wifi: state: init -> auth (b0)
I (2439) wifi: state: auth -> init (200)
I (2439) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (2439) example: SYSTEM_EVENT_STA_DISCONNECTED
I (3769) wifi: n:11 0, o:1 0, ap:255 255, sta:11 0, prof:1
I (3769) wifi: state: init -> auth (b0)
I (4769) wifi: state: auth -> init (200)
I (4779) wifi: n:11 0, o:11 0, ap:255 255, sta:11 0, prof:1
I (4779) example: SYSTEM_EVENT_STA_DISCONNECTED
I (7189) example: SYSTEM_EVENT_STA_DISCONNECTED
It seems there might be some issues into hardware as same firmware was working before. Would you please check it by enabling AP mode and able to form the network. Means mobile device can connect with that network.

If that works fine then check with AP+STA mode with same test case which you have followed earlier. So that we can isolate issue as quickly as possible.
Regards,
Ritesh Prajapati

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: Inability to get IP

Postby fly135 » Tue Dec 18, 2018 8:54 pm

Can you post the disconnect reason code? I find I get a random number of 203 codes when trying to connect. It generally connects. If it fails 25 times I reboot and try again. Never could get anyone to confirm they see this. I don't get it with wep, just wpa.

Who is online

Users browsing this forum: No registered users and 138 guests