Search found 7 matches

by sgmustadio
Sat Feb 22, 2025 2:59 am
Forum: ESP-IDF
Topic: TLS handshake failing for MQTTS in QEMU
Replies: 1
Views: 430

Re: TLS handshake failing for MQTTS in QEMU

After some tinkering, I believe this to be a bug within the ESP-IDF framework. The code runs fine if the target is set to ESP32 or ESP32C3, but it fails (as above) for the ESP32S3. I filed an issue here: https://github.com/espressif/esp-idf/issues/15446
by sgmustadio
Fri Feb 21, 2025 12:01 am
Forum: ESP-IDF
Topic: TLS handshake failing for MQTTS in QEMU
Replies: 1
Views: 430

TLS handshake failing for MQTTS in QEMU

I've got a Docker container running ESP-IDF (for development) along with a Mosquitto server for testing MQTT messaging. I can successfully connect and pub/sub to the Mosquitto broker with open MQTT (non-TLS) in QEMU as well as on a physical device. My full application can be found here: https://gith...
by sgmustadio
Thu Jan 23, 2025 9:24 pm
Forum: ESP-IDF
Topic: Why does getaddrinfo return only one result?
Replies: 0
Views: 832

Why does getaddrinfo return only one result?

I'm working on an IoT example using ESP-IDF, and I'm having trouble understanding why getaddrinfo() only returns a single result. Here is my DNS lookup function: // Perform DNS lookup esp_err_t dns_lookup(const char *host, const char *port, const int family, struct addrinfo *ip_addr) { struct addrin...
by sgmustadio
Mon Mar 08, 2021 8:43 pm
Forum: ESP32 Arduino
Topic: Weird scheduling issue when using spinlocks in critical section with multiple cores
Replies: 4
Views: 3916

Re: Weird scheduling issue when using spinlocks in critical section with multiple cores

Thank you! That helps to make sense of what's going on. I moved the critical section to Core 1, and it worked as expected (as Core 0 could still update the timer variable). I also changed the toggle time to 30 ms for Core 0 so it's more noticeable on the scope. Next, I added critical section markers...
by sgmustadio
Sun Mar 07, 2021 3:11 pm
Forum: ESP32 Arduino
Topic: Weird scheduling issue when using spinlocks in critical section with multiple cores
Replies: 4
Views: 3916

Re: Weird scheduling issue when using spinlocks in critical section with multiple cores

In some instances, yes, it is crashing with a "Guru Meditation Error: Core 1 panic'ed (LoadProhibited)" when I had Serial.print statements in the other core (inside a similar critical section). I didn't know that Serial usage was not allowed inside the critical sections at all, so thank you for that...
by sgmustadio
Sat Mar 06, 2021 11:54 pm
Forum: ESP32 Arduino
Topic: Weird scheduling issue when using spinlocks in critical section with multiple cores
Replies: 4
Views: 3916

Weird scheduling issue when using spinlocks in critical section with multiple cores

This may or may not be related to my watchdog timer issue in this thread( https://esp32.com/viewtopic.php?f=2&t=19752 ), but it seems different enough that I decided to post it here anyway. I'm working with the following demo code (for illustrating how spinlocks work). // Core definitions (assuming ...
by sgmustadio
Thu Mar 04, 2021 5:04 am
Forum: General Discussion
Topic: Issue with spinlocks and interrupt watchdog timer reset
Replies: 0
Views: 2323

Issue with spinlocks and interrupt watchdog timer reset

Hi all, I'm creating a demonstration to show how spinlocks can be used to block tasks in a different core (for a video about multicore programming). I recognize that waiting in an ISR is terrible practice, but I found it useful for this particular demonstration. In the code below, I have an ISR peri...