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 . Any ideas as to what i’m doing wrong?
thanks
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
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?
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?