BLE and ESP32 dev environment

resolved

#43

Hi Florian,

Yes, latest version. MQTT connection is made however there’s no info in the serial connection (and Arduino boards don’t have the option for compiling with debug flag).


Arduino Mega and HM10
#44

So, compiled without the vTaskDelay and on core 1 instead of 0. It worked for about 12 hours then it got disconnected.

[D][BLEUtils.cpp:1091] dumpGapEvent(): Received a GAP event: ESP_GAE (4065634) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (4065634) task_wdt:  - IDLE0 (CPU 0)
E (4065634) task_wdt: Tasks currently running:
E (4065634) task_wdt: CPU 0: wifi
E (4065634) task_wdt: CPU 1: loopTask
E (4070634) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (4070634) task_wdt:  - IDLE0 (CPU 0)
E (4070634) task_wdt: Tasks currently running:
E (4070634) task_wdt: CPU 0: wifi
E (4070634) task_wdt: CPU 1: loopTask

and so on…

Previously it dropped the MQTT connection however it did recover:

BT Task running on core 1
[D][WiFiClient.cpp:452] connected(): Disconnected: RES: 0, ERR: 128
MQTT connection...
Connected to broker
Subscription OK to the subjects
[D][BLEScan.cpp:196] start(): >> start(duration=10)
[D][BLEScan.cpp:221] start(): << start()
[D][BLEUtils.cpp:1091] dumpGapEvent(): Received a GAP event: ESP_GAP_BLE_SCAN_PARAM_SET_COMPLETE_EVT
[D][BLEUtils.cpp:1229] dumpGapEvent(): [status: 0]
[D][BLEUtils.cpp:1091] dumpGapEvent(): Received a GAP event: ESP_GAP_BLE_SCAN_START_COMPLETE_EVT
[D][BLEUtils.cpp:1305] dumpGapEvent(): [status: 0]
[D][BLEUtils.cpp:1091] dumpGapEvent(): Received a GAP event: ESP_GAP_BLE_SCAN_RESULT_EVT

#45

Thanks for the info, I take a look


#46

I’ve tested bit without serial output and it seems working so far but rebooting .unfortunately I don’t know the cause. I might attach it again on the laptop to debig but as long as it reboots and works it’s fine for me I used vtask delay and using core one option .


#47

the other option that I’m testing right now is (if you don’t use RF) to deactivate multicore by commenting the following line:

As my environment doesn’t enable me to reproduce watchdog issue, if you could test with:
-multicore disabled
-without vtaskdelay

It could help us


#48

I’ll try it once I’m at home again this afternoon. ESP just went offline. Will revert :slight_smile:


#49

I compiled mine with BT and mqtt as the only services and deactivated multicore
so far my uptime is "uptime":100751

when i left multicore enabled, core 1 would be crashing the chip periodically


#50

Still :running_man:? Would like having a feedback


#51

it was running for over 48 hrs without reboots


#52

Hello @blakadder adder,

Since your last post is it still running?


#53

@thundergreen

Could you test to add in the begining of OpenMQTTGateway.ino at the begining:

#include "soc/timer_group_struct.h"
#include "soc/timer_group_reg.h"

and in the loop

TIMERG0.wdt_wprotect=TIMG_WDT_WKEY_VALUE;
TIMERG0.wdt_feed=1;
TIMERG0.wdt_wprotect=0;

This will enable to test the tip given by @akshar001

You have to restore a fresh ZgatewayBT.ino to cancel your previous changes


#54

Unfortunately my Arduino broke… Can’t start it …have exception error…no idea what happened need to compile online I guess…I’ll try that.please always post the exact file location as an example as I’m noob with programming…I really wanna help but need assistance…sorry for this dumbness

Edit: sorry u did add th file and indicator to change :wink:


#55

Current uptime 87 hrs


#56

So i want use ESP32 and BT. What version i must use? Is all this changes implemented or i must correct it?


#57

you can take v0.8 and deactivate multicore.

If you want to participate I’m also interested by your feedback with multicore activated.


#58

14+ days of constant uptime with the 0.8 version, running only the BT component, multicore deactivated


#59

Thanks for the info, I added a comment into the wiki:


#60

For info mine is running with multicore activated since more than 2 weeks also.