Migrate ESP32 client-list code from removed tcpip_adapter_* to esp_netif_* - #80
Merged
davidchatting merged 1 commit intoAug 5, 2026
Conversation
…tif_* Fixes interactionresearchstudio#61. tcpip_adapter_get_sta_list()/tcpip_adapter_sta_list_t were removed from current ESP-IDF (the tcpip_adapter component was deprecated in favour of esp_netif years ago) - the arduino-esp32 core CI pulls no longer has them, so the ESP32 build failed outright: YoYoWiFiManager.h:183:5: error: 'tcpip_adapter_sta_list_t' does not name a type; did you mean 'tcpip_adapter_if_t'? esp_netif_get_sta_list()/esp_netif_sta_list_t is ESP-IDF's documented 1:1 replacement - same field shape (.num, .sta[].mac, .sta[].ip), just under the esp_netif_* namespace, so this is a straight migration rather than a redesign. ESP8266 is untouched and unaffected: it never used real ESP-IDF tcpip_adapter types in the first place - wifi_sta.h is this library's own hand-rolled shim providing tcpip_adapter_sta_info_t/ tcpip_adapter_sta_list_t independently of ESP-IDF, only compiled into the ESP8266 build. Also removed three now-dead tcpip_adapter_sta_info_t local variable declarations (getPeerN(), countPeers(), getClientsAsJson()) that only existed to hold a copy of an adapter_sta_list.sta[] element - replaced the two that were actually used with `auto` so they pick up whichever platform's element type applies, and removed the one in getClientsAsJson() outright since it was already unused dead code before this change. Not hardware/toolchain-tested here (no ESP32 SDK available in this environment - not enough disk space for the full arduino-esp32 toolchain) - based on ESP-IDF's documented tcpip_adapter -> esp_netif migration path. Relying on CI to confirm. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
davidchatting
merged commit Aug 5, 2026
96f33b5
into
interactionresearchstudio:master
1 of 2 checks passed
davidchatting
added a commit
that referenced
this pull request
Aug 6, 2026
…-migration Fix ESP32 station-IP lookup - correction to the esp_netif migration just merged in #80
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #61.
`tcpip_adapter_get_sta_list()`/`tcpip_adapter_sta_list_t` were removed from current ESP-IDF (the `tcpip_adapter` component was deprecated in favour of `esp_netif` some time ago). The `arduino-esp32` core CI pulls no longer has them, so the ESP32 build fails outright:
```
YoYoWiFiManager.h:183:5: error: 'tcpip_adapter_sta_list_t' does not name a type; did you mean 'tcpip_adapter_if_t'?
```
`esp_netif_get_sta_list()`/`esp_netif_sta_list_t` is ESP-IDF's documented 1:1 replacement - same field shape (`.num`, `.sta[].mac`, `.sta[].ip`), so this is a straight migration rather than a redesign.
ESP8266 is untouched and unaffected - it never used real ESP-IDF `tcpip_adapter` types in the first place. `src/YoYoWiFiManager/wifi_sta.h` is this library's own hand-rolled shim providing `tcpip_adapter_sta_info_t`/`tcpip_adapter_sta_list_t` independently of ESP-IDF, only compiled into the ESP8266 build - that's untouched by this PR.
Also removed three `tcpip_adapter_sta_info_t station;` local variable declarations (`getPeerN()`, `countPeers()`, `getClientsAsJson()`) that only ever held a copy of an `adapter_sta_list.sta[]` element - replaced the two actually-used ones with `auto` so they pick up whichever platform's element type applies, and removed the one in `getClientsAsJson()` outright since it was already dead/unused before this change.
Testing
Not hardware/toolchain-tested - there wasn't enough disk space in this environment to install the full `arduino-esp32` core + toolchain to test-compile locally, so this is based on ESP-IDF's documented `tcpip_adapter` → `esp_netif` migration path rather than a verified build. CI should confirm either way - will keep an eye on the checks on this PR.