Search found 28 matches

by papadeltasierra
Mon Jan 01, 2024 2:28 pm
Forum: ESP-IDF
Topic: How long to sync time?
Replies: 4
Views: 2657

Re: How long to sync time?

Oh how I laughed! Turns out that this is all a formatting bug. I am using the limited formatting 'nano' library and was using "%lu" to trace the result of time(NULL) . However the result is 64-bit and the 'nano' formatting results is some very strange results. Casting (uint32_t)time(NULL) produces s...
by papadeltasierra
Mon Jan 01, 2024 2:06 pm
Forum: ESP-IDF
Topic: How long to sync time?
Replies: 4
Views: 2657

Re: How long to sync time?

Ralph, I'm not using any part of SNTP but my digging did throw something up interesting. I created a minimal app that does just this: Create an event loop and timer popping every second, where the (event) callback just prints the result of time(NULL) Hard-coded the time to "now" using settimeofday()...
by papadeltasierra
Mon Jan 01, 2024 10:59 am
Forum: ESP-IDF
Topic: How long to sync time?
Replies: 4
Views: 2657

Re: How long to sync time?

This page, https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/system_time.html?highlight=time%20sync, claims: To stop smooth time adjustment and update the current time immediately, use the POSIX function settimeofday() . May have to do some more investigation to try an...
by papadeltasierra
Sun Dec 31, 2023 2:15 pm
Forum: ESP-IDF
Topic: How long to sync time?
Replies: 4
Views: 2657

How long to sync time?

Hi. I am using an ESP32c3 but am not using SNTP to set time but will instead learn it from an attached ZigBee device and network. I then use settimeofday() to set the time on the ES32c3. Prototyping by just setting a hard-coded value and then calling time() seems to indicate that the ESP32c3 does no...
by papadeltasierra
Wed Dec 20, 2023 12:45 pm
Forum: ESP-IDF
Topic: MQTT v5 AUTH (reauthentication)
Replies: 0
Views: 8267

MQTT v5 AUTH (reauthentication)

MQTT v5 supports reauthentication (updating a short-live authentication token say) without closing and reopening the MQTT connection (using an AUTH request). How does the ESP-IDF library do this as a I don't see any way to change the authentication for an active session.
by papadeltasierra
Mon Dec 11, 2023 9:25 am
Forum: ESP-IDF
Topic: Minimal XML parser?
Replies: 2
Views: 4467

Re: Minimal XML parser?

Slightly off-topic but if you are reading this consider, "can I avoid using XML completely"? My project talks to Microsoft Azure so I believe I can write an anonymous Azure Function that will sit between my app and the "XML returning Azure resource"; this will work like this: - My app makes a simple...
by papadeltasierra
Sun Dec 10, 2023 8:08 pm
Forum: ESP-IDF
Topic: Minimal XML parser?
Replies: 2
Views: 4467

Re: Minimal XML parser?

Also wondering how I would enable the minimal build option XML_MIN_SIZE/EXPAT_MIN_SIZE. I don't see how to add EXPAT_MIN_SIZE to the CMake configuration.
by papadeltasierra
Sun Dec 10, 2023 6:12 pm
Forum: ESP-IDF
Topic: Minimal XML parser?
Replies: 2
Views: 4467

Minimal XML parser?

Is there smaller XML parser that the ESP32 can use than `expat`? Smallest component size for `expat` seems to be about 85230 bytes - anyway to get this smaller?
by papadeltasierra
Fri Dec 08, 2023 2:21 pm
Forum: ESP-IDF
Topic: OTA to 2MB flash - possible?
Replies: 4
Views: 5663

Re: OTA to 2MB flash - possible?

Quick addendum - it seems that the board I am using (a LilygoT-Zigbee) does have 4MB of flash for the ESP32c3. What confused me is that the default `esp-idf` configuration builds for 2MB and on boot reported flash reported is not the actual amount present, rather is is the build setting. Changing th...
by papadeltasierra
Fri Dec 08, 2023 1:41 pm
Forum: ESP-IDF
Topic: OTA to 2MB flash - possible?
Replies: 4
Views: 5663

Re: OTA to 2MB flash - possible?

Thanks both for the interesting suggestions.