6 years, 10 months ago.

Hard Fault when reconnecting with SSL?

I am using MTS Dragonfly (https://developer.mbed.org/platforms/MTS-Dragonfly/). I need to disconnect from TCP to get the GPS value in MTS Dragonfly as both utilize the same socket. My program runs smoothly even after disconnecting and reconnecting MQTT when used without SSL. But whenever I implemement SSL in my code, I get the error as Hard fault when reconnecting TCP.

MQTTSocket ipstack;
ipstack.connect(config.hostname, config.port, ssl_certificates, 5000);

Here, If I pass a third argument as NULL and connect with a broker which does not require SSL, It works smoothly, but as I need to connect to Azure, SSL is required which gives me hard fault when it tries to reconnect. Note - On the first ipstack.connect it works fine. Here is the log message:

/media/uploads/Amod/capture_AruDnNY.png

1 Answer

6 years, 10 months ago.

I don't understand why the GPS value would require a socket connection? The GPS module on the board should be used to obtain location. This is obviously still an error in the driver, but I am questioning this workflow in general. Also, I see here that there is a socket open when getting the GPS fix.