arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.23k stars 4.81k forks source link

ported range_extender to ESP-IDF v5 #22198

Closed pharaocurt closed 1 month ago

pharaocurt commented 1 month ago

Description:

Related issue (if applicable): fixes #

Checklist:

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

pharaocurt commented 1 month ago

ported xdrv_58_range_extender to work with current ESP-IDF v5. i had do add new #define USE_WIFI_RANGE_EXTENDER_PORTADD, which must not be defined for correct linking, else an undefined reference error will occur: ip_portmap_add. This function is defined in lwip/lwip_napt.h, but only compiled with defined option IP_NAPT_PORTMAP on generation of arduino-esp32 library. Therefore it is currently not possible to add a portmap to enable access of a port from main network on the range extended network without added route to extended network at main gateway. If arduino-esp32 library will be enhanced by IP_NAPT_PORTMAP, my changes with USE_WIFI_RANGE_EXTENDER_PORTADD can be removed, but this feature could not be verified currently.

pharaocurt commented 1 month ago

ported xdrv_58_range_extender.ino to ESP-IDF v5. Tested to work correctly on ESP32 with and without NAPT, but prevoius full features could not be reached. I had to add definition #define USE_WIFI_RANGE_EXTENDER_PORTADD, which must not be defined for final correct linking, else: undefined reference to `ip_portmap_add'. This function is defined in "lwip/lwip_napt.h", but only compiled and available with option IP_NAPT_PORTMAP, which seems beeing undefined in tasmotas arduino-esp32 library. With enhanced arduino-esp32 library, the #ifdef USE_WIFI_RANGE_EXTENDER_PORTADD and #endif can be removed to include full previous functionallity, but this is currently untested.

sfromis commented 1 month ago

Were you trying to fix the pending issue about the Range Extender failing compile? https://github.com/arendst/Tasmota/issues/21200

pharaocurt commented 1 month ago

Yes, i think the Range Extender failing compile can be solved (with the limitation i mentioned above) by these few changes in my try range_extender branch. But i fail in creation of a correct pull request.