KHTTPS_ERROR: 0, 5 on HL6528G

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
    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?

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

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