Hi Jordan
There is another MQTT implementation described here that you could also try - it is also open source: https://community.nxp.com/message/994806 but allows you to run on any Kinetis part and also in its Kinetis simulator for easier analysis and testing.
Documentation: http://www.utasker.com/docs/uTasker/uTasker_MQTT.pdf
Video: https://youtu.be/-_CV2aXHyjw
The DNS part is a separate process that is performed before starting the connection. It can be done as following in the uTasker implementation (example of connecting to "test.mosquitto.org"):
fnResolveHostName("test.mosquitto.org", fnDNSListner);
static void fnDNSListner(unsigned char ucEvent, unsigned char *ptrIP)
{
unsigned char ucBroker[IPV4_LENGTH];
switch (ucEvent) {
case DNS_EVENT_SUCCESS:
uMemcpy(ucBroker, ptrIP, IPV4_LENGTH);
fnConnectMQTT(ucBroker, fnMQTT_callback, (UNSECURE_MQTT_CONNECTION | MQTT_CONNECT_FLAG_CLEAN_SESSION));
break;
default:
break;
}
}
Regards
Mark
Kinetis: http://www.utasker.com/kinetis.html
Free Open Source solution: https://github.com/uTasker/uTasker-Kinetis
Working project in 15 minutes video: https://youtu.be/K8ScSgpgQ6M
For better, faster, cheaper product developments consider the uTasker developer's version, professional Kinetis support, one-on-one training and complete fast-track project solutions to set you apart from the herd : http://www.utasker.com/support.html