I am using an Olimex ESP32 POE board and I can succesfully connect to mdash thru Ethernet or WiFi.
Problems start introducing BLE … seems mDash does not like it at all (or the reverse). Without mDash the sketch works, without BLE mDash works.
Initializing mDash before BLE does:
1970-01-01 00:00:02 init_wifi2: Connecting to WiFi network our-wlan...
1970-01-01 00:00:03 eh: WiFi connected, IP 10.168.224.30
1970-01-01 00:00:04 dopoll: Subscriptions changed, reconnecting...
1970-01-01 00:00:05 mdashconnect: reconnecting to mdash.net @ 148.251.54.236:8883
Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled.
We could not reproduce the crash.
What mDash library version you are using?
W.r.t. the failure: we can reproduce the connection failure.
The err 0xffff8100 corresponds to the mbedtls error MBEDTLS_ERR_SSL_ALLOC_FAILED - see ssl.h
Which is a low RAM condition - apparently BLE code is very RAM hungry, and does not leave much for the TLS handshake to happen.
You can use insecure MQTT instead of secure MQTTS, in which case the mDash connection happens successfully. Our assumption is such a problem exists for any TLS-enabled backend, not just mDash.
There are ways to reduce the RAM usage though, and make it work fine with TLS. The first step could be to try a native ESP-IDF example instead of Arduino - maybe Arduino libs add too much cruft.
Below is a snippet that shows how to switch to insecure port: