Code Monkey home page Code Monkey logo

Comments (2)

RfAkramKarimi avatar RfAkramKarimi commented on July 20, 2024

Hello,
Up there, I had kept .lwt_topic = "", BUT when I changed the .lwt_topic = "/lwt" (which is default too)
I got the unauthorization error while subscribing to a topic to MQTT server:

Here are the options I am using:
.client_id = "ESP32_Client", .username = "..............", //I have put it right Adafruit USER .password = ".......................................", //I have put it right Adafruit PASS .clean_session = 0, .keepalive = 120, .lwt_topic = "/lwt", // = "" for disable lwt, will don't care other options previously "/lwt" .lwt_msg = "offlines", .lwt_qos = 0, .lwt_retain = 0, .connected_cb = connected_cb, .disconnected_cb = disconnected_cb, //.reconnect_cb = reconnect_cb, .subscribe_cb = subscribe_cb, .publish_cb = publish_cb, .data_cb = data_cb

from esp32-mqtt.

RfAkramKarimi avatar RfAkramKarimi commented on July 20, 2024

I am getting the following UNAUTHORIZED CONNECTION on the log:

[MQTT INFO] Starting mqtt task [MQTT INFO] Resolve dns for domain: io.adafruit.com [MQTT INFO] Connecting to server 52.70.203.194:8883,45858 [MQTT INFO] Creating SSL object... [MQTT INFO] Start SSL connect.. [MQTT INFO] Connected! [MQTT INFO] Connected to server io.adafruit.com:8883 [MQTT INFO] Sending MQTT CONNECT message, type: 1, id: 0000 [MQTT INFO] Reading MQTT CONNECT response message [MQTT WARN] Connection refused, not authorized [MQTT INFO] Closing client socket [MQTT INFO] Client destroyed

from esp32-mqtt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.