<?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[Raspberry Pi 3 (RPI 3) gateway initialization loop]]></title><description><![CDATA[<p dir="auto">Hi all,</p>
<p dir="auto">I have a working ESP8266 gateway with 2 nodes, but I want to move the gateway to my Raspberry.</p>
<p dir="auto">I followed all the instructions on the <a href="https://www.mysensors.org/build/raspberry" rel="nofollow ugc">website</a> and had a successful installation.</p>
<p dir="auto">However, I notice that the gateway enters a loop on its initialization and keeps sending the version of MySensors to the MQTT server.</p>
<p dir="auto">The gateway configuration is:</p>
<pre><code>./configure --my-transport=rfm69 --my-rfm69-frequency=433 --my-is-rfm69hw --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-user=user --my-mqtt-password=password --my-mqtt-publish-topic-prefix=mygateway1-out --my-mqtt-subscribe-topic-prefix=mygateway1-in --my-mqtt-client-id=gw_01
</code></pre>
<p dir="auto">My Raspberry runs:</p>
<pre><code>Raspbian GNU/Linux 11 (bullseye)
</code></pre>
<p dir="auto">Where I run Openhab 3.3.0</p>
<p dir="auto">When I run mysgw or start the service, it keeps sending the same message over an over again (many times per second) as below:</p>
<pre><code>Aug 27 23:16:00 INFO  Starting gateway...
Aug 27 23:16:00 INFO  Protocol version - 2.3.2
Aug 27 23:16:00 DEBUG MCO:BGN:INIT GW,CP=RPNGL---,FQ=NA,REL=255,VER=2.3.2
Aug 27 23:16:00 DEBUG TSF:LRT:OK
Aug 27 23:16:00 DEBUG TSM:INIT
Aug 27 23:16:00 DEBUG TSF:WUR:MS=0
Aug 27 23:16:00 DEBUG TSM:INIT:TSP OK
Aug 27 23:16:00 DEBUG TSM:INIT:GW MODE
Aug 27 23:16:00 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
Aug 27 23:16:00 DEBUG MCO:REG:NOT NEEDED
Aug 27 23:16:00 DEBUG MCO:BGN:STP
Aug 27 23:16:00 DEBUG MCO:BGN:INIT OK,TSP=1
Aug 27 23:16:00 DEBUG GWT:RMQ:CONNECTING...
Aug 27 23:16:00 DEBUG connected to 127.0.0.1
Aug 27 23:16:00 DEBUG GWT:RMQ:OK
Aug 27 23:16:00 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
Aug 27 23:16:00 DEBUG TSM:READY:NWD REQ
Aug 27 23:16:00 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
Aug 27 23:16:00 DEBUG GWT:RMQ:CONNECTING...
Aug 27 23:16:00 DEBUG connected to 127.0.0.1
Aug 27 23:16:00 DEBUG GWT:RMQ:OK
Aug 27 23:16:00 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
Aug 27 23:16:01 DEBUG GWT:RMQ:CONNECTING...
Aug 27 23:16:01 DEBUG connected to 127.0.0.1
Aug 27 23:16:01 DEBUG GWT:RMQ:OK
Aug 27 23:16:01 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
Aug 27 23:16:01 DEBUG GWT:RMQ:CONNECTING...
Aug 27 23:16:01 DEBUG connected to 127.0.0.1
Aug 27 23:16:01 DEBUG GWT:RMQ:OK
Aug 27 23:16:01 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
Aug 27 23:16:01 DEBUG GWT:RMQ:CONNECTING...
Aug 27 23:16:01 DEBUG connected to 127.0.0.1
Aug 27 23:16:01 DEBUG GWT:RMQ:OK
Aug 27 23:16:01 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
Aug 27 23:16:01 DEBUG GWT:RMQ:CONNECTING...
Aug 27 23:16:01 DEBUG connected to 127.0.0.1
Aug 27 23:16:01 DEBUG GWT:RMQ:OK
Aug 27 23:16:01 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
Aug 27 23:16:01 DEBUG GWT:RMQ:CONNECTING...

</code></pre>
<p dir="auto">Many thanks for any help.</p>
]]></description><link>https://forum.mysensors.org/topic/12018/raspberry-pi-3-rpi-3-gateway-initialization-loop</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 23:14:52 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/12018.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 28 Aug 2022 02:24:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Raspberry Pi 3 (RPI 3) gateway initialization loop on Mon, 29 Aug 2022 02:22:55 GMT]]></title><description><![CDATA[<p dir="auto">Problem solved: I was using as <strong>--my-mqtt-client-id</strong> the same name as my previous broker.</p>
<p dir="auto">Thanks for your help all!</p>
]]></description><link>https://forum.mysensors.org/post/112947</link><guid isPermaLink="true">https://forum.mysensors.org/post/112947</guid><dc:creator><![CDATA[Oumuamua]]></dc:creator><pubDate>Mon, 29 Aug 2022 02:22:55 GMT</pubDate></item><item><title><![CDATA[Reply to Raspberry Pi 3 (RPI 3) gateway initialization loop on Sun, 28 Aug 2022 15:51:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/oumuamua" aria-label="Profile: Oumuamua">@<bdi>Oumuamua</bdi></a> said in <a href="/post/112938">Raspberry Pi 3 (RPI 3) gateway initialization loop</a>:<br />
This is a clue (or a red herring) because there is a ? in the message.</p>
<blockquote>
<p dir="auto">Aug 28 07:39:12 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:</p>
</blockquote>
<p dir="auto">Hopefully <a class="plugin-mentions-user plugin-mentions-a" href="/user/mfalkvidd" aria-label="Profile: mfalkvidd">@<bdi>mfalkvidd</bdi></a> can tell us what it means</p>
]]></description><link>https://forum.mysensors.org/post/112940</link><guid isPermaLink="true">https://forum.mysensors.org/post/112940</guid><dc:creator><![CDATA[OldSurferDude]]></dc:creator><pubDate>Sun, 28 Aug 2022 15:51:55 GMT</pubDate></item><item><title><![CDATA[Reply to Raspberry Pi 3 (RPI 3) gateway initialization loop on Sun, 28 Aug 2022 10:48:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mfalkvidd" aria-label="Profile: mfalkvidd">@<bdi>mfalkvidd</bdi></a> and <a class="plugin-mentions-user plugin-mentions-a" href="/user/oldsurferdude" aria-label="Profile: OldSurferDude">@<bdi>OldSurferDude</bdi></a></p>
<p dir="auto">My thanks for the quick hints.</p>
<p dir="auto">Yes, Mosquitto is running on the same machine.</p>
<p dir="auto">I added <strong>--extra-cxxflags="-DMY_DEBUG_VERBOSE_GATEWAY</strong> to the configure file and also updated the Mosquitto conf as per <a class="plugin-mentions-user plugin-mentions-a" href="/user/mfalkvidd" aria-label="Profile: mfalkvidd">@<bdi>mfalkvidd</bdi></a> suggestion.</p>
<p dir="auto">Unfortunately the log did change (see below).</p>
<p dir="auto">One important comment: the connection is actually successful with the MQTT server as I can see all the publications in it using MQTT Explorer. It seems to me that the problem is with the gateway in some way that keeps sending it non-stop.</p>
<p dir="auto">The problem happens if I just run mysgw or when I start the service.</p>
<pre><code>Aug 28 07:39:11 INFO  Starting gateway...
Aug 28 07:39:11 INFO  Protocol version - 2.3.2
Aug 28 07:39:11 DEBUG MCO:BGN:INIT GW,CP=RPNGL---,FQ=NA,REL=255,VER=2.3.2
Aug 28 07:39:11 DEBUG TSF:LRT:OK
Aug 28 07:39:11 DEBUG TSM:INIT
Aug 28 07:39:11 DEBUG TSF:WUR:MS=0
Aug 28 07:39:11 DEBUG TSM:INIT:TSP OK
Aug 28 07:39:11 DEBUG TSM:INIT:GW MODE
Aug 28 07:39:11 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
Aug 28 07:39:11 DEBUG MCO:REG:NOT NEEDED
Aug 28 07:39:11 DEBUG MCO:BGN:STP
Aug 28 07:39:11 DEBUG MCO:BGN:INIT OK,TSP=1
Aug 28 07:39:11 DEBUG GWT:RMQ:CONNECTING...
Aug 28 07:39:11 DEBUG connected to 127.0.0.1
Aug 28 07:39:11 DEBUG GWT:RMQ:OK
Aug 28 07:39:11 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
Aug 28 07:39:11 DEBUG TSM:READY:NWD REQ
Aug 28 07:39:12 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
Aug 28 07:39:12 DEBUG GWT:RMQ:CONNECTING...
Aug 28 07:39:12 DEBUG connected to 127.0.0.1
Aug 28 07:39:12 DEBUG GWT:RMQ:OK
Aug 28 07:39:12 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
Aug 28 07:39:12 DEBUG GWT:RMQ:CONNECTING...
Aug 28 07:39:12 DEBUG connected to 127.0.0.1
Aug 28 07:39:12 DEBUG GWT:RMQ:OK
Aug 28 07:39:12 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
Aug 28 07:39:12 DEBUG GWT:RMQ:CONNECTING...
Aug 28 07:39:12 DEBUG connected to 127.0.0.1
Aug 28 07:39:12 DEBUG GWT:RMQ:OK
Aug 28 07:39:12 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
Aug 28 07:39:12 DEBUG GWT:RMQ:CONNECTING...
Aug 28 07:39:12 DEBUG connected to 127.0.0.1
Aug 28 07:39:12 DEBUG GWT:RMQ:OK
Aug 28 07:39:12 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
Aug 28 07:39:12 DEBUG GWT:RMQ:CONNECTING...
Aug 28 07:39:12 DEBUG connected to 127.0.0.1
Aug 28 07:39:12 DEBUG GWT:RMQ:OK
Aug 28 07:39:12 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
Aug 28 07:39:13 DEBUG GWT:RMQ:CONNECTING...
Aug 28 07:39:13 DEBUG connected to 127.0.0.1
Aug 28 07:39:13 DEBUG GWT:RMQ:OK
Aug 28 07:39:13 DEBUG GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT

</code></pre>
]]></description><link>https://forum.mysensors.org/post/112938</link><guid isPermaLink="true">https://forum.mysensors.org/post/112938</guid><dc:creator><![CDATA[Oumuamua]]></dc:creator><pubDate>Sun, 28 Aug 2022 10:48:20 GMT</pubDate></item><item><title><![CDATA[Reply to Raspberry Pi 3 (RPI 3) gateway initialization loop on Sun, 28 Aug 2022 07:59:48 GMT]]></title><description><![CDATA[<p dir="auto">Add <code>--extra-cxxflags="-DMY_DEBUG_VERBOSE_GATEWAY</code> to the configure command and run make again. This will give more details in the debug log.</p>
<p dir="auto">Edit: the log file of your mqtt broker might give some iseful info as well.</p>
]]></description><link>https://forum.mysensors.org/post/112935</link><guid isPermaLink="true">https://forum.mysensors.org/post/112935</guid><dc:creator><![CDATA[mfalkvidd]]></dc:creator><pubDate>Sun, 28 Aug 2022 07:59:48 GMT</pubDate></item><item><title><![CDATA[Reply to Raspberry Pi 3 (RPI 3) gateway initialization loop on Sun, 28 Aug 2022 03:43:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/oumuamua" aria-label="Profile: Oumuamua">@<bdi>Oumuamua</bdi></a> When you set</p>
<pre><code>--my-controller-ip-address=127.0.0.1
</code></pre>
<p dir="auto">you are saying your MQTT broker is on the same machine as your gateway.   If, on your RPi you installed your broker with (what I do)</p>
<pre><code>sudo apt install mosquitto
</code></pre>
<p dir="auto">you will have to add the lines to /etc/mosquitto/mosquitto.conf</p>
<pre><code>allow_anonymous true
listener 1883 0.0.0.0
</code></pre>
<p dir="auto">After that, reboot.</p>
<p dir="auto">Alas, this may not fix your problem.  I see you're looping on connecting/connected/sent.  I make the assumption that the debug message aren't quite accurate because ... well ... sometimes they aren't.</p>
<p dir="auto">Let us know if this works :)</p>
<p dir="auto">OSD</p>
]]></description><link>https://forum.mysensors.org/post/112933</link><guid isPermaLink="true">https://forum.mysensors.org/post/112933</guid><dc:creator><![CDATA[OldSurferDude]]></dc:creator><pubDate>Sun, 28 Aug 2022 03:43:30 GMT</pubDate></item></channel></rss>