Connecting to MyQttHub through AT Commands


#1

Hello!

We are trying to send messages to our mqtt hub using an LTE module from Nimbelink, through the method of “Socket Dials”, these are AT Commands issued to the modem which uses an internal TCP/IP stack.

We would basically enter

at#xtcpconn=3,“node02.myqtthub.com”,1883

which the modem answers with success

after that the only other command to use is at#xtcpsend=3, which opens a promt to enter whatever is going to be sent, we have tried sending mosquitto_pub string without success.

Sadly, Nimbelink only has an example using HTTP POST, sending to the promt something like this POST /dweet/for/xxxxxxxxxxxxxxx?hello=world, which works without a problem.

We wonder if you have an idea of what should be sent to the promt to actually send de data to the hub. Thanks in advance!


#2

Hello,

With those basic operations, you should be able to mount login+publish+logout operation

using the API and HTTP 1883/tcp port:

The general idea is to mount every request over your TCP Connection with:

HTTP HEADERS
\r\n
MyQttHub Message

Http headers should be something very simple declaring POST method that associated

to the API [1], plus Host and optionally token received from login.

MyQttHub Message will be raw json declaration required by the service.

[1] REST API to manage MyQttHub service

Use these notes to workout a solution. With a bit of time, you shouldn’t have any stopper

that makes this idea impossible.

Best Regards,