Topic: Difficulty using MqttClient_Publish_ex with PIC32 Harmony 3.00
WolfMQTT is running correctly with PIC32 Harmony 3.00 for messages smaller than my publish buffer.
I am trying to publish data that is larger than my publish buffer using MqttClient_Publish_ex. The code is modeled after the fwpush.c example, but I am still having problems.
PIC32 Harmony uses wolfMQTT in the non-blocking mode, and after the second (final) publish callback the Harmony net glue code (WMQTT_NETGlue_Write) returns a MQTT_CODE_CONTINUE response when called from the MqttPacket_Write function.
Calling MqttClient_Publish_ex after the MQTT_CODE_CONTINUE causes an additional publish callback, which does not return any data, since it has all been read.
This generates a MQTT_CODE_ERROR_BAD_ARG response because the client->write.len = 0
How do I get wolfMQTT to call the MqttSocket_Write (WMQTT_NETGlue_Write) until the entire tcp tx buffer is sent?
I appreciate any ideas on what to try next.