Search found 601 matches

by boarchuz
Mon Jul 29, 2019 2:11 am
Forum: ESP32 Arduino
Topic: Instruction execution times, esp. setting GPIOs
Replies: 2
Views: 6937

Re: Instruction execution times, esp. setting GPIOs

How about

Code: Select all

GPIO.out_w1ts = (1 << GPIO_NUM_x);
GPIO.out_w1tc = (1 << GPIO_NUM_x);
by boarchuz
Sat Jul 27, 2019 10:53 pm
Forum: ESP-IDF
Topic: esp_http_client, returning wrong length
Replies: 11
Views: 11987

Re: esp_http_client, returning wrong length

content_length = -1 But the content length is not -1, its 40 They're different things. esp_http_client_get_content_length is the value parsed from the Content-Length header. If the server doesn't provide this, as is the case with your link, it will return -1. You should revisit the example because ...
by boarchuz
Sat Jul 27, 2019 9:59 pm
Forum: ESP-IDF
Topic: esp_http_client, returning wrong length
Replies: 11
Views: 11987

Re: esp_http_client, returning wrong length

Use any http traffic monitor and you'll see that it is: Transfer-Encoding: chunked (with no "Content-Length" header) esp_http_client_get_content_length(client) should be returning -1 for chunked. No problem there. esp_http_client_fetch_headers(client) should be returning 0 for chunked... after calli...
by boarchuz
Thu Jul 25, 2019 3:56 am
Forum: ESP-IDF
Topic: esp_http_client, returning wrong length
Replies: 11
Views: 11987

Re: esp_http_client, returning wrong length

I (3374) INFO: HTTP_EVENT_ON_DATA, len=40 If you're referring to this, that value is the number of bytes received and ready for your app to process from that chunk, not the value of the content length header (and not necessarily the total length). It happens to be equivalent to the total length in ...
by boarchuz
Sat Jul 20, 2019 10:35 am
Forum: ESP32 Arduino
Topic: ULP wakes ESP32
Replies: 4
Views: 6557

Re: ULP wakes ESP32

It's definitely possible. If you look at the datasheet, especially the c reference driver, its data output is very simple and will be easy to bitbang. Of course writing the ULP program is still going to be a bit of work. I got halfway through writing a library to make this stuff easier but haven't w...
by boarchuz
Fri Jul 19, 2019 2:33 am
Forum: ESP32 Arduino
Topic: Possible Bug in WiFi library
Replies: 1
Views: 4583

Re: Possible Bug in WiFi library

The AP interface needs to have started before configuring it. To test if this is the problem, add a delay after mode(WIFI_AP). A better solution will be to call config() on the WIFI_EVENT_AP_START event.
by boarchuz
Fri Jul 12, 2019 2:04 am
Forum: ESP32 Arduino
Topic: Measuring power consumption
Replies: 5
Views: 10691

Re: Measuring power consumption

What is the actual voltage on the battery, under load?
by boarchuz
Thu Jul 04, 2019 12:15 am
Forum: ESP-IDF
Topic: reconnect from Deep Sleep to AP
Replies: 2
Views: 3922

Re: reconnect from Deep Sleep to AP

It hasn't been mentioned much for some reason but the recent IDF update has significantly improved connection speeds. It was consistently taking 1100-1300ms to connect to my home WPA2 network a couple weeks ago, but in testing this week I'm consistently getting about 500ms now (often ~400ms). I have...
by boarchuz
Wed Jul 03, 2019 10:09 am
Forum: General Discussion
Topic: [SOLVED] How to download files from browser using AsyncWebServer ?
Replies: 3
Views: 14009

Re: Is there a way of making a file and then download it using a web-server and a browser without touching the file-syst

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition I think you're using AsyncWebServer so your handler might look something like this: AsyncWebServerResponse *response = request->beginResponse(200, "text/plain", "My file contents"); response->addHeader("Content-Disposition...
by boarchuz
Tue Jul 02, 2019 1:27 pm
Forum: General Discussion
Topic: [SOLVED] Wrong Magic Byte error when trying to upload spiffs.bin
Replies: 2
Views: 9895

Re: Wrong Magic Byte error when trying to upload spiffs.bin

Isn't this line wrong? For "spiffs.bin", indexOf("spiffs")==0 so it won't be detected as U_SPIFFS type.

Code: Select all

int cmd = (filename.indexOf("spiffs") > 0) ? U_SPIFFS : U_FLASH;
Try

Code: Select all

int cmd = (filename.indexOf("spiffs") > -1) ? U_SPIFFS : U_FLASH;