Troubleshooting +CME ERROR: 921 during HTTPS POST on HL7800

Hi Support!

I’m trying to create a HTTPS POST to https://api.sandbox.ewaypayments.com/ using a HL7800 chip with the latest firmware BHL7800.3.7.2.3.20191030.

I’m getting an +CME ERROR: 921 when I go to add the POST body, which means Error due to invalid state of bearer connection.

How can I resolve this issue? Thanks for your help!

AT logs below:

AT
OK

ATI3
BHL7800.3.7.2.3.20191030
OK

AT+CMEE=1
OK

AT+CPIN?
+CPIN: READY
OK

AT+CGATT=0
OK

AT+CREG?
+CREG: 0,0
OK

AT+CEREG?
+CEREG: 0,0
OK

AT&K3
OK

AT+KPATTERN="--EOF--Pattern--"
OK

AT+KCERTDELETE=0,0
OK

AT+KCERTDELETE=1,0
OK

AT+KCERTDELETE=1,1
OK

AT+KCERTDELETE=1,2
OK

AT+KPRIVKDELETE=0
OK

AT+KPRIVKDELETE=1
OK

AT+KPRIVKDELETE=2
OK

AT+KSSLCFG=0,3
OK

AT+KSSLCFG?
+KSSLCFG: 0,3
+KSSLCFG: 2,0
OK

AT+KCERTSTORE=0
CONNECT

-----BEGIN CERTIFICATE-----
MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH
MjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT
MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j
b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkqhkiG
9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI
2/Ou8jqJkTx65qsG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

AT+KCNXCFG=1,"GPRS","telstra.wap","",""
OK

AT+KCNXPROFILE=1
OK

AT+KSSLCRYPTO=0,9,3,25456,12,4,1
OK

AT+KCNXUP=1
OK
+KCNX_IND: 1,4,1
+KCNX_IND: 1,2,1,2,30

AT+KHTTPCFG=1,"api.sandbox.ewaypayments.com",443,2,,,,,0
+KHTTPCFG: 1
OK
+KCNX_IND: 1,4,1
+KCNX_IND: 1,2,1,2,30

AT+KHTTPHEADER=1
CONNECT

Host: api.sandbox.ewaypayments.com
Accept: */*
Accept-Encoding: gzip, deflate
Content-Type: application/json
Content-Length: 214
Connection: keep-alive
Authorization: Basic NjBDRjNDZTk3blJTMVoxV3A1bTlrTW16SEhFaDhSa3VqMzFRQ3RWeGpQV0dZQTlGeW15cXNLMEVubTFQNm1ISmYwVEhiUjpBUEktUDRzcw==

--EOF--Pattern--
OK
AT+KHTTPPOST=1,,"/DirectPayment.json",1
**+CME ERROR: 921**
**+KCNX_IND: 1,4,1**
**+KCNX_IND: 1,2,1,2,30**

Hi,

AT+CGATT=0

OK

AT+KCNXUP=1

OK

+KCNX_IND: 1,4,1

+KCNX_IND: 1,2,1,2,30

AT+KHTTPCFG=1,“api.sandbox.ewaypayments.com”,443,2,0

+KHTTPCFG: 1

OK

+KCNX_IND: 1,4,1

+KCNX_IND: 1,2,1,2,30

AT+KHTTPPOST=1,“/DirectPayment.json”,1

+CME ERROR: 921

+KCNX_IND: 1,4,1

+KCNX_IND: 1,2,1,2,30

The HL7800 cannot bring up PDP connection after network detachment in your log file. It has not supported this behavior. So you should remove AT +CGATT=0 command.

Here is result on my module:

AT+KHTTPPOST=1,,"/DirectPayment.json",1

+KHTTP_IND: 1,1

CONNECT

NO CARRIER

+KHTTP_ERROR: 1,6

Please find the log file for your reference.KHTTPPOST_api.sandbox.ewaypayments.com.txt (2.8 KB)

For issue NO CARRIER, +KHTTP_ERROR: 1,6 after KHTTPPOST with api.sandbox.ewaypayments.com server. It does not work for headers that may contain many fields. It can be limitation of the current firmware module. I hope new firmware release will be updated to fix the issue.

1 Like