ESP-ADF: Connecting to WiFi but not acquiring IP via DHCP
Posted: Sun Dec 13, 2020 12:23 pm
Hello,
I want to use a LyraT board and ESP-ADF to create a Wifi Internet Radio.
When i run the ADF examples like "pipeline_living_stream" my board successfully connects to my Wifi AP (I can see it has associated) but (although I understand this is the default behaviour) it does not acquire an IP address via DHCP. Instead I get a warning about an unhandled WiFi event.
When I run the IDF "components/wifi/getting_started/station" example the board associates with my Wifi AP and successfully acquires an IP address via DHCP.
The AP is accepting both WPA2-PSK and WPA3.
--> Any hints what I am doing wrong here? (and this is my first ADF project, so apologies if this is an obvious question).
zaphodb
ESP-ADF version: v2.2-27-g93d257d
ESP-IDF version: V4.2
Board: Lyra-T 4.3
Console Output "pipeline_living_stream" example (not working):
-------------- snip --------------
I (1537) wifi:mode : sta (ac:67:b2:6f:9c:5c)
I (2857) wifi<11,0>, old:<1,0>, ap:<255,255>, sta:<11,0>, prof:1
I (3487) wifi:state: init -> auth (b0)
I (3497) wifi:state: auth -> assoc (0)
I (3497) wifi:state: assoc -> run (10)
I (3527) wifi:connected with Test, aid = 1, channel 11, BW20, bssid = 38:10:d5:b9:b0:d9
I (3527) wifi:security: WPA2-PSK, phy: bgn, rssi: -64
I (3527) wifi:pm start, type: 1
W (3527) PERIPH_WIFI: WiFi Event cb, Unhandle event_base:WIFI_EVENT, event_id:4
I (3657) wifi:AP's beacon interval = 102400 us, DTIM period = 1
-------------- snip --------------
Console Output ESP-IDF "station" example (working):
-------------- snip --------------
I (1646) wifi<11,0>, old:<1,0>, ap:<255,255>, sta:<11,0>, prof:1
I (1646) wifi:state: init -> auth (b0)
I (4116) wifi:state: auth -> assoc (0)
I (4126) wifi:state: assoc -> run (10)
I (4166) wifi:connected with Test, aid = 1, channel 11, BW20, bssid = 38:10:d5:b9:b0:d9
I (4166) wifi:security: WPA3-SAE, phy: bgn, rssi: -56
I (4176) wifi:pm start, type: 1
I (4176) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (5076) esp_netif_handlers: sta ip: 192.168.1.122, mask: 255.255.255.0, gw: 192.168.1.1
I (5076) wifi station: got ip:192.168.1.122
I (5076) wifi station: connected to ap SSID:Test password:*********
-------------- snip --------------
I want to use a LyraT board and ESP-ADF to create a Wifi Internet Radio.
When i run the ADF examples like "pipeline_living_stream" my board successfully connects to my Wifi AP (I can see it has associated) but (although I understand this is the default behaviour) it does not acquire an IP address via DHCP. Instead I get a warning about an unhandled WiFi event.
When I run the IDF "components/wifi/getting_started/station" example the board associates with my Wifi AP and successfully acquires an IP address via DHCP.
The AP is accepting both WPA2-PSK and WPA3.
--> Any hints what I am doing wrong here? (and this is my first ADF project, so apologies if this is an obvious question).
zaphodb
ESP-ADF version: v2.2-27-g93d257d
ESP-IDF version: V4.2
Board: Lyra-T 4.3
Console Output "pipeline_living_stream" example (not working):
-------------- snip --------------
I (1537) wifi:mode : sta (ac:67:b2:6f:9c:5c)
I (2857) wifi<11,0>, old:<1,0>, ap:<255,255>, sta:<11,0>, prof:1
I (3487) wifi:state: init -> auth (b0)
I (3497) wifi:state: auth -> assoc (0)
I (3497) wifi:state: assoc -> run (10)
I (3527) wifi:connected with Test, aid = 1, channel 11, BW20, bssid = 38:10:d5:b9:b0:d9
I (3527) wifi:security: WPA2-PSK, phy: bgn, rssi: -64
I (3527) wifi:pm start, type: 1
W (3527) PERIPH_WIFI: WiFi Event cb, Unhandle event_base:WIFI_EVENT, event_id:4
I (3657) wifi:AP's beacon interval = 102400 us, DTIM period = 1
-------------- snip --------------
Console Output ESP-IDF "station" example (working):
-------------- snip --------------
I (1646) wifi<11,0>, old:<1,0>, ap:<255,255>, sta:<11,0>, prof:1
I (1646) wifi:state: init -> auth (b0)
I (4116) wifi:state: auth -> assoc (0)
I (4126) wifi:state: assoc -> run (10)
I (4166) wifi:connected with Test, aid = 1, channel 11, BW20, bssid = 38:10:d5:b9:b0:d9
I (4166) wifi:security: WPA3-SAE, phy: bgn, rssi: -56
I (4176) wifi:pm start, type: 1
I (4176) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (5076) esp_netif_handlers: sta ip: 192.168.1.122, mask: 255.255.255.0, gw: 192.168.1.1
I (5076) wifi station: got ip:192.168.1.122
I (5076) wifi station: connected to ap SSID:Test password:*********
-------------- snip --------------