# KHTTPS\_ERROR: 0, 5 on HL6528G

**URL:** <https://forum.sierrawireless.com/t/khttps-error-0-5-on-hl6528g/8688>\
**Category:** Legacy HL Series\
**Created:** [July 26, 2016, 8:12pm UTC](https://forum.sierrawireless.com/t/khttps-error-0-5-on-hl6528g/8688 "2016-07-26T20:12:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![orlandopetrone](https://avatars.discourse-cdn.com/v4/letter/o/3e96dc/32.png) [@orlandopetrone](https://forum.sierrawireless.com/u/orlandopetrone)\
**Post date:** [July 26, 2016, 8:12pm UTC](https://forum.sierrawireless.com/t/khttps-error-0-5-on-hl6528g/8688/1 "2016-07-26T20:12:59Z")

</div>

I’m trying to do post with HL6528G. I get the correct answer 60% of the time, the other time I receive KHTTPS\_ERROR: 0, 5  
which means “HTTP connection error due to internal trouble”. The posts are made every 30 s and the signal quality is always good.

I tried to execute the post with the following commands:

1. AT+KHTTPSHEADER=0  
the answer is CONNECT
2. then I send the following data:  
Content-Type: application/json  
token: 20736A100633STL  
Content-Length: 123  
–EOF–Pattern–  
the answer is:  
OK
3. AT+KHTTPSPOST=0,“[https://elb-esocialbike-demo-2118703486.eu-west-1.elb.amazonaws.com/eBikeRESTDiagnostic20/rest/tracker/updateStatus](https://elb-esocialbike-demo-2118703486.eu-west-1.elb.amazonaws.com/eBikeRESTDiagnostic20/rest/tracker/updateStatus)”  
the answer is CONNECT
4. then I send the post message followed by --EOF–Pattern–

the answer can be correct or KHTTPS\_ERROR: 0, 5.

Could you explain me why I get the internal trouble error randomically?

---

<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 10, 2016, 5:20am UTC](https://forum.sierrawireless.com/t/khttps-error-0-5-on-hl6528g/8688/2 "2016-08-10T05:20:27Z")

</div>

Hi,  
could you please share your complete AT command? Also we have to analyse spy trace to know the exact cause of this internal error.

-Alex

---

<div class="post-metadata">

**Author:** ![orlandopetrone](https://avatars.discourse-cdn.com/v4/letter/o/3e96dc/32.png) [@orlandopetrone](https://forum.sierrawireless.com/u/orlandopetrone)\
**Post date:** [September 2, 2016, 2:38pm UTC](https://forum.sierrawireless.com/t/khttps-error-0-5-on-hl6528g/8688/3 "2016-09-02T14:38:14Z")

</div>

This is the complete list of the AT commands and response for the HTTP post we made.

------------\>A good one:

AT+KHTTPCFG=0, “46.51.176.136”,9999

+KHTTPCFG: 0

OK  
AT+KHTTPHEADER=0

CONNECT

Content-Type: application/json  
token: STLTRK001  
Content-Length: 43

–EOF–Pattern–

OK

AT+KHTTPPOST=0,"/eBikeRESTDiagnostic20/rest/tracker/updateStatus"

CONNECT

{“ts”:“1451692877”,“sn”:“18,1”,“alarm”:“1”}  
–EOF–Pattern–

HTTP/1.1 200 OK  
Server: nginx/1.6.3  
Date: Thu, 01 Sep 2016 12:31:11 GMT  
Content-Type: text/plain;charset=utf-8  
Content-Length: 1

------------\>A bad one:

AT+KHTTPCFG=0, “46.51.176.136”,9999

+KHTTPCFG: 0

OK

AT+KHTTPHEADER=0

CONNECT

Content-Type: application/json  
token: STLTRK001  
Content-Length: 43  
–EOF–Pattern–

OK

AT+KHTTPPOST=0,"/eBikeRESTDiagnostic20/rest/tracker/updateStatus"

+KHTTP\_ERROR : 0, 5
