ARP isn't generally used the way you described. Per the spec, to resolve an IP address into a MAC address, you broadcast an ARP request for the IP address, and receive a unicast response from the host whose address it is - not a router. It also only resolves a single IP address in one request; it doesn't return the contents of the entire ARP cache.
I use Tzapu's WiFiManager https://github.com/tzapu/WiFiManager.
That starts your ESP as a WiFi access point (AP mode) which presents a web page at http://192.168.4.1 where you enter your WiFi SSID and password. It then stores the password and restarts WiFi as a station (STA mode).
On restart if the password is already stored then it just connects as a ...
Can I store an MD5 password hash instead
No. MD5 is a "trapdoor" algorithm. It's one-way. You can make a hash from a password but you cannot make a password from a hash.
You could AES encrypt it, but you would need to have the AES key in your sketch to decrypt the password, which just moves the problem elsewhere.
Typically in a real-world situation you ...
On the ESP8266 there's very little to choose from between the two. It all really boils down to what you want to store and how you best want to access it.
EEPROM emulation is ideal for small bits of data - configuration values and that sort of thing. Where you just want to store a few of values that would seldom change.
SPIFFS though is better at dealing ...
I don't think it makes any difference from a hardware point of view. The benefits of using the eeprom library is that it avoids rewriting unchanged data (if you use spiffs you might want to implement that as well) and that the esp is compatible with the arduino environment, where there is a real eeprom.
On the other hand, SPIFFS has its advantages (e.g. ...
I fixed the problem. It turned out to be that the flush function in Arduino WiFi library has toally different meaning from the one that defined in ESP8266WiFi librarry.
flush() returning true indicates that output data have effectively
been sent, and false that a ...
In your code there is a possibility that you stop the client and then flush it after. That could lead to the observed error.
// Client timeout, if client can't reach the server,
// it should start to reconnect the server
while(client.available() == 0)
if (millis() - timeout >= clientTimeout)
Serial.println(">>> Client Timetout !");
NodeMcu is the name of the firmware originally for the ESP8266
microcontroller, with support for the ESP32 microcontroller added more
recently, that allows you to program these microcontrollers using the
Lua programming language.
NodeMCU firmware was developed so that AT commands can be ...
The WiFi shield and an ESP8266 with any of several popular WiFi services firmwares are different pieces of hardware, each of which can provide WiFi services to another device connected to it, such as an Arduino Uno. Their interfaces are different, despite that they could be used to do similar jobs - offloading the WiFi communications from the Arduino - and ...
Ticker does not interrupt your code. It is a OS-timer and will call your function once the time is elapsed.
The Tiker callback can be interrupted by a "real" interrupt or another Task with higher priority and does not provide any reliability - it will just be called.
A solution (not the best) would be to disable manually all interrupts, if you can't solve ...
(Answering in more detail, as this is the top search hit for "ESP8266 Vin", at least for me)
TL;DR: Vin is NOT directly connected to USB power. There is a protection diode between USB+/VU and Vin, which has a limited current capacity.
If your board provides VU, that one is directly connected to USB power.
As long as you only power 1-2 tiny devices, it ...
The "definition" of uint16 system_adc_read(void) is inside the compiled archive/object file libmain.a inside one of the NONOSDK folders which is located in /tools/sdk/lib/ . The version is selected in platform.txt. For example in my platform.txt:
# default SDK for all boards
# (generic board overrides this variable)
The important thing to note is that the esp does not execute ...
If you want server-push, you can use Server Sent Events or a Websocket instead of polling with XMLHttpRequest.
The problem stems from the fact that the author of the Neotimer "library" defined the methods in the header file, see neotimer.h.
If you include this header in more than 1 source of your project, you will get these "multiple definition" errors.
To solve this issue you have (at least) these options:
Make Neotimer a correct library with separated header and ...
First and major point, is that if you want to repeat existing device, then you have wrong hardware. Comments in the code tell us:
- NodeMCU Development Board (Any ESP8266 dev board will work)
- **OLED I2C Display (SH1106)**
You have dot matrix display with MAX7219 chip (most likely), which uses completely different library to work with. ...
On the ESP8266 flash is a very special case. Because the ESP8266 itself does not have any flash, but instead uses an external SPI-connected flash chip, accessing it is not an easy or technically obvious operation.
Reading from the flash chip is slow. Very very slow (by comparison to reading RAM). Because of this where possible certain things are copied ...
The reset pin of the ESP8266 has internal pull-up. Connecting the pin to ground activates the reset of the ESP.
To create a reset button, wire a momentary push button between reset pin and ground. Pushing the button will connect reset to ground, causing a reset of the esp8266.
The io 16 pin is connected internally to RTC, which in deep sleep counts down ...
I have figured it out
There seem to be understandable limitations if what kind of function can be run as a result of asynchronous scanning (which doesn't seem to interrupt running of a loop function)
So if I have used delay(x) or a while loop until there is input on serial, MCU resets after allotted time runs out.
I have re-written code to start function ...