Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
4 years, 7 months ago.
STM32F407 MQTT OS5.14
Hi,
I have setup and converted the MQTT in an early of OS5 with easy_connect removed. It appears to crash the MCU when it tries to mqttNetwork.connect(hostname, port); the first 2 lines appear to run without any issues,. has anyone got this working in os 5.11 and above without easy_connect. any help is appreciated
MQTTNetwork mqttNetwork(net);
MQTT::Client<MQTTNetwork, Countdown> client(mqttNetwork);
float version = 0.6;
char* topic = "mbed-sample";
const char* hostname = "172.23.11.1";
int port = 1883;
int rc = mqttNetwork.connect(hostname, port); < ---- It crashes on this
if (rc != 0)
Serial0.printf("rc from TCP connect is %d\r\n", rc);
Kind Regards Chris