Connection To Access Point. - ESP8266 Developer Zone
Maybe your like
Skip to content
Login
Register I forgot my password Remember me Hide my online status this sessionConnection to Access Point.
Post Reply- Print view
Connection to Access Point.
- Quote
Postby jenya7 » Wed Nov 10, 2021 2:54 pm
At esp8266 start up it tries to connect to Access Point.Code: Select all
uint8_t UDP_Start(char* ssid, char* pass, uint16_t loc_port){ uint32_t timeout = 0; if (WiFi.status() != WL_CONNECTED) { rt_parameters.wifi_mode = WIFI_STA; WiFi.mode(WIFI_STA); WiFi.begin(ssid, pass); if (sys_parameters.debug) Serial.println("Waiting for connection"); while (WiFi.status() != WL_CONNECTED) { delay(DELAY_TICK); if (sys_parameters.debug) Serial.print('.'); timeout++; if (timeout >= sys_parameters.ap_con_timeout) { if (sys_parameters.debug) Serial.println(); return UDP_WIFI_ERR; } } Serial.print("\nConnection time (ms) "); Serial.println(DELAY_TICK * timeout); } rt_parameters.wifi_status = WiFi.status(); IPAddress ip_addr = WiFi.localIP(); memcpy(sys_parameters.loc_ip, ip_addr, 4); if (sys_parameters.debug) { Serial.print("Connected! IP address: "); Serial.println(ip_addr); Serial.printf("UDP server on port %d\n", loc_port); } if (udp.begin(loc_port) == 0) return UDP_CONNECT_ERR; return UDP_OK;}Sometimes it takes a reasonable amount of time - 6-10 seconds. Sometimes it takes 30-60 seconds. Sometimes it gets out on timeout with statusWL_CONNECT_FAILEDWL_NO_SSID_AVAILWhen it's WL_NO_SSID_AVAIL I do WiFi.scanNetworks() and see my Access Point.How can I improve the situation? Top Her Mary Posts: 537 Joined: Mon Oct 27, 2014 11:09 amRe: Connection to Access Point.
- Quote
Postby Her Mary » Mon Nov 22, 2021 5:30 pm
Could these examples help? https://github.com/espressif/ESP8266_RT ... ng_started Top jenya7 Posts: 7 Joined: Tue Jun 29, 2021 2:22 pmRe: Connection to Access Point.
- Quote
Postby jenya7 » Wed Nov 24, 2021 11:07 pm
It's better to use the native API for sure. Unfortunately I have to use Arduino development platform - the only IDE I've managed to set to build and burn projects. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Post Reply- Print view
Return to “General Q&A”
Who is online
Users browsing this forum: No registered users and 4 guests
Login
I forgot my password Remember me Hide my online status this sessionNewbies Start Here
Are you new to ESP8266? Unsure what to do? Dunno where to start? Start right here!
Latest SDK
Download the lastest ESP8266 SDK here!We also have a RTOS version and a MESH version too!
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF! Must read here!
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.
Information
- Terms of use
- Privacy policy
- FAQ
- The team
- Contact us
Tag » Arduino Wl_no_ssid_avail
-
WiFi Stopped Connecting (ESP8266) - Installation & Troubleshooting
-
WL_NO_SSID_AVAIL - Everything ESP8266
-
WiFi Not Always Reconnecting. Reports WL_NO_SSID_AVAIL After ...
-
Station Class - ESP8266 Arduino Core Documentation
-
ESP32 Useful Wi-Fi Library Functions (Arduino IDE)
-
WiFiStatus
-
M-E | ESP8266 NodeMCU
-
ESP32 Could Not Associate With My AP In Event Site.
-
Se Connecter à Un Réseau Wi-Fi Avec L'ESP32 - UPesy
-
Esp32-http-o - Wokwi Arduino And ESP32 Simulator
-
[SOLVED] First Time Setting Up With Arduino 101 - Ubidots
-
What Does The Return Code Of The Wifi Libary In An ESP8266 Mean?
-
Cours Du Bitcoin Avec Arduino - Tropratik
-
Esp8266/Arduino - Gitter