Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Embiq Community

  1. Home
  2. Get Help
  3. MQTT & Connectivity
  4. 📶 Connectivity issue? Post like this

📶 Connectivity issue? Post like this

Scheduled Pinned Locked Moved MQTT & Connectivity
mqttwifitls
1 Posts 1 Posters 118 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    admin
    wrote on last edited by
    #1

    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.

    Read the return code before posting

    Client libraries report why a connection failed — quote it exactly:

    Code / symptom Usual meaning First check
    Connection refused / failed Wrong host, port, or the broker is down Ping the host; confirm the port (1883 plain, 8883 TLS) is reachable
    Unauthorized / bad credentials Username, password, or token rejected Regenerate the token; check for expiry and typos
    Topic rejected ACL blocks that topic for this client Topic must match your device ID exactly, character for character
    TLS verify failed CA chain not trusted by the device Correct CA cert flashed; device clock synced (unsynced clock = invalid certs)
    TLS handshake timeout Too little free heap for crypto Need comfortable headroom — print free heap before connecting
    Connects, then drops in seconds Keepalive shorter than your loop, or same client ID connected twice One client ID per device, always; keepalive longer than your longest blocking task

    The TLS checklist (fixes most "worked on desktop" cases)

    1. Sync time first — certificates are time-bound.
    2. Flash the right CA certificate, and actually verify against it (no insecure-mode leftovers from testing).
    3. Mutual auth needs the client cert + key provisioned per device, not copied across the fleet.
    4. If WiFi connects but MQTT fails, suspect a blocked port or firewall before suspecting code.

    Stay connected, not just connected once

    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.

    Post the return code, your topics, and what the broker logs say. Tag with mqtt, wifi or tls.

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    Powered by NodeBB Contributors
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups