HL7802 AT+KTCPCFG timeout

I am setting up a connection to a test MQTT server using FreeRTOS cellular library. Part of the sequence is sending AT+KTCPCFG=1,0,"test.mosquitto.org",1883. Most of the time, the response (+KTCPCFG: 1) is received in about 2.5 seconds. But sometimes, it takes much more, about 32 seconds. This of course causes timeouts in my firmware.

The AT Commands Interface Guide specifies that the timeout for this command is 2 seconds but in my case, it isn’t. My question is what influences the response time to this command (why it may sometimes take so long) and is there a definitive maximum time it takes HL7802 to respond I can put into my firmware.

Hi jakub.polonsky,

What firmware version are you using? If it is not the latest firmware 4.6.9.4. Can you please download the latest firmware to the module and retry?

I am using the latest 4.6.9.4.
I am also attaching capture from logic analyzer (Saleae) where the response to AT+KTCPCFG took about 32 seconds. I get this behavior maybe one in five tries.
ktcpcfg-32s.zip (87.8 KB)

Hi jakub.polonsky,

Do you observe this issue after powering off, powering on the module, or re-downloading the firmware again?

Well, my setup is a MCU that connects via UART to HL7802. I am using FreeRTOS cellular library. This all happens during development so I typically upload new firmware for the MCU, which then resets and starts communication with HL7802. It is possible that the state of HL7802 during the MCU reset is unknown (it could be in the middle of something).
That being said, the communication starts with ATE0, some configuration and then AT+CFUN=1,1 so HL7802 is always reset. Only after this reset the TCP communication is attempted during which the timeout problem sometimes occurs. I thought that after reset (CFUN), the previous state would not matter. Maybe it does.

Hi jakub.polonsky,

Does this issue occur on one module or all HL7802 modules?

Sorry, I could not repeat it since. I will reopen the thread if I see it again.