<?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[📶 Connectivity issue? Post like this]]></title><description><![CDATA[<p dir="auto">Connectivity bugs are config bugs until proven otherwise. Include this every time or expect it as the first reply: broker host + port, security mode (plain / TLS / mutual TLS), client ID, the exact topics you publish and subscribe to (credentials redacted), the client library + version, and the full connection return code or error string.</p>
<h3>Read the return code before posting</h3>
<p dir="auto">Client libraries report <em>why</em> a connection failed — quote it exactly:</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Code / symptom</th>
<th>Usual meaning</th>
<th>First check</th>
</tr>
</thead>
<tbody>
<tr>
<td>Connection refused / failed</td>
<td>Wrong host, port, or the broker is down</td>
<td>Ping the host; confirm the port (1883 plain, 8883 TLS) is reachable</td>
</tr>
<tr>
<td>Unauthorized / bad credentials</td>
<td>Username, password, or token rejected</td>
<td>Regenerate the token; check for expiry and typos</td>
</tr>
<tr>
<td>Topic rejected</td>
<td>ACL blocks that topic for this client</td>
<td>Topic must match your device ID exactly, character for character</td>
</tr>
<tr>
<td>TLS verify failed</td>
<td>CA chain not trusted by the device</td>
<td>Correct CA cert flashed; device clock synced (unsynced clock = invalid certs)</td>
</tr>
<tr>
<td>TLS handshake timeout</td>
<td>Too little free heap for crypto</td>
<td>Need comfortable headroom — print free heap before connecting</td>
</tr>
<tr>
<td>Connects, then drops in seconds</td>
<td>Keepalive shorter than your loop, or same client ID connected twice</td>
<td>One client ID per device, always; keepalive longer than your longest blocking task</td>
</tr>
</tbody>
</table>
<h3>The TLS checklist (fixes most "worked on desktop" cases)</h3>
<ol>
<li>Sync time first — certificates are time-bound.</li>
<li>Flash the right CA certificate, and actually verify against it (no insecure-mode leftovers from testing).</li>
<li>Mutual auth needs the client cert + key provisioned per device, not copied across the fleet.</li>
<li>If WiFi connects but MQTT fails, suspect a blocked port or firewall before suspecting code.</li>
</ol>
<h3>Stay connected, not just connected once</h3>
<p dir="auto">Reconnect with backoff (don't hammer the broker every 500 ms forever), resubscribe after every reconnect, use LWT so the fleet knows you're gone, and buffer outbound readings locally during outages instead of dropping them. A device that connects once in the lab and never recovers in the field isn't done.</p>
<p dir="auto"><em>Post the return code, your topics, and what the broker logs say. Tag with mqtt, wifi or tls.</em></p>
]]></description><link>https://forum.grapesiot.com/topic/81/connectivity-issue-post-like-this</link><generator>RSS for Node</generator><lastBuildDate>Thu, 19 Nov 2026 13:02:51 GMT</lastBuildDate><atom:link href="https://forum.grapesiot.com/topic/81.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 03 Oct 2026 11:40:23 GMT</pubDate><ttl>60</ttl></channel></rss>