Setting up MQTT with the HL78 & AT commands

Which AT commands do you need? i keep getting bad session id errors.

AT+KMQTTCFG=1,0,“test.mosquitto.org”,1883,3,1
AT+KMQTTCNX=1
AT+KMQTTSUB=1,“Publish”,0
AT+KMQTTPUB=1,“Publish”,0,0,“TEST”

which module are you using?
Which FW are you using?

Hi, sorry for the late response.

The module is: HL7812
The FW is: HL7812.5.5.14.0-23-12

What do you need to get a session ID? Do i need to get certificates or something?

i saw that other user can make it work:

Yes i see,

But this example uses Amazon Web Services which i don’t want to use and uses encryption&Authentication which i want to use in the future but not now.
So i will not need certificates.
Using the reference guide it says to give the following AT command:

But this also isn’t working.
Do you maybe have another example for just using MQTT AT commands?
Or do you know what commands i need before it should work?

Thanks in advance! :slight_smile:

I don’t see problem with the following:


at+kcnxcfg=1,"GPRS","iot.swir"

OK
AT+KMQTTCFG=1,0,"test.mosquitto.org",1883,3,"hl78.1234",120,0,1,"test.hl78","network lost",0,0,"username","password"

+KMQTTCFG: 1

OK
ati3
HL7812.5.4.12.1

OK
1 Like

Omg thank you so much! i forget setting the APN and getting the IP i think!

I got it working!