Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web interface is not showing any AP #128

Open
3 tasks done
kaizoku-oh opened this issue Mar 25, 2021 · 4 comments
Open
3 tasks done

Web interface is not showing any AP #128

kaizoku-oh opened this issue Mar 25, 2021 · 4 comments

Comments

@kaizoku-oh
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am using the latest version of esp32-wifi-manager
  • I have searched open and closed issues to ensure it has not already been reported

Description

I'm trying to use wifi manager but the Web interface is not showing any AP knowing that there are close nearby APs

Steps to Reproduce

void wifi_manager_sta_got_ip_cb(void *pvParameter)
{
  ip_event_got_ip_t *pstIPAddr;
  char tcIpString[sizeof("xxx.xxx.xxx.xxx")];

  pstIPAddr = (ip_event_got_ip_t*)pvParameter;
  /* transform IP to human readable string */
  esp_ip4addr_ntoa(&pstIPAddr->ip_info.ip, tcIpString, IP4ADDR_STRLEN_MAX);
  ESP_LOGI(TAG, "I have a connection and my IP is %s!", tcIpString);
}

void wifi_manager_sta_discon_cb(void *pvParameter)
{
  wifi_event_sta_disconnected_t *pstWifiDiscon;

  pstWifiDiscon = (wifi_event_sta_disconnected_t*)pvParameter;
  ESP_LOGW(TAG, "Station disconnected with reason code: %d", pstWifiDiscon->reason);
}

/* start the wifi manager */
wifi_manager_start();
/* register a callback to be called when station is connected to AP */
wifi_manager_set_callback(WM_EVENT_STA_GOT_IP, &wifi_manager_sta_got_ip_cb);
/* register a callback to be called when station is disconnected from AP */
wifi_manager_set_callback(WM_EVENT_STA_DISCONNECTED, &wifi_manager_sta_discon_cb);

SharedScreenshot

System Configuration

ESP32 board

  • Environment (Operating system, version and so on): Windows 10
  • Additional information:
@mtetreault
Copy link

Could you confirm that there are 2.4Ghz wifi network around you? The esp32 does not support 5Ghz wifi.

Otherwise, do you have a branch where I could take a look at the code, if you are using the default_demo as I think you are, it should work just fine as it is.

@kaizoku-oh
Copy link
Author

kaizoku-oh commented May 29, 2021

Yes there are 2.4GHz wifi network arround me.
Here is the example I'm using: https://github.com/kaizoku-oh/pio-wifi-manager-example

@mtetreault
Copy link

I've sent you a PR on your repo, everything builds and run on my side. I have no experiences with platformIO so there might be some differences. With my normal ESP-IDF setup, the project was not building it was giving me some errors.

I've built using the ESP-IDF docker and tested on ESP32-WROOM-32E.

Let me know how it goes.

@JackHuang021
Copy link

set board_build.embed_files instead of board_build.embed_txtfiles in platformio.ini

diff --git a/platformio.ini b/platformio.ini
index 4f1498a..f8bdb0b 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -14,8 +14,9 @@ board = nodemcu-32s
 framework = espidf

 monitor_speed = 115200

-board_build.embed_txtfiles =
+board_build.embed_files =
   components/esp32-wifi-manager/src/index.html
   components/esp32-wifi-manager/src/code.js
   components/esp32-wifi-manager/src/style.css

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

No branches or pull requests

3 participants