MQTT server sending a message to a client declaring unauthorization

0 votes

So, there's this MQTT client that sends a CONNECT packet the MQTT broker with a username and the password. 

If the client is not authorized to connect, the broker closes the connection. 

Since the CONNACK packet does not allow any payloads, I was wondering how the MQTT broker tells the client that the reason for closing the connection is no authorization.

Apr 24 in IoT (Internet of Things) by Shubham
• 13,250 points
28 views

1 answer to this question.

0 votes

It would return a CONNACK packet with the Connect Return code set to 5. 

Refer section 3.2.2.3 of the MQTT v3.1.1 spec.

http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718033

answered Apr 24 by Upasana
• 8,490 points

Related Questions In IoT (Internet of Things)

0 votes
1 answer

Changing message format in KURA MQTT cloud client

The Eclipse Kura communicates with a MQTT ...READ MORE

answered Jul 29, 2018 in IoT (Internet of Things) by DataKing99
• 8,100 points
124 views
0 votes
1 answer
0 votes
1 answer

MQTT : Connection lost on MQTT subscriber to Internet of Things Server

An invalid topic "matteo" seems to be causing the ...READ MORE

answered Oct 3, 2018 in IoT (Internet of Things) by Annie97
• 2,190 points
359 views
0 votes
1 answer

Detecting when a sensor is not sending data to Orion CB in FiWARE

Orion in itself has no such mechanism ...READ MORE

answered Nov 21, 2018 in IoT (Internet of Things) by Shubham
• 13,250 points
25 views
0 votes
1 answer

MQTT protocol connection error

Ok so you need two libraries to ...READ MORE

answered Jul 6, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points

reshown Jul 6, 2018 by Vardhan 347 views
0 votes
1 answer

Mosquitto 1.4.2 Websocket support

down vote In the dir mosquitto-1.4.X edit the ...READ MORE

answered Jul 9, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
84 views
0 votes
1 answer

IoT request response protocol

Based on your requirement of a light ...READ MORE

answered Jul 13, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
211 views
0 votes
1 answer

What is the maximum message length for a MQTT broker?

It's not entirely clear what you're asking ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
160 views
0 votes
1 answer

Testing if a Milo client connection to a server is actually using encryption

To actually verify you need Wireshark.  Wireshark understands OPC-UA. ...READ MORE

answered May 8 in IoT (Internet of Things) by Upasana
• 8,490 points
56 views
0 votes
1 answer

What is the time taken by a 200 byte message for transmission in a beacon-enabled network?

Now, data rates of IEEE 802.15.4 are ...READ MORE

answered Aug 23, 2018 in IoT (Internet of Things) by Upasana
• 8,490 points
32 views