MQTT connection over Modem w/ AT commands

I’m fairly new to MQTT. I have been passing sensor data via microcontrollers and UDP sockets no problem. Now I have an application requiring MQTT and a modem on a microcontroller. I have not found a real clear source on making the connection. Do I need to do it via MQTT over HTTP, or can I open a TCP socket and if so how do I push the data/query it via the socket?


MQTT will probably be the easiest solution. What hardware are you using?

I’m using a Telit LE910 shield I designed to run on top of an Arduino MEGA. It is part of a design effort to Offer a dev kit for the LTE Cat 1 network. They want to look at using the my devices environment with it.

I only have AT commands to open the ports and transport the data.

Julius Miller

I’m don’t have much experience with using AT commands, so I wouldn’t be able to help you there. If you can get a connection set up that will send MQTT packets you should be good.

I’m able to establish a tcp connection to the 1883. From that point it
just hangs. At what point do I need to pass username, pwd, CID etc…
What is needed when I send authentication? do I use a get string http
query or do I have to use a PUT or POST? are there any examples? I have
been combing the internet and haven’t found much other than click bait crap.

I’ve always just used a library to send the MQTT packets, so manually sending them is a bit over my head. Let me see what I can find about doing it the way you are.

I did a packet capture using MQTTfx and on connect it’s using the MQTT protocol to send a connect command, then the server send back an MQTT connect Ack which finalizes the connection. After that it’s send/receive data using MQTT protocol Publish Message. I did not see any HTTP data at any point. There’s always the pubsubclient library, but I’m not sure that it would work with your AT commands. Does this github issue help?

You could also try this github fork

1 Like

Hi Julius,
I have the same issue, did find any solution? i am using telit HE910-D.

we don’t have support for this device. the Telit GL865 is supported