I'm attempting to implement an ANSI-C MQTT client on the Atmel SAM4S microcontroller + Atmel WINC1500 wifi module and wondering if anyone knows of an example port for this hardware.
Atmel provides an MQTT example for the Ateml SAMD21 + Atmel WINC1500 + Atmel Studio as the IDE, but unfortunately the MQTT portion is in a linked library and is not compatible with the SAM4S nor IAR (which is the IDE I'm using). Atmel says try AWS example or Paho MQTT.
The Amazon Web Services (AWS) example is based on The Eclipse Paho project (good), but uses security (not ready for security implementation yet). The AWS example indicates it deviates from MQTT spec in many ways, so may not be a good reference since I plan to communicate with an 'in-tact' / compliant broker.
The source code at https://github.com/eclipse/paho.mqtt.embedded-c
provides client ports in ANSI C for linux, FreeRTOS, and cc3200, but I do not have a good understanding on how to port to the SAM4S + WINC1500. I've had limited success so far getting a few of the lower level MQTTPacket samples (qos0pub & pub0sub1) to work with my hardware + HiveMQ as a broker, but do not understand how to implement the required network functions for the client to work.
I will continue to plow forward, but thought I would reach out to see if anyone knows of one or more of the following:
1. A port of timer and network functions for the SAM4S + WINC1500 required by MQTTClient-C
2. Better description of what is required for the timer and network hardware abstraction functions for MQTTClient-C