Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] MQTT-SN Questions about DISCONNECT + retransmissions

Hi,

I've been using MQTT-SN for a little while, and have two questions
about it that I hope someone here can help me with:


1. When my MQTT-SN client changes its IP address, the MQTT-SN
connection breaks because the gateway can no longer identify the
client. The gateway stops responding, and the client retransmits its
message a few times until it times out.

>From the MQTT-SN v1.2 specification (p. 17):

> A server or gateway may also sends a DISCONNECT to a client, e.g. in
> case a gateway, due to an error, cannot map a received message to a
> client. Upon receiving such a DISCONNECT message, a client should try
> to setup the connection again by sending a CONNECT message to the
> gateway or server.

Does this also apply in the IP change situation? Seems like it should.
(?)

Neither the Paho MQTT-SN gateway nor the RSMB seem to send a DISCONNECT
upon receiving a message from an unidentifiable client. Why is this so?

(Actually, it seems that the Paho gateway used to do this, but it was
taken out: 
https://github.com/eclipse/paho.mqtt-sn.embedded-c/commit/df080f28510e948ec09735393a6f23834cedf065#diff-bc1e2659848bfd92903b9baedc17ded712a11feaa665627a9fea3b2894e917faL224
)


2. I was surprised to see that the MQTT-SN gateway doesn't retransmit
QoS>0 messages that are not acknowledged.

>From the MQTT-SN v1.2 specification (p. 25):

> All messages that are “unicasted” to the GW (i.e. sent using the GW’s
> unicast address and not broadcasted) and for which a GW’s reply is
> expected are supervised by a retry timer T_{retry} and a retry
> counter N_{retry}. The retry timer T_{retry} is started by the client
> when the message is sent and stopped when the expected GW’s reply is
> received. If T_{retry} times out and the expected GW’s reply is not
> received, the client retransmits the message.

Why is the retransmission procedure limited to one direction only
(client -> GW)? What if a PUBLISH is lost on the way GW -> client?


Thanks a lot for any help!

Vera



Back to the top