Hot answers tagged

3

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. While ...


2

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 ...


2

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 ...


2

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 ...


2

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. ...


2

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. From https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/client-class.html: flush() returning true indicates that output data have effectively been sent, and false that a ...


2

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 !"); ...


2

From https://forum.arduino.cc/index.php?topic=616324.0: 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 ...


2

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 ...


2

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 ...


2

(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 ...


1

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) build.sdk=NONOSDK22x_190703 #build.sdk=...


1

I assume that you misunderstand how JavaScript works. JS is executed on the client side and therefore the esp can easily serve JS code the same way it would provide any html content. Take a look at the Webserver examples and embed your JavaScript code into the html content that the examples use. The important thing to note is that the esp does not execute ...


1

If you want server-push, you can use Server Sent Events or a Websocket instead of polling with XMLHttpRequest. So yes, it can be done, and I have implemented both using a Nano 33 IoT at one end and Javascript in a browser on the other. Some example code is here: https://github.com/ocrdu/arduino-webinterface-sse and here: https://github.com/ocrdu/arduino-...


1

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 ...


1

First and major point, is that if you want to repeat existing device, then you have wrong hardware. Comments in the code tell us: Main Hardware: - 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. ...


1

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 ...


1

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 ...


1

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 ...


Only top voted, non community-wiki answers of a minimum length are eligible