Search found 57 matches

by cruvus
Sun Sep 04, 2022 7:41 am
Forum: ESP-IDF
Topic: panic when shutting down mqtt client after publishing
Replies: 5
Views: 3511

Re: panic when shutting down mqtt client after publishing

You should do something like

Code: Select all

if (!Client) return;
esp_mqtt_client_stop(Client);
esp_mqtt_client_destroy(Client);
Client = NULL;
I had similar problems when calling these functions twice. The second time crashed the app.
by cruvus
Mon Aug 29, 2022 8:49 pm
Forum: ESP-IDF
Topic: Help with deactivating wifi please
Replies: 3
Views: 1820

Re: Help with deactivating wifi please

Just disable the SoftAP by calling esp_wifi_set_mode(WIFI_MODE_STA). Calling esp_netif_create_default_wifi_ap is only necessary at the start of the app (one time and then no more). If you need to reactivate the SoftAP, just call esp_wifi_set_mode(WIFI_MODE_APSTA) and if you need to reconfigure it, c...
by cruvus
Wed Aug 17, 2022 10:19 pm
Forum: ESP-IDF
Topic: Station <-> SoftAP brigde (not eth)
Replies: 1
Views: 1207

Station <-> SoftAP brigde (not eth)

Has anyone succeeded in creating a bridge between Station and SoftAP? So that devices connected to the SoftAP are transparently integrated into the same subnet as the Station is. Phone <-> Router <-> ESP_A <-> ESP_B Station of ESP_A might get an IP 192.168.1.2 from the router and is accessible from ...
by cruvus
Wed Aug 17, 2022 8:32 am
Forum: ESP-IDF
Topic: Error when using IRAM_ATTR
Replies: 2
Views: 1965

Re: Error when using IRAM_ATTR

Try

Code: Select all

#include "esp_system.h"
by cruvus
Wed Aug 10, 2022 11:14 pm
Forum: ESP-IDF
Topic: SPI mode promotion?
Replies: 4
Views: 2578

Re: SPI mode promotion?

by cruvus
Wed Aug 10, 2022 3:26 pm
Forum: ESP-IDF
Topic: SPI mode promotion?
Replies: 4
Views: 2578

Re: SPI mode promotion?

Looking at file "sdkconfig", CONFIG_ESPTOOLPY_FLASHMODE is either "dout" or "dio". The other two modes are not being used despite the drop-down menu in menuconfig lists them. Is that a bug or a limitation of some kind (and I overlooked it in the manual somewhere)?
by cruvus
Tue Aug 09, 2022 7:40 pm
Forum: ESP-IDF
Topic: SPI mode promotion?
Replies: 4
Views: 2578

Re: SPI mode promotion?

Today I looked at the header of my compiled .bin files. In menuconfig I chose "qio" mode, however spi_mode (third byte) is 2, which is "dio". Then I tried to compile the other modes using menuconfig, one after the other. In mode "dout" the value changes to 3, which is correct. All other modes result...
by cruvus
Tue Aug 09, 2022 11:25 am
Forum: ESP-IDF
Topic: Restarting WiFi causing increased temperature
Replies: 2
Views: 1294

Re: Restarting WiFi causing increased temperature

Do you use power management? Dynamic frequency, light sleep, etc.?
The SoftAP is off?
Or maybe it is a problem with modem sleep: esp_wifi_set_ps and esp_wifi_get_ps are some keywords.
by cruvus
Mon Aug 08, 2022 4:55 pm
Forum: ESP-IDF
Topic: How do I determine whether WIFI SSID and others config has been configured
Replies: 2
Views: 1331

Re: How do I determine whether WIFI SSID and others config has been configured

I use if (config.sta.ssid[0]) [...] to check if the string is empty. I don't know if there is a better or official way. On the ESP8266 there was wifi_station_get_ap_info() which returned the number of stored credentials. BTW, compared to the ESP8266 there are more APIs missing, for example wifi_stat...
by cruvus
Mon Aug 01, 2022 9:05 pm
Forum: ESP-IDF
Topic: 120 second timeout in WPS
Replies: 0
Views: 881

120 second timeout in WPS

The 120 seconds which WPS waits for an answer, is this a requirement for a standard of some kind? Or would it be possible to make it customizable in the future? In IDF 4.4.1 there is this misleading definition: /** * @brief WPS starts to work. * * @attention WPS can only be used when ESP32 station i...