Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] eDRX and MQTT

Yeah, in the past I've used a number of proprietary solutions to trick both sides into thinking that the network connection is still open despite the fact that modem is powered down. That takes a lot of extra coding and debugging.

I've never tried TLS caching, but that seems an interesting path to explore. But I don't know that it would work. The MQTT server expects a single MQTT connect packet per network connection - as the first packet received.

In the end, this boils down to what your budgets are in terms of both electrical/power constraints and financial ones. Do you have enough power to keep the modem awake for the extra seconds to connect? (Including a key exchange, if necessary.) Are you paying by bytes sent? Or by connection time? Or both?

Depending on how often you need to connect can make all the difference. Every minute? Ten? Every hour? As John was inquiring about connections every 20min or less, this seems very viable.

When the math works out in your favor, it's awesome because you can sit back and let the protocol and server do most of the heavy lifting for you.


On 2/23/19 10:17 AM, Greg Troxel wrote:
Frank Pagliughi <fpagliughi@xxxxxxxxxxxxxx> writes:

When the modem powers back up ("enters eDRX"):

  * Reconnect with the same Client ID and clean_session=false. This
    time, you don't need to re-register the topics.
(assuming that TLS is being used, because it seems unwise not to)

Does this work in concert with some kind of TLS session caching so that
the reconnect doesn't have to do new auth an key exchange?  I would hope
so, but it's enough layers that the possibility of it not working would
seem nonzero.

Back to the top