# HL7802 AT+KTCPCFG timeout

**URL:** <https://forum.sierrawireless.com/t/hl7802-at-ktcpcfg-timeout/26022>\
**Category:** HL78\
**Created:** [January 19, 2022, 10:27am UTC](https://forum.sierrawireless.com/t/hl7802-at-ktcpcfg-timeout/26022 "2022-01-19T10:27:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakub.polonsky](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jakub.polonsky](https://forum.sierrawireless.com/u/jakub.polonsky)\
**Post date:** [January 19, 2022, 10:27am UTC](https://forum.sierrawireless.com/t/hl7802-at-ktcpcfg-timeout/26022/1 "2022-01-19T10:27:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Donald](https://avatars.discourse-cdn.com/v4/letter/d/ac8455/32.png) [@Donald](https://forum.sierrawireless.com/u/Donald)\
**Post date:** [January 20, 2022, 1:00am UTC](https://forum.sierrawireless.com/t/hl7802-at-ktcpcfg-timeout/26022/2 "2022-01-20T01:00:39Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jakub.polonsky](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jakub.polonsky](https://forum.sierrawireless.com/u/jakub.polonsky)\
**Post date:** [January 20, 2022, 7:56am UTC](https://forum.sierrawireless.com/t/hl7802-at-ktcpcfg-timeout/26022/3 "2022-01-20T07:56:23Z")

</div>

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](https://forum.sierrawireless.com/uploads/short-url/nCwc4MVduptZAKZgcYMJcKizguW.zip) (87.8 KB)

---

<div class="post-metadata">

**Author:** ![Donald](https://avatars.discourse-cdn.com/v4/letter/d/ac8455/32.png) [@Donald](https://forum.sierrawireless.com/u/Donald)\
**Post date:** [January 25, 2022, 3:12am UTC](https://forum.sierrawireless.com/t/hl7802-at-ktcpcfg-timeout/26022/4 "2022-01-25T03:12:11Z")

</div>

Hi jakub.polonsky,

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

---

<div class="post-metadata">

**Author:** ![jakub.polonsky](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jakub.polonsky](https://forum.sierrawireless.com/u/jakub.polonsky)\
**Post date:** [January 26, 2022, 11:32am UTC](https://forum.sierrawireless.com/t/hl7802-at-ktcpcfg-timeout/26022/5 "2022-01-26T11:32:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Donald](https://avatars.discourse-cdn.com/v4/letter/d/ac8455/32.png) [@Donald](https://forum.sierrawireless.com/u/Donald)\
**Post date:** [February 15, 2022, 10:54am UTC](https://forum.sierrawireless.com/t/hl7802-at-ktcpcfg-timeout/26022/6 "2022-02-15T10:54:01Z")

</div>

Hi jakub.polonsky,

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

---

<div class="post-metadata">

**Author:** ![jakub.polonsky](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jakub.polonsky](https://forum.sierrawireless.com/u/jakub.polonsky)\
**Post date:** [March 3, 2022, 4:38pm UTC](https://forum.sierrawireless.com/t/hl7802-at-ktcpcfg-timeout/26022/7 "2022-03-03T16:38:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Donald](https://avatars.discourse-cdn.com/v4/letter/d/ac8455/32.png) [@Donald](https://forum.sierrawireless.com/u/Donald)\
**Post date:** [March 3, 2022, 11:39pm UTC](https://forum.sierrawireless.com/t/hl7802-at-ktcpcfg-timeout/26022/8 "2022-03-03T23:39:03Z")

</div>


