<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[RS 485 very slow baud rates (100baud over half-duplex powerline) timing issues]]></title><description><![CDATA[<p dir="auto">I am trying to see if I can use the KQ-330 Powerline serial modems for Mysensors.<br />
The modems have a 9600 8N1 TTL UART and the Powerline data rate is very much slower at 100 Baud.</p>
<p dir="auto">I am using mysensors RS485 and Arduino Uno's for both node and serial gateway to Home Assistant.</p>
<p dir="auto">So far I have managed to get the node and gateway talking however I think that because the powerline data rate is super slow compared with the 112500 Baud Home Assistant-to-Serial Gateway, and the 9600 Baud serial gateway-to-KQ330.<br />
I am seeing issues with collisions and TRX turn around timing during presentation and registration.</p>
<p dir="auto">As the link is so slow, I may actually just opt to use a master/slave approach with passive nodes in the end, for example a typical node-gateway heartbeat message takes about 4 seconds!</p>
<p dir="auto">I am looking at the possibility of using Aloha on the bus however as I really don't want to throw out presentation as it really helps with setting up on Home Assistant.</p>
<p dir="auto">So I am digging around the various transport timers and wondering how I can optimise it better for the super slow 100 baud link speed.</p>
<p dir="auto">My first question here is regarding the collision control in mytransportrs485.cpp; line 256</p>
<pre><code>while (_serialProcess()) {
		unsigned char del;
		del = rand() % 20;
		for (i = 0; i &lt; del; i++) {
			delay(1);
			_serialProcess();
		}
		timeout--;
		if (timeout == 0) {
			// Failed to transmit!!!
			return false;
		}
	}
</code></pre>
<p dir="auto">Im I correct to say that the 1ms delay is based on 9600 baud and I might increase it to around 100ms for 100 baud?</p>
]]></description><link>https://forum.mysensors.org/topic/11296/rs-485-very-slow-baud-rates-100baud-over-half-duplex-powerline-timing-issues</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 21:27:08 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/11296.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 28 Jul 2020 10:25:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to RS 485 very slow baud rates (100baud over half-duplex powerline) timing issues on Tue, 28 Jul 2020 10:48:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/cloolalang" aria-label="Profile: cloolalang">@<bdi>cloolalang</bdi></a></p>
<p dir="auto">Other parameters not yet tested;</p>
<ol start="0">
<li>sleep or wait between sketch information and presentation messages and/or in other functions</li>
<li>MY_RS485_MAX_MESSAGE_LENGTH (40)</li>
<li>#define MY_RS485_SOH_COUNT (3)</li>
<li>MY_TRANSPORT_WAIT_READY_MS 0</li>
<li>MY_TRANSPORT_STATE_TIMEOUT_MS 2*1000ul</li>
<li>In mysensors core:</li>
</ol>
<pre><code>// Wait configuration reply.
	(void)wait(2000, C_INTERNAL, I_CONFIG);
</code></pre>
]]></description><link>https://forum.mysensors.org/post/106855</link><guid isPermaLink="true">https://forum.mysensors.org/post/106855</guid><dc:creator><![CDATA[cloolalang]]></dc:creator><pubDate>Tue, 28 Jul 2020 10:48:55 GMT</pubDate></item></channel></rss>