HL7800 KHTTPPOST, NO CARRIER, Syntax error?

Hi,

I’m really close to getting a successful HTTPS POST with the HL7800.

At the final step, I’m getting a NO CARRIER / KHTTP_ERROR: 1,6, which I understand means HTTP connection timeout. I suspect this is due to the way I construct the KHTTPPOST being wrong.

The full uri I’m posting to is https://api.sandbox.ewaypayments.com/DirectPayment.json.

Can you confirm how the post should be constructed?

I was thinking AT+KHTTPPOST=1,"/DirectPayment.json",1 however that doesn’t work for some reason.

Here’s the full AT output, thanks for your continued support, it’s been great so far!

AT
OK

ATI3
BHL7800.3.4.1.0.20190425
OK

AT+CMEE=1
OK

AT+CPIN?
+CPIN: READY
OK

AT+CGATT=0
OK
+KCNX_IND: 1,0,0

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
b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCB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vld1927jyNxF1WW6LZZm6zNTflMrY=-----END CERTIFICATE-----
local_cert,0,0
local_cert,1,0
local_cert,2,0
OK

AT+CCLK?
+CCLK: "19/12/05,17:27:26+44"
OK

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,1,0

AT+KHTTPCFG=1,"api.sandbox.ewaypayments.com",443,2,,,,,0
+KHTTPCFG: 3
OK
+KHTTP_IND: 3,1

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,,"api.sandbox.ewaypayments.com/DirectPayment.json",1
CONNECT

{"Customer":{"CardDetails":{"Name":"ROADLEY/TIM J.MR","Number":"4557025682354333","ExpiryMonth":"10","ExpiryYear":"20","CVN":null}},"Payment":{"TotalAmount":1000},"Method":"ProcessPayment","TransactionType":"MOTO"}
+++


NO CARRIER+KHTTP_IND: 1,1+KHTTP_ERROR: 1,6

+KHTTP_IND: 3,0

Hi,

You stored CA to module in your log file.
You need to store more Client certificate, client key to module. These certificates, keys are matched with api.sandbox.ewaypayments.com server.

You can try AT+KHTTPPOST=1, ,“/DirectPayment.json”,1" instead of AT+KHTTPPOST=1,“/DirectPayment.json”,1

1 Like

Hi Donald,

I got the publicly trusted root ca for api.sandbox.ewaypayments.com from ssltools.com.

For the client cert, I’m not sure how to go about getting it since the site uses basic authentication (not cert auth). Do you have any tips on this? I mean, how would you get it for this site?

Do I need to include the intermediate certificates?

There seems to be an extra " in that suggestion, did you mean:

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

Cheers

Hi,

The https://api.sandbox.ewaypayments.com/ side requires user, password to access it.
You need to fill login, password in +KHTTPCFG command
AT+KHTTPCFG=<cnx cnf>,<http_server>[,<http_port>[,<http_version>[,<login>[,<password>[,<start>[,<af>[,<cipher_index>]]]]]]]

→ No, you don’t. Only need trusted root CA.

 You can try AT+KHTTPPOST=1,,"/DirectPayment.json",1" instead of AT+KHTTPPOST=1,"/DirectPayment.json",1
AT+KHTTPPOST=<session_id>,<local_uri>,<request_uri>[,<show_resp>]
<local_uri> This argument must be empty. It is reserved for compatibility of command syntax

Hi Donald,

The specific HTTPS POST I’m trying to get working is as per https://eway.io/api-v3/?shell#direct-connection

The authentication is basic
The username is 60CF3Ce97nRS1Z1Wp5m9kMmzHHEh8Rkuj31QCtVxjPWGYA9FymyqsK0Enm1P6mHJf0THbR
The password is API-P4ss

I tried your suggestion with this:

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

…however I suspect there’s an extra " in there preventing it from working

I also tried this:

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

…however that didn’t work either.

Here’s the full AT log, which uses a http header for authentication, which is a base64 encoded Authorization: Basic NjBDRjNDZTk3blJTMVoxV3A1bTlrTW16SEhFaDhSa3VqMzFRQ3RWeGpQV0dZQTlGeW15cXNLMEVubTFQNm1ISmYwVEhiUjpBUEktUDRzcw==

Thanks for your persistence, I think we’re really close here!!!

AT
OK

ATI3
BHL7800.3.4.1.0.20190425
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

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9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV5uNu5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY1Yl9PMWLSn/pvtsrF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4NeF22d+mQrvHRAiGfzZ0JFrabA0UWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NGFdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBHQRFXGU7Aj64GxJUTFy8bJZ918rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/iyK5S9kJRaTepLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTflMrY=-----END CERTIFICATE-----
local_cert,0,0
local_cert,1,0
local_cert,2,0
OK

AT+CCLK?
+CCLK: "19/12/11,18:09:26+44"
OK

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,1,0

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

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
CONNECT

{"Customer":{"CardDetails":{"Name":"ROADLEY/TIM J.MR","Number":"4557025682354333","ExpiryMonth":"10","ExpiryYear":"20","CVN":null}},"Payment":{"TotalAmount":1000},"Method":"ProcessPayment","TransactionType":"MOTO"}
+++


NO CARRIER+KHTTP_IND: 1,1+KHTTP_ERROR: 1,6

+KHTTP_IND: 2,0

Hi timroadley,

If you want to perform HTTPS POST to https://api.sandbox.ewaypayments.com server
It is out of order for me. Please contact eway support for server support.

Hi Donald,

Hmm that’s odd, it works with Postman. Perhaps it was a temporary issue that’s ok now, can you retry?

Cheers

Hi,

It is same result at my side.

just to connect the dots, I think a reply to a post started a new thread for this topic.

Here is that new topic : https://forum.sierrawireless.com/t/re-hl7800-khttppost-no-carrier-syntax-error/18661/9