1 year ago
#333219
Stéphane de Luca
esp-tls: mbedtls_ssl_handshake returned -0x2700
I am facing the following issue which I don't really get:
E (22722) esp-tls: mbedtls_ssl_handshake returned -0x2700
E (22728) esp-tls: Failed to open new connection
E (22728) TRANS_SSL: Failed to open a new connection
E (22728) MQTT_CLIENT: Error transport connect
I am stuck with that and will appreciate any help.
I am working on an ESP32-WROVER-32 with FreeRTOS.
The memory status is as follows:
- Free heap size: 78208
- Min free heap size: 77716
- Max alloc heap size: 68488
- PsRam size: 4194252 bytes (4095.9kb, 4.000Mb)
- PsRam used PSRAM: 45276 bytes (44.2kb, 0.043Mb)
My platformio.ini
file is as follows (I commented out all defines related to mbed
for the sake of troubleshooting):
[env:esp32dev]
platform = espressif32
board = esp-wrover-kit
framework = arduino
;espidf
;
upload_port = /dev/cu.usbserial-14101
monitor_speed = 115200
lib_deps =
adafruit/Adafruit NeoPixel@^1.10.0
lbernstone/Tone32@^1.0.0
; miwagner/ESP32CAN@^0.0.1
board_build.partitions = no_ota.csv
;partitions_singleapp.csv
;huge_app.csv
extra_scripts = pre:build_script_versioning.py
build_flags =
; -DCORE_DEBUG_LEVEL=4
-DBOARD_HAS_PSRAM=1
; -DMBEDTLS_MEMORY_BUFFER_ALLOC_C=1
; -DCONFIG_MBEDTLS_MEM_ALLOC_MODE=MBEDTLS_EXTERNAL_MEM_ALLOC
-mfix-esp32-psram-cache-issue
; -DCONFIG_MBEDTLS_DYNAMIC_BUFFER=1
; -DMBEDTLS_THREADING_C=1
; -DCONFIG_SPIRAM_CACHE_WORKAROUND=1
; -DCONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST=1
The WiFi is connected as per my logs:
b2457|β|π¦ IoT: Mac address is: 34:94:54:47:CD:00
b2457|β|π¦ IoT: WiFi connected, IP address: 192.168.1.25
b2457|β|π¦ IoT: PsRam level is 4148976
b2457|β|π¦ IoT: Setting time using SNTP (try #1): . Time initialized!
b2457|β|π¦ IoT: Init IoT Hub client
b2457|β|π¦ IoT: π’ Iot hub Client ID: nano
b2457|β|π¦ IoT: Init MQTT client
b2457|β|π¦ IoT: π’ MQTT client created, now let's start it
b2457|β|π¦ IoT: π΄ MQTT event MQTT_EVENT_BEFORE_CONNECT
b2457|β|π¦ IoT: π’ MQTT client started
b2457|β|π¦ IoT: PsRam after initialization is 4148976 (took 0 bytes)
b2457|β|π¦ IoT: States: NTP time is 1 | IoT hub client is 1 | MQTT client is 1 | hasIoTHub is 1
Also, not sure if it is related, but my logs show that the WiFi gets disconnected right after the issue:
b2457|β|π¦ IoT: RTOS module π‘ Led indicator: entering _loop()_loop (Non RTOS)
b2457|β|π¦ IoT: π‘
Non-RTOS looping: running loop!
E (22746) esp-tls: mbedtls_ssl_handshake returned -0x2700
E (22751) esp-tls: Failed to open new connection
E (22752) TRANS_SSL: Failed to open a new connection
E (22752) MQTT_CLIENT: Error transport connect
b2457|β|π¦ IoT: π΄ MQTT event MQTT_EVENT_ERROR
b2457|β|π¦ IoT: π‘ MQTT event MQTT_EVENT_DISCONNECTED
b2457|β|π¦ IoT: π‘ WiFi no longer connected, establishing connectionβ¦
b2457|β|πΆ NanoWifi: Connection to [XX] attempt 1: status is "connection lost (WL_CONNECTION_LOST 05)"
azure
iot
mbed
0 Answers
Your Answer