Skip to content

Commit

Permalink
fix(wifi): Make sure that esp-hosted events are propagated (espressif…
Browse files Browse the repository at this point in the history
  • Loading branch information
me-no-dev authored Feb 6, 2025
1 parent db0bbad commit 6fcaf69
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libraries/Network/src/NetworkInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void NetworkInterface::_onIpEvent(int32_t event_id, void *event_data) {
);
#endif
memcpy(&arduino_event.event_info.got_ip, event_data, sizeof(ip_event_got_ip_t));
#if SOC_WIFI_SUPPORTED
#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED
if (_interface_id == ESP_NETIF_ID_STA) {
arduino_event.event_id = ARDUINO_EVENT_WIFI_STA_GOT_IP;
} else
Expand All @@ -96,7 +96,7 @@ void NetworkInterface::_onIpEvent(int32_t event_id, void *event_data) {
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
log_v("%s Lost IP", desc());
#endif
#if SOC_WIFI_SUPPORTED
#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED
if (_interface_id == ESP_NETIF_ID_STA) {
arduino_event.event_id = ARDUINO_EVENT_WIFI_STA_LOST_IP;
} else
Expand All @@ -123,7 +123,7 @@ void NetworkInterface::_onIpEvent(int32_t event_id, void *event_data) {
);
#endif
memcpy(&arduino_event.event_info.got_ip6, event_data, sizeof(ip_event_got_ip6_t));
#if SOC_WIFI_SUPPORTED
#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED
if (_interface_id == ESP_NETIF_ID_STA) {
arduino_event.event_id = ARDUINO_EVENT_WIFI_STA_GOT_IP6;
} else if (_interface_id == ESP_NETIF_ID_AP) {
Expand All @@ -136,7 +136,7 @@ void NetworkInterface::_onIpEvent(int32_t event_id, void *event_data) {
arduino_event.event_id = ARDUINO_EVENT_ETH_GOT_IP6;
}
#endif /* CONFIG_LWIP_IPV6 */
#if SOC_WIFI_SUPPORTED
#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED
} else if (event_id == IP_EVENT_AP_STAIPASSIGNED && _interface_id == ESP_NETIF_ID_AP) {
setStatusBits(ESP_NETIF_HAS_IP_BIT);
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_VERBOSE
Expand Down

0 comments on commit 6fcaf69

Please sign in to comment.