Skip to content

Migrate ESP32 client-list code from removed tcpip_adapter_* to esp_netif_* - #80

Merged
davidchatting merged 1 commit into
interactionresearchstudio:masterfrom
davidchatting-bot:fix/esp32-tcpip-adapter-migration
Aug 5, 2026
Merged

Migrate ESP32 client-list code from removed tcpip_adapter_* to esp_netif_*#80
davidchatting merged 1 commit into
interactionresearchstudio:masterfrom
davidchatting-bot:fix/esp32-tcpip-adapter-migration

Conversation

@davidchatting-bot

Copy link
Copy Markdown
Contributor

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.

…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
davidchatting merged commit 96f33b5 into interactionresearchstudio:master Aug 5, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ESP32 build fails against current arduino-esp32 core: tcpip_adapter_sta_list_t no longer exists

2 participants