Let's get into the problem. 1. I made the micropython clone git clone https://github.com/micropython/micropython.git checkout in version v1.9.4 2. in ports / esp32 I made the esp-idf clone git clone --recursive https://github.com/espressif/esp-idf.git git checkout v.3.0 git submodule update -init 3....
From time to time using urequests I get the error message OSError -2 and the message in loop LmacRxBlk:1. I only recover the ESP after resetting hardware
Firstly, when you use urequests.get , it calls urequests.request , which already opens a connection, writes to it and reads the response headers. Setting the poll timeout afterwards is too late, if the server is slow in responding, the socket already blocks while reading the headers in urequests.re...
Example code: Urequest has no timeout parameter, I implemented the code below to use poll class response = urequests.get(url=API_ENDPOINT,headers=headers) sock = response.raw sock.setblocking(True) poller = uselect.poll() poller.register(sock,uselect.POLLIN) events = poller.poll(1000) # time in mil...
Start esp8266 in ap mode, connect the cell to the esp8266 wifi network, in micro python develop a routine to receive SSID and severe pwd in esp8266. Then just read this file in station mode and connect to the wifi
First- the use of the SecretKey is only for this test (can be revoked) (site automacao-iot.com.br which is an IOT platform). Still, I could use this key to test the requests you're doing e.g. with CPython from my computer. Is this ok with you? Second - Use of sleep I believe not to be recommendable...
What am I doing wrong ???? You are posting sensitive information (SecretKey) on a public online forum? Does the error occur immediately when the while loops executed for the first time or only after some iterations? Anyway, be sure to put a sleep() in the loop, you're probably spamming the server w...
The following code, from time to time, displays the following error message : Code import network import urequests import gc from machine import freq freq(160000000) PublicKey= '8BA9FA35FEAF6A356893B577A44408A3' SecretKey = 'D23D16F1C34F170931894E4C7914121F78C538377BE9CD3F29CC845426B31991' def setNe...
Bbasically the way I implemented this correct, different from the implementation used in the expressif: Timer.stop, Timer.start would be a good option for the project.