{"id":17982766,"url":"https://github.com/78/esp-wifi-connect","last_synced_at":"2025-03-25T19:31:41.338Z","repository":{"id":257198231,"uuid":"854843014","full_name":"78/esp-wifi-connect","owner":"78","description":"ESP32 component helps connect WiFi","archived":false,"fork":false,"pushed_at":"2025-02-26T15:10:39.000Z","size":136,"stargazers_count":13,"open_issues_count":2,"forks_count":18,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-20T17:38:31.611Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/78.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-09T21:42:17.000Z","updated_at":"2025-03-19T01:52:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"0c969069-789b-4364-8582-38400110a71a","html_url":"https://github.com/78/esp-wifi-connect","commit_stats":null,"previous_names":["78/esp-wifi-connect"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/78%2Fesp-wifi-connect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/78%2Fesp-wifi-connect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/78%2Fesp-wifi-connect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/78%2Fesp-wifi-connect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/78","download_url":"https://codeload.github.com/78/esp-wifi-connect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245530273,"owners_count":20630517,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T18:15:07.801Z","updated_at":"2025-03-25T19:31:41.332Z","avatar_url":"https://github.com/78.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESP32 WiFi Connect\n\nThis component helps with WiFi connection for the device.\n\nIt first tries to connect to a WiFi network using the credentials stored in the flash. If this fails, it starts an access point and a web server to allow the user to connect to a WiFi network.\n\nThe URL to access the web server is `http://192.168.4.1`.\n\nHere is a screenshot of the web server:\n\n![Access Point Configuration](assets/ap_v2.png)\n\n## Changelog: v2.3.0\n\n- Add support for language request.\n\n## Changelog: v2.2.0\n\n- Add support for ESP32 SmartConfig(ESPTouch v2)\n\n## Changelog: v2.1.0\n\n- Improve WiFi connection logic.\n\n## Changelog: v2.0.0\n\n- Add support for multiple WiFi SSID management.\n- Auto switch to the best WiFi network.\n- Captive portal for WiFi configuration.\n- Support for multiple languages (English, Chinese).\n\n## Configuration\n\nThe WiFi credentials are stored in the flash under the \"wifi\" namespace.\n\nThe keys are \"ssid\", \"ssid1\", \"ssid2\" ... \"ssid9\", \"password\", \"password1\", \"password2\" ... \"password9\".\n\n## Usage\n\n```cpp\n// Initialize the default event loop\nESP_ERROR_CHECK(esp_event_loop_create_default());\n\n// Initialize NVS flash for WiFi configuration\nesp_err_t ret = nvs_flash_init();\nif (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {\n    ESP_ERROR_CHECK(nvs_flash_erase());\n    ret = nvs_flash_init();\n}\nESP_ERROR_CHECK(ret);\n\n// Get the WiFi configuration\nauto\u0026 ssid_list = SsidManager::GetInstance().GetSsidList();\nif (ssid_list.empty()) {\n    // Start the WiFi configuration AP\n    auto\u0026 ap = WifiConfigurationAp::GetInstance();\n    ap.SetSsidPrefix(\"ESP32\");\n    ap.Start();\n    return;\n}\n\n// Otherwise, connect to the WiFi network\nWifiStation::GetInstance().Start();\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F78%2Fesp-wifi-connect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F78%2Fesp-wifi-connect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F78%2Fesp-wifi-connect/lists"}