# Problems TCP with serial port. HL8548

**URL:** <https://forum.sierrawireless.com/t/problems-tcp-with-serial-port-hl8548/24048>\
**Category:** Legacy HL Series\
**Tags:** faq\
**Created:** [June 21, 2021, 8:49am UTC](https://forum.sierrawireless.com/t/problems-tcp-with-serial-port-hl8548/24048 "2021-06-21T08:49:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![forad](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@forad](https://forum.sierrawireless.com/u/forad)\
**Post date:** [June 21, 2021, 8:49am UTC](https://forum.sierrawireless.com/t/problems-tcp-with-serial-port-hl8548/24048/1 "2021-06-21T08:49:36Z")

</div>

Hi, all,

I’m using TCP/IP by serial. I sent the small packet to server every minutes.

Now I have a problem.  
When failed to communicated various reason, the session is can’t re-use anymore.  
Example,  
After send the AT+KTCPCNX=session\_id, sometimes rejected from server. - receive the ack +KTCP\_NOTIF: session\_id,5.  
Yes, it can be happend. But after this status, I tried to close the sesson or delete the session. Then it goes to fail.

AT+KTCPCLOSE=1,1  
NO ack  
AT+KTCPDEL=1  
ERROR

How can I re-use that session number? Because I reached last session\_id at one day. No more usable session\_id.

How can I solve this problem?

---

<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:** [June 21, 2021, 9:05am UTC](https://forum.sierrawireless.com/t/problems-tcp-with-serial-port-hl8548/24048/2 "2021-06-21T09:05:42Z")

</div>

Hi forad,

Which firmware version are you using?

Please provide the output of the below commands:  
ATI3  
AT+CREG?  
AT+CGDCONT?  
AT+CGACT?  
AT+CGPADDR  
AT+CMEE=1  
AT+KCNXCFG?  
AT+KTCPCFG?  
AT+KTCPCLOSE=1,1  
AT+KTCPDEL=1

---

<div class="post-metadata">

**Author:** ![forad](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@forad](https://forum.sierrawireless.com/u/forad)\
**Post date:** [June 21, 2021, 9:17am UTC](https://forum.sierrawireless.com/t/problems-tcp-with-serial-port-hl8548/24048/3 "2021-06-21T09:17:52Z")

</div>

Thanks reply Donald,

I didn’t check the Software version. I am going to check it.

I usually using below sequence, It’s working well. But sometimes crashed.

AT&K3  
AT+KTCNXCFG=1, “GPRS”,“APN”  
AT+KTCPCFG=1,0,“ServerIP”,ServerPort - get a session\_id  
AT+KTCPCNX=session\_id  
AT+KTCPSND=session\_id,length - receive CONNECT and send buffer  
+KTCP\_DATA: session\_id,receive\_buffer\_size  
AT+KTCPRCV=session\_id,length - receive CONNECT and read buffer  
AT+KTCPCLOSE=session\_id,1  
AT+KTCPDEL=session\_id

Sometimes crashed and can’t re-use session\_id. Then got a next session\_id and retry.  
But HL8548 can get a session\_id maximum 32. After using all session\_id, can’t communicate anymore.

After crashed I tried AT+KTCPSTAT, but no ACK.

That is my problem. Please advice to me.  
Thank you.

---

<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:** [July 14, 2021, 8:40am UTC](https://forum.sierrawireless.com/t/problems-tcp-with-serial-port-hl8548/24048/4 "2021-07-14T08:40:31Z")

</div>

Hi forad,

> [@forad](#):
>
> I usually using below sequence, It’s working well. But sometimes crashed.

The crash issue is related to a lot of things (example: memory…). Please contact your distributor for support in this case
