Can't connect to MQTT broker

Hi,

I’m trying to establish a TCP connection with the HiveMQ MQTT broker (18.184.63.203) using the HL7802 module.
I have succesfully connected to a local PC but when i try to connect to an online broker (Hive MQ, Losant), i get a TCP connection error atco . Any ideas as to what i’m doing wrong?
thanks

Hi @hkiol

I can make the TCP connection successfully, according to your commands. Below is the log of my commands

17:51:45.036 on 01-Feb-2021> at+kcnxcfg=1,“GPRS”,“lp.fota.swir”
17:52:02.434 on 01-Feb-2021>
17:52:02.434 on 01-Feb-2021> OK
17:52:02.434 on 01-Feb-2021> at+ktcpcfg=1,0,“18.184.63.203”,1883
17:52:04.500 on 01-Feb-2021>
17:52:04.500 on 01-Feb-2021> +KTCPCFG: 1
17:52:04.500 on 01-Feb-2021>
17:52:04.500 on 01-Feb-2021> OK
17:52:04.500 on 01-Feb-2021> at+ktcpcnx=1
17:52:07.493 on 01-Feb-2021>
17:52:07.505 on 01-Feb-2021> OK
17:52:07.505 on 01-Feb-2021>
17:52:07.505 on 01-Feb-2021> +KCNX_IND: 1,1,0
17:52:07.524 on 01-Feb-2021>
17:52:08.886 on 01-Feb-2021> +KTCP_IND: 1,1
17:52:08.886 on 01-Feb-2021>

Could you please help to send the below commands to get more information about the issue you faced:
- AT+CCID
- AT+CPIN?
- AT+CREG?
- AT+CGDCONT?
- AT+CGACT?
- AT+KCNXCFG=1,“GPRS”,“your APN here”
- AT+KTCPCFG=1,0,“18.184.63.203”,1883
- AT+KTCPCNX=1

1 Like

Thanks for the swift reply.
Here’s what i see:
111
22

So it connects but disconnects immediately.

Hi @hkiol,

According to your image, I observe that your device still does not connect to server “18.184.63.203” successfully, it showed KTCP_NOTIF: 1,5 - TCP Connection error
The successful connection should be KTCP_IND: 1,1 as Donald’s above log.
I suspect that your device’s registered network cannot reach to the IP address “18.184.63.203” via port 1883. Could you please help to check again?

Thanks

1 Like

Hi @Donald ,

Which FW are you using for this test?

Hi @jyijyi,

I used the latest published FW for H7802: HL7802.4.6.6.0

Please refer to below for more detail

ATI9
16:26:49.564 on 02-Feb-2021>
16:26:49.564 on 02-Feb-2021> HL7802.4.6.6
16:26:49.564 on 02-Feb-2021> HL78xx.4.6.6.0.RK_02_01_02_00_122.20201221
16:26:49.593 on 02-Feb-2021> 2020/12/21 19:23:17
16:26:49.593 on 02-Feb-2021> IMEI-SV: 3594590900062613
16:26:49.593 on 02-Feb-2021> Legato RTOS: 18.09.6.ALT1250.rc4 2020/10/06 17:52:39
16:26:49.593 on 02-Feb-2021> atSwi: 42.00
16:26:49.593 on 02-Feb-2021> UBOOT: 01.03
16:26:49.593 on 02-Feb-2021> Apps: RKAPP_02_01_02_00_115__cf01697c56fbf87c1ff30fa676646f6cd010ca02
16:26:49.593 on 02-Feb-2021> MAC: ALT1250_02_01_02_00_112_2G
16:26:49.593 on 02-Feb-2021> PHY: 12.50.241281
16:26:49.594 on 02-Feb-2021> PMP: 248903
16:26:49.594 on 02-Feb-2021> SBUB: 1
16:26:49.594 on 02-Feb-2021> SBFW: 1
16:26:49.594 on 02-Feb-2021> RPuK: 53F7A48A
16:26:49.594 on 02-Feb-2021> FPuK: 139A8E70
16:26:49.594 on 02-Feb-2021> RBUB: 0
16:26:49.594 on 02-Feb-2021> RBFW: 0
16:26:49.594 on 02-Feb-2021>
16:26:49.594 on 02-Feb-2021> OK
16:26:49.594 on 02-Feb-2021> ATI3
16:26:49.611 on 02-Feb-2021>
16:26:49.611 on 02-Feb-2021> HL7802.4.6.6.0
16:26:49.611 on 02-Feb-2021>
16:26:49.611 on 02-Feb-2021> OK
16:26:49.611 on 02-Feb-2021> at+kcnxcfg=1,“GPRS”,“lp.fota.swir”
16:27:00.413 on 02-Feb-2021>
16:27:00.413 on 02-Feb-2021> OK
16:27:00.413 on 02-Feb-2021> at+ktcpcfg=1,0,“18.184.63.203”,1883
16:27:02.991 on 02-Feb-2021>
16:27:02.991 on 02-Feb-2021> +KTCPCFG: 1
16:27:02.991 on 02-Feb-2021>
16:27:02.991 on 02-Feb-2021> OK
16:27:02.991 on 02-Feb-2021> at+ktcpcnx=1
16:27:05.496 on 02-Feb-2021>
16:27:05.519 on 02-Feb-2021> OK
16:27:05.519 on 02-Feb-2021>
16:27:05.519 on 02-Feb-2021> +KCNX_IND: 1,1,0
16:27:05.519 on 02-Feb-2021>
16:27:06.873 on 02-Feb-2021> +KTCP_IND: 1,1
16:27:06.873 on 02-Feb-2021>

@hkiol: Besides the checking about network policy, Could you please also give a try on this latest FW?

Thanks

1 Like

Agree, better try with same FW.

I will check about the network policy as you suggested.
The FW i am running is 4.5.4, so i’ll get the latest one and try again.

Edit: I can’t find the version you mention.

Thanks guys/gals

Hi @hkiol,
This latest published FW was just released yesterday. You can upgrade FW for your module with FOTA method thorugh AirVantage.

If not, please wait a few days for this FW to be released on sierra source.

Thanks,

1 Like

Alright, i updated to 4.6.6.0. The results are still the same.
I am contacting my carrier.

Thanks

It was a carrier issue as you guys mentioned.

Thanks