# HL8548 KTCPRCV command error

**URL:** <https://forum.sierrawireless.com/t/hl8548-ktcprcv-command-error/8749>\
**Category:** Legacy HL Series\
**Created:** [August 25, 2016, 1:40pm UTC](https://forum.sierrawireless.com/t/hl8548-ktcprcv-command-error/8749 "2016-08-25T13:40:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rytispas](https://avatars.discourse-cdn.com/v4/letter/r/bcef8e/32.png) [@rytispas](https://forum.sierrawireless.com/u/rytispas)\
**Post date:** [August 25, 2016, 1:40pm UTC](https://forum.sierrawireless.com/t/hl8548-ktcprcv-command-error/8749/1 "2016-08-25T13:40:08Z")

</div>

Hello,

we are using HL8548 module (fw: RHL85xx.5.5.18.0.201506301553.x6250\_1) connected to microcontroller via UART interface. At 115200bps baud rate it works without problems, but using with higher baudrates(500000,921600,1843200) module frequently(not always) responds to AT+KTCPRCV command with ERROR. It starts to respond normaly only when +KTCPSTAT: 5,4,0,218 indicates that socket is closed. What can be wrong with this command ?

> > AT+KTCPSTAT=1  
> > \<\<+KTCPSTAT: 3,-1,0,218  
> > \<\<OK

> > AT+KTCPRCV=1,218  
> > \<\<ERROR

> > AT+KTCPSTAT=1  
> > \<\<+KTCPSTAT: 3,-1,0,218  
> > \<\<OK

> > AT+KTCPRCV=1,218  
> > \<\<ERROR

> > AT+KTCPSTAT=1  
> > \<\<+KTCPSTAT: 3,-1,0,218  
> > \<\<OK

> > AT+KTCPRCV=1,218  
> > \<\<ERROR

> > AT+KTCPSTAT=1  
> > \<\<+KTCPSTAT: 5,4,0,218  
> > \<\<OK

> > AT+KTCPRCV=1,218  
> > \<\<CONNECT  
> > \<\<218BYTES\_OF\_DATA  
> > \<\<–EOF–Pattern–  
> > \<\<OK

---

<div class="post-metadata">

**Author:** ![Rex\_alex](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@Rex\_alex](https://forum.sierrawireless.com/u/Rex_alex)\
**Post date:** [August 29, 2016, 9:49am UTC](https://forum.sierrawireless.com/t/hl8548-ktcprcv-command-error/8749/2 "2016-08-29T09:49:59Z")

</div>

Hi,  
Provide AT+CMEE=2 at the beginning of the data connection sot hat it will tell you the error details.  
Also not sure you can go for higher baud rate using UART interface 😕

-Alex

---

<div class="post-metadata">

**Author:** ![rytispas](https://avatars.discourse-cdn.com/v4/letter/r/bcef8e/32.png) [@rytispas](https://forum.sierrawireless.com/u/rytispas)\
**Post date:** [August 29, 2016, 12:18pm UTC](https://forum.sierrawireless.com/t/hl8548-ktcprcv-command-error/8749/3 "2016-08-29T12:18:31Z")

</div>

HL8548 module reports this error:  
+CME ERROR: 923 Error due to invalid state of terminal port data mode

Using AT&K3 command does not change anything. Does this mean than it’s impossible to use HL8548 in higher baudrates due to such strange behaviour of only this command ? Or this is a firmware bug ? It’s very strange, that error is reported only when TCP socket is opened.

> > AT&K3  
> > \<\<OK

> > AT+CMEE=2  
> > \<\<OK

> > AT+KTCPSTAT=1  
> > \<\<+KTCPSTAT: 3,-1,0,218  
> > \<\<OK

> > AT+KTCPRCV=1,218  
> > \<\<+CME ERROR: 923

> > AT+KTCPSTAT=1  
> > \<\<+KTCPSTAT: 3,-1,0,218  
> > \<\<OK

> > AT+KTCPRCV=1,218  
> > \<\<+CME ERROR: 923

> > AT+KTCPSTAT=1  
> > \<\<+KTCPSTAT: 3,-1,0,218  
> > \<\<OK

> > AT+KTCPRCV=1,218  
> > \<\<+CME ERROR: 923

> > AT+KTCPSTAT=1  
> > \<\<+KTCPSTAT: 5,4,0,218  
> > \<\<OK

> > AT+KTCPRCV=1,218  
> > \<\<CONNECT  
> > \<\<218BYTES\_OF\_DATA  
> > \<\<–EOF–Pattern–  
> > \<\<OK

---

<div class="post-metadata">

**Author:** ![Rex\_alex](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@Rex\_alex](https://forum.sierrawireless.com/u/Rex_alex)\
**Post date:** [August 30, 2016, 5:17am UTC](https://forum.sierrawireless.com/t/hl8548-ktcprcv-command-error/8749/4 "2016-08-30T05:17:21Z")

</div>

Hi,  
I don’t think using UART you can go or higher baud rates… May be that’s causing issue… you can try with usb or ‘uart to usb’ converter 🙂

-Alex

---

<div class="post-metadata">

**Author:** ![rytispas](https://avatars.discourse-cdn.com/v4/letter/r/bcef8e/32.png) [@rytispas](https://forum.sierrawireless.com/u/rytispas)\
**Post date:** [October 31, 2016, 4:59pm UTC](https://forum.sierrawireless.com/t/hl8548-ktcprcv-command-error/8749/5 "2016-10-31T16:59:32Z")

</div>

Today i have connected HL8548 module through USB connection to computer. Module behaves exactly the same as seen using UART’s high baudrates. Baudrate settings using USB does no effect. Any ideas ?

> > AT&K3  
> > \<\<OK

> > AT+CMEE=2  
> > \<\<OK

> > AT+KTCPSTAT=1  
> > \<\<+KTCPSTAT: 3,-1,0,218  
> > \<\<OK

> > AT+KTCPRCV=1,218  
> > \<\<+CME ERROR: 923

> > AT+KTCPSTAT=1  
> > \<\<+KTCPSTAT: 3,-1,0,218  
> > \<\<OK

> > AT+KTCPRCV=1,218  
> > \<\<+CME ERROR: 923

> > AT+KTCPSTAT=1  
> > \<\<+KTCPSTAT: 3,-1,0,218  
> > \<\<OK

> > AT+KTCPRCV=1,218  
> > \<\<+CME ERROR: 923

> > AT+KTCPSTAT=1  
> > \<\<+KTCPSTAT: 5,4,0,218  
> > \<\<OK

> > AT+KTCPRCV=1,218  
> > \<\<CONNECT  
> > \<\<218BYTES\_OF\_DATA  
> > \<\<–EOF–Pattern–  
> > \<\<OK

---

<div class="post-metadata">

**Author:** ![rytispas](https://avatars.discourse-cdn.com/v4/letter/r/bcef8e/32.png) [@rytispas](https://forum.sierrawireless.com/u/rytispas)\
**Post date:** [November 21, 2016, 2:04pm UTC](https://forum.sierrawireless.com/t/hl8548-ktcprcv-command-error/8749/6 "2016-11-21T14:04:20Z")

</div>

Can anybody explain, what exactly +CME ERROR: 923 (Error due to invalid state of terminal port data mode) means ? Is it a BUG of HL8548 firmware (this error shows up with 5.5.18.0 and 5.5.22.0 FW versions) ?

---

<div class="post-metadata">

**Author:** ![rytispas](https://avatars.discourse-cdn.com/v4/letter/r/bcef8e/32.png) [@rytispas](https://forum.sierrawireless.com/u/rytispas)\
**Post date:** [November 23, 2016, 2:17pm UTC](https://forum.sierrawireless.com/t/hl8548-ktcprcv-command-error/8749/7 "2016-11-23T14:17:09Z")

</div>

Ok, i have figured out, that this error shows up only when i send more than 16000bytes with AT+KTCPSND command. Enabling hardware flow control does nothing, seems that it is not working as stated in interface guide “In AT data mode, the terminal receive buffer size is limited to 32000 bytes; the terminal driver will stop the receive flow at 16000 bytes if hardware  
handshaking is used”.
