[go: nahoru, domu]

ESP8266

ESP8266 wifi connection speed optimization

It’s been a while since I initially looked into what it takes to make an optimal wifi connection with an Espressif ESP8266 / ESP-01 (old post). Using the code from the old post didn’t work … anymore? What the heck. So much for rolling out another kind of battery-powered ESP8266 device. Time to dig into what goes on with the wifi connection timing. The code is on Github. Most of this post is from the readme file there.

Boot, connect to wifi, server requests in under 1 second with ESP-01

Making a hardware button that connects to wifi and sends a request off to a server is possible using Arduino. Light switches are (almost) immediate – but simple wifi switches easily take 8-10 seconds to connect & switch. How do you get that time down? Here’s my approach. Measure end-to-end - what’s the default time? Is it really that bad, or just sometimes bad? Split into parts Measure the parts Determine which parts should be optimized, and try options Combine the best options Debug why it doesn’t work and try again The computer we’re using to run on is an ESP8266, model ESP-01.

Visual Studio Code for ESP32 / ESP 8266 - a c_cpp_properties.json sample

Setting up Visual Studio Code for ESP32 / ESP 8266 development can be a bit awkward, if - like me - you don’t know exactly what’s happening behind the settings. The “C/C++ IntelliSense, debugging, and code browsing” plugin makes working with Visual Code a bit easier, but it needs to be configured for ESP projects. Luckily, that’s not too hard. #include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (/home/(etc) ).