Hi,
I’m having an issue with TLS socket ‘reuse’ connection.
I get the same issue using Wi-Fi (ESP8266) or Ethernet interface.
I’m using:
Mbed-os rev.7063 online compiler
Nucleo-F767ZI (Wi-Fi and Ethernet)
Nucleo-F446ZE (Wi-Fi)
After several minutes whether data is being sent or not the problem still happens. I get:
HttpRequest failed (error code -3012)
The only solution is a hard or soft ‘full’ MCU reset.
Using the standard TLS socket connection is working fine, the problem is I’m using way too much TLS handshake data and the connection process is much slower this way, I’m posting every 20 seconds.
As a work around I have tried to trap and handle the problem. If I detect the error -3012 and do this…
socket->close();
delete socket;
Then re-initiate the TLS socket ‘reuse’ connection. I get the following HARD FAULT …
++ MbedOS Fault Handler ++
FaultType: HardFault
Context:
R0 : 2000A9E0
R1 : 20003C48
R2 : 00000000
R3 : 080091E5
R4 : 080451F0
R5 : 2000A9E0
R6 : 2000A1B8
R7 : 2000736C
R8 : 2000737C
R9 : 2000A1B8
R10 : 2000A164
R11 : 20007360
R12 : 0803C02F
SP : 20006938
LR : 08006D13
PC : 00000000
xPSR : 00000000
PSP : 200068D0
MSP : 2007FFD8
CPUID: 411FC270
HFSR : 40000000
MMFSR: 00000000
BFSR : 00000000
UFSR : 00000002
DFSR : 0000000B
AFSR : 00000000
Mode : Thread
Priv : Privileged
Stack: PSP– MbedOS Fault Handler –
++ MbedOS Error Info ++
Error Status: 0x80FF013D Code: 317 Module: 255
Error Message: Fault exception
Location: 0x801B5D7
Error Value: 0x0
Current Thread: main Id: 0x20009A30 Entry: 0x801B96B StackSize: 0x2000 StackMem: 0x20004970 SP: 0x2007FF7C
For more info, visit: mbedos-error
– MbedOS Error Info –= System will be rebooted due to a fatal error =
= Reboot count(=1) reached maximum, system will halt after rebooting =
My project code is based around this mbed example here:
Any suggestions would be appreciated and I can transfer this project to Studio if I need to get to the TLS library.
Paul