<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[wolfSSL - Embedded SSL Library — Difficulty using MqttClient_Publish_ex with PIC32 Harmony 3.00]]></title>
		<link>https://www.wolfssl.com/forums/topic1634-difficulty-using-mqttclientpublishex-with-pic32-harmony-300.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic1634.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Difficulty using MqttClient_Publish_ex with PIC32 Harmony 3.00.]]></description>
		<lastBuildDate>Thu, 03 Dec 2020 23:39:46 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Difficulty using MqttClient_Publish_ex with PIC32 Harmony 3.00]]></title>
			<link>https://www.wolfssl.com/forums/post5609.html#p5609</link>
			<description><![CDATA[<p>Hi @agubisch</p><p>No, I think you are correct. It looks like MqttClient_Publish_WritePayload has overloaded the meaning of the return value MQTT_CODE_CONTINUE, so that the publish callback does not work correctly when non-blocking is enabled. I think a new return code is needed to specify the condition that the callback should be executed again.</p><p>I opened a ticket to track this defect<br /><a href="https://github.com/wolfSSL/wolfMQTT/issues/192">https://github.com/wolfSSL/wolfMQTT/issues/192</a></p><p>Thanks for your help investigating this issue!</p><p>-Eric @ wolfSSL Support</p>]]></description>
			<author><![CDATA[null@example.com (embhorn)]]></author>
			<pubDate>Thu, 03 Dec 2020 23:39:46 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5609.html#p5609</guid>
		</item>
		<item>
			<title><![CDATA[Re: Difficulty using MqttClient_Publish_ex with PIC32 Harmony 3.00]]></title>
			<link>https://www.wolfssl.com/forums/post5583.html#p5583</link>
			<description><![CDATA[<p>Hi Eric,<br />&nbsp; &nbsp; Yes, Microchip finally updated Harmony WolfMQTT to version 1.7 (from 1.2), but the problem remains.</p><p>&nbsp; &nbsp; Looking at the MqttClient_Publish_WritePayload function the pubCb function is called first and then the payload is written. If the MqttPacket_Write function returns MQTT_CODE_CONTINUE (-101) because (for example) the tcp tx buffer is full, the WritePayload function will call pubCb again before calling MqttPacket_Write to complete the write from the mqtt SendBuff.</p><p>&nbsp; &nbsp; Maybe I am not understanding how the callback is supposed to work. I have a work around where I delay in the net glue code until current payload buffer is written, but this defeats the idea of non-blocking code.</p><p>&nbsp; &nbsp; &nbsp;Thanks,</p>]]></description>
			<author><![CDATA[null@example.com (agubisch)]]></author>
			<pubDate>Mon, 30 Nov 2020 17:36:13 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5583.html#p5583</guid>
		</item>
		<item>
			<title><![CDATA[Re: Difficulty using MqttClient_Publish_ex with PIC32 Harmony 3.00]]></title>
			<link>https://www.wolfssl.com/forums/post5577.html#p5577</link>
			<description><![CDATA[<p>Hello @agubisch</p><p>It looks like there was a fix added to properly return the MQTT_CODE_CONTINUE error. Could you please confirm the release? Also can you please confirm that WOLFMQTT_NONBLOCK is defined in the settings?</p><p>Thanks,<br />Eric @ wolfSSL Support</p>]]></description>
			<author><![CDATA[null@example.com (embhorn)]]></author>
			<pubDate>Mon, 23 Nov 2020 15:59:24 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5577.html#p5577</guid>
		</item>
		<item>
			<title><![CDATA[Re: Difficulty using MqttClient_Publish_ex with PIC32 Harmony 3.00]]></title>
			<link>https://www.wolfssl.com/forums/post5567.html#p5567</link>
			<description><![CDATA[<p>Hi Eric,<br />&nbsp; &nbsp; &nbsp;The only example written for Harmony 3.00 does not use MqttClient_Publish_ex, just MqttClient_Publish and this is working correctly for me.<br />&nbsp; &nbsp; &nbsp;If I make the tcp tx buffer larger than the total payload size, the MqttClient_Publish_ex works. This problem seems to be related to the way wolfMQTT handles the MQTT_CODE_CONTINUE from the Harmony net glue layer.</p><p>Thank you.</p>]]></description>
			<author><![CDATA[null@example.com (agubisch)]]></author>
			<pubDate>Fri, 13 Nov 2020 18:23:05 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5567.html#p5567</guid>
		</item>
		<item>
			<title><![CDATA[Re: Difficulty using MqttClient_Publish_ex with PIC32 Harmony 3.00]]></title>
			<link>https://www.wolfssl.com/forums/post5566.html#p5566</link>
			<description><![CDATA[<p>Hello @agubisch</p><p>Have you tested the <a href="https://github.com/wolfSSL/wolfMQTT/blob/master/examples/firmware/fwpush.c">firmware push</a>&nbsp; example as-is with the PIC32? Does it also demonstrate the issue you are seeing?</p><p>Thanks,<br />Eric @ wolfSSL Support</p>]]></description>
			<author><![CDATA[null@example.com (embhorn)]]></author>
			<pubDate>Fri, 13 Nov 2020 17:53:24 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5566.html#p5566</guid>
		</item>
		<item>
			<title><![CDATA[Difficulty using MqttClient_Publish_ex with PIC32 Harmony 3.00]]></title>
			<link>https://www.wolfssl.com/forums/post5565.html#p5565</link>
			<description><![CDATA[<p>WolfMQTT is running correctly with PIC32 Harmony 3.00 for messages smaller than my publish buffer.</p><p>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.</p><p>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&nbsp; from the MqttPacket_Write function.</p><p>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.</p><p>This generates a MQTT_CODE_ERROR_BAD_ARG response because the client-&gt;write.len = 0</p><p>How do I get wolfMQTT to call the MqttSocket_Write (WMQTT_NETGlue_Write) until the entire tcp tx buffer is sent?</p><p>I appreciate any ideas on what to try next.</p>]]></description>
			<author><![CDATA[null@example.com (agubisch)]]></author>
			<pubDate>Fri, 13 Nov 2020 17:06:32 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5565.html#p5565</guid>
		</item>
	</channel>
</rss>
