diff --git a/platformio_tasmota_cenv_sample.ini b/platformio_tasmota_cenv_sample.ini index 2eb6bce81..e086b1094 100644 --- a/platformio_tasmota_cenv_sample.ini +++ b/platformio_tasmota_cenv_sample.ini @@ -11,7 +11,6 @@ build_flags = ${env:tasmota32_base.build_flags} -D FIRMWARE_TASMOTA32 -D USE_WIFI_RANGE_EXTENDER -D USE_WIFI_RANGE_EXTENDER_NAPT - -D USE_WIFI_RANGE_EXTENDER_CLIENTS [env:tasmota32s3-file] extends = env:tasmota32_base diff --git a/tasmota/tasmota_xdrv_driver/xdrv_58_range_extender.ino b/tasmota/tasmota_xdrv_driver/xdrv_58_range_extender.ino index c8af4b4d2..e5b26bef1 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_58_range_extender.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_58_range_extender.ino @@ -96,10 +96,8 @@ const char kDrvRgxCommands[] PROGMEM = "Rgx|" // Prefix "|" "NAPT" #endif // USE_WIFI_RANGE_EXTENDER_NAPT -#ifdef USE_WIFI_RANGE_EXTENDER_CLIENTS "|" "Clients" -#endif // USE_WIFI_RANGE_EXTENDER_CLIENTS "|" "Address" "|" @@ -112,9 +110,7 @@ void (*const DrvRgxCommand[])(void) PROGMEM = { #ifdef USE_WIFI_RANGE_EXTENDER_NAPT &CmndRgxNAPT, #endif // USE_WIFI_RANGE_EXTENDER_NAPT -#ifdef USE_WIFI_RANGE_EXTENDER_CLIENTS &CmndRgxClients, -#endif // USE_WIFI_RANGE_EXTENDER_CLIENTS &CmndRgxAddresses, &CmndRgxAddresses, }; @@ -133,6 +129,7 @@ void (*const DrvRgxCommand[])(void) PROGMEM = { #ifdef ESP32 #include "lwip/lwip_napt.h" #include +#include "esp_wifi.h" #endif // ESP32 #define RGX_NOT_CONFIGURED 0 @@ -172,29 +169,25 @@ void RgxCheckConfig(void) } } -#ifdef USE_WIFI_RANGE_EXTENDER_CLIENTS -#include "esp_wifi.h" - void CmndRgxClients(void) { wifi_sta_list_t wifi_sta_list = {0}; tcpip_adapter_sta_list_t adapter_sta_list = {0}; - + esp_wifi_ap_get_sta_list(&wifi_sta_list); tcpip_adapter_get_sta_list(&wifi_sta_list, &adapter_sta_list); - Response_P(PSTR("[")); + Response_P(PSTR("{\"RgxClients\":{")); const char *sep = ""; for (int i=0; i