Gateway through MQTT?

Can gateway communicate with server through MQTT? Is this implemented?

Otherwise, protocol buffer-encoded messages can be sent through MQTT. MQTTS, a variant of MQTT, enforces TLS encryption.

Does any of you have some examples?
I’m working on GSM gateway, but UDP is pretty slow unfortunatelly so looking for other solutions.


Actually, UDP is likely going to be the fastest.

What it wouldn’t handle very well is situations with packet loss

I’m using SIM800L modules that are working mostly on 2G network. TCP connection is pretty fast (tested it with MQTT mostly), but with UDP I have delays in sending messages of 1-2s (this is compared with classical WiFi gateways). The biggest part of delay is in setting up UDP connection (opening port), and TCP is keeping open connection all the time.

So it’s not the protocol itself, but the setup through the mobile quasi-network or the modem, interesting.

You could use something based on Basic Station which uses websockets and other ultimately TCP based transports, but though that is the direction things are heading in last I heard (see TTIG thread) that may still require going through translation servers which have sometimes been a point of failure. Still it might be worth researching, no personal experience there but others here have used and worked on it.

And of course once you accept the idea of a translation server, you could use basically anything you want to tunnel the data from the gateway over the mobile network up to your custom translator in the cloud, either by translating it or by creating a tunnel that can forward UDP traffic.

I was thinking of something like translation servers, but that will also take some time unfortunatelly. I had that before I started to use TTN.
I will see if someone will write here, who has some other experience with this :smile:

For the gateway connector protocol (which uses MQTT) you could take a look at Multi Protocol Packet forwarder.

1 Like