From fa66527d9c53abbfc9cf30b50ebba303ccff60bf Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Tue, 10 Nov 2020 16:23:46 +0100 Subject: [PATCH] mqtt not yet working --- cube/User/Src/mqttComm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cube/User/Src/mqttComm.c b/cube/User/Src/mqttComm.c index 937fe7d..60823c8 100644 --- a/cube/User/Src/mqttComm.c +++ b/cube/User/Src/mqttComm.c @@ -61,7 +61,7 @@ static void messageArrived(MessageData* md) } static void mqttHandler(void *handle) { - MQTTYield(&mqttClient, data.keepAliveInterval); +// MQTTYield(&mqttClient, data.keepAliveInterval); } void mqttCommInit(void *handle) { @@ -89,12 +89,12 @@ void mqttCommInit(void *handle) { int rc = MQTTConnect(&mqttClient, &data); logMsg("Connected %d\r\n", rc); -// opts.showtopics = 1; + opts.showtopics = 1; -// logMsg("Subscribing to %s\r\n", "hello/wiznet"); -// rc = MQTTSubscribe(&mqttClient, "hello/wiznet", opts.qos, messageArrived); -// logMsg("Subscribed %d\r\n", rc); + logMsg("Subscribing to %s\r\n", "hello/wiznet"); + rc = MQTTSubscribe(&mqttClient, "hello/wiznet", opts.qos, messageArrived); + logMsg("Subscribed %d\r\n", rc); -// schAdd(mqttHandler, NULL, 0, 10); + schAdd(mqttHandler, NULL, 0, 100); } }