<?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[Arduino never reaches setup() or loop() when rs485 connection is down]]></title><description><![CDATA[<p dir="auto">I am trying to add MySensors connectivity via rs485 on diy thermostats (arduino based)</p>
<p dir="auto">As long as I have a connection to a rs485 gateway things seems to be working fine, but if the connection is lost (or the gateway-program on my Linux box is not running) the thermostat never starts up. only the code in before() is executed</p>
<p dir="auto">Is that the expected behavior, and is there anyway around this ?</p>
<p dir="auto">I need my thermostats to work even if there is no connectivity to the MySensors infrastructure.</p>
<p dir="auto">Here is what I see on the serial port of the arduino when the gateway is down.</p>
<pre><code> __  __       ____
|  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
| |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
| |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
|_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
        |___/                      2.3.1

16 MCO:BGN:INIT NODE,CP=RSNNA---,REL=255,VER=2.3.1
26 MCO:BGN:BFR
ShuntCtrl
to clear EEPROM presss c now:  321
4142 TSM:INIT
4143 TSF:WUR:MS=0
4145 TSM:INIT:TSP OK
4146 TSM:INIT:STATID=123
4149 TSF:SID:OK,ID=123
4151 TSM:FPAR
4168 TSF:MSG:SEND,123-123-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
6176 !TSM:FPAR:NO REPLY
6178 TSM:FPAR
6196 TSF:MSG:SEND,123-123-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
8204 !TSM:FPAR:NO REPLY
8206 TSM:FPAR
8223 TSF:MSG:SEND,123-123-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
10231 !TSM:FPAR:NO REPLY
10233 TSM:FPAR
10252 TSF:MSG:SEND,123-123-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
12259 !TSM:FPAR:FAIL
12260 TSM:FAIL:CNT=1
12262 TSM:FAIL:DIS
12264 TSF:TDI:TSL
22267 TSM:FAIL:RE-INIT
22269 TSM:INIT
22270 TSM:INIT:TSP OK
22273 TSM:INIT:STATID=123
22275 TSF:SID:OK,ID=123
22278 TSM:FPAR
22295 TSF:MSG:SEND,123-123-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
24303 !TSM:FPAR:NO REPLY
24305 TSM:FPAR
24324 TSF:MSG:SEND,123-123-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
26331 !TSM:FPAR:NO REPLY
26333 TSM:FPAR
26351 TSF:MSG:SEND,123-123-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
28358 !TSM:FPAR:NO REPLY
28360 TSM:FPAR
28379 TSF:MSG:SEND,123-123-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
30386 !TSM:FPAR:FAIL
30387 TSM:FAIL:CNT=2
30389 TSM:FAIL:DIS
30391 TSF:TDI:TSL
40394 TSM:FAIL:RE-INIT
40396 TSM:INIT
40397 TSM:INIT:TSP OK
40399 TSM:INIT:STATID=123

</code></pre>
]]></description><link>https://forum.mysensors.org/topic/10749/arduino-never-reaches-setup-or-loop-when-rs485-connection-is-down</link><generator>RSS for Node</generator><lastBuildDate>Tue, 10 Nov 2026 15:56:09 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/10749.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 08 Nov 2019 22:30:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Arduino never reaches setup() or loop() when rs485 connection is down on Sat, 09 Nov 2019 14:22:21 GMT]]></title><description><![CDATA[<p dir="auto">Thank you so much, just the input I needed.</p>
<p dir="auto">Works like a charm, I have included the output from the serial port, if any one else wonders what to expect.</p>
<pre><code>__  __       ____
|  \/  |_   _/ ___|  ___ _ __  ___  ___  _ __ ___
| |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
| |  | | |_| |___| |  __/ | | \__ \  _  | |  \__ \
|_|  |_|\__, |____/ \___|_| |_|___/\___/|_|  |___/
        |___/                      2.3.1

16 MCO:BGN:INIT NODE,CP=RSNNA---,REL=255,VER=2.3.1
26 MCO:BGN:BFR
before
ShuntCtrl
to clear EEPROM presss c now:  321
4156 TSM:INIT
4157 TSF:WUR:MS=1000
4159 TSM:INIT:TSP OK
4161 TSM:INIT:STATID=123
4163 TSF:SID:OK,ID=123
4165 TSM:FPAR
4184 TSF:MSG:SEND,123-123-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
5159 MCO:BGN:STP
setup
5161 !TSF:SND:TNR
6164 !TSF:SND:TNR
6192 !TSM:FPAR:NO REPLY
6194 TSM:FPAR
6211 TSF:MSG:SEND,123-123-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
7165 MCO:BGN:INIT OK,TSP=0
8288 !MCO:SND:NODE NOT REG
8372 !MCO:SND:NODE NOT REG
8455 !MCO:SND:NODE NOT REG
8539 !MCO:SND:NODE NOT REG
[ %0PH 18.8 Vejr 18.7 ] [ %16PC 18.6 -&gt;25 18.4 ]
8636 !TSM:FPAR:NO REPLY
8638 TSM:FPAR
8656 TSF:MSG:SEND,123-123-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
[ %0PH 18.8 Vejr 18.7 ] [ %16PC 18.6 -&gt;25 18.4 ]
11094 !TSM:FPAR:NO REPLY
11096 TSM:FPAR
11114 TSF:MSG:SEND,123-123-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
[ %0PH 18.8 Vejr 18.7 ] [ %16PC 18.6 -&gt;25 18.4 ]
13550 !TSM:FPAR:FAIL
13552 TSM:FAIL:CNT=1
13554 TSM:FAIL:DIS
13556 TSF:TDI:TSL
[ %0PH 18.8 Vejr 18.7 ] [ %16PC 18.6 -&gt;25 18.4 ]
[ %0PH 18.8 Vejr 18.7 ] [ %16PC 18.6 -&gt;25 18.4 ]
[ %0PH 18.8 Vejr 18.7 ] [ %16PC 18.6 -&gt;25 18.4 ]
[ %0PH 18.8 Vejr 18.7 ] [ %16PC 18.6 -&gt;25 18.4 ]
23558 TSM:FAIL:RE-INIT
23560 TSM:INIT
23561 TSM:INIT:TSP OK
23563 TSM:INIT:STATID=123
23565 TSF:SID:OK,ID=123
</code></pre>
]]></description><link>https://forum.mysensors.org/post/102193</link><guid isPermaLink="true">https://forum.mysensors.org/post/102193</guid><dc:creator><![CDATA[StorePeter]]></dc:creator><pubDate>Sat, 09 Nov 2019 14:22:21 GMT</pubDate></item><item><title><![CDATA[Reply to Arduino never reaches setup() or loop() when rs485 connection is down on Sat, 09 Nov 2019 07:18:31 GMT]]></title><description><![CDATA[<p dir="auto">welcome to the forum <a class="plugin-mentions-user plugin-mentions-a" href="/user/storepeter" aria-label="Profile: storepeter">@<bdi>storepeter</bdi></a> !</p>
<p dir="auto">Yes this is expected default behavior, but it can be changed. Exactly how things should work varies a bit from different use cases, but see the <a href="https://www.mysensors.org/apidocs/group__RoutingNodeSettingGrpPub.html#ga45b4f1c868b8cb5d7396cdfb4939559c" rel="nofollow ugc">documentation</a> for MY_TRANSPORT_WAIT_READY_MS and search for that keyword in the forum to find some ways to do it.</p>
<p dir="auto">See the flowchart "node boot sequence" at <a href="https://www.mysensors.org/download/sensor_api_20#node-boot-sequence" rel="nofollow ugc">https://www.mysensors.org/download/sensor_api_20#node-boot-sequence</a> to see how changing MY_TRANSPORT_WAIT_READY_MS will affect how code is executed.</p>
<p dir="auto">If you have any questions, just post them here.</p>
]]></description><link>https://forum.mysensors.org/post/102184</link><guid isPermaLink="true">https://forum.mysensors.org/post/102184</guid><dc:creator><![CDATA[mfalkvidd]]></dc:creator><pubDate>Sat, 09 Nov 2019 07:18:31 GMT</pubDate></item></channel></rss>