HTTPS POST not working in SLM

(For some reason, I use "...' replace the original string)
Here is the log for using AT to do HTTPS POST:


2022-02-07T12:19:39.057Z DEBUG modem >> AT#XHTTPCCON=1,"...",443
2022-02-07T12:19:40.057Z ERROR Error: 'AT#XHTTPCCON=1,"...",443
' timed out
2022-02-07T12:19:40.591Z DEBUG modem << #XHTTPCCON: 1
2022-02-07T12:19:40.594Z DEBUG modem << OK
2022-02-07T12:19:46.614Z DEBUG modem >> AT#XHTTPCREQ="POST","...","Content-Type: application/json
2022-02-07T12:19:46.640Z DEBUG modem >> Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6eyJ1aWQiOjU3OCwiY29kZSI6ImVlNjNmZWI2LTA0YzMtNDM5Ni04OWI2LWExZDhjNzZhZDE0MSJ9LCJpc3MiOiJKSEhfVVNFUlMiLCJleHAiOjE2NDQyOTgwODAsInZlciI6MSwianRpIjoxODM4OX0.9uqBfMutUGyBaPIEwiP7AscgVMvUZwKSC9lqfAnDcEg
2022-02-07T12:19:46.674Z DEBUG modem >> Content-Length: 279
2022-02-07T12:19:46.707Z DEBUG modem >> ",279
2022-02-07T12:19:46.729Z DEBUG modem << OK
2022-02-07T12:19:46.731Z DEBUG modem << #XHTTPCREQ: 1
2022-02-07T12:19:56.042Z DEBUG modem >> {"meta":{...},"data":[...]}
2022-02-07T12:19:56.069Z DEBUG modem << ERROR
2022-02-07T12:19:56.072Z ERROR Error:{"meta":{...},"data":[...]}
failed
2022-02-07T12:19:56.092Z DEBUG modem << #XHTTPCREQ: 0
2022-02-07T12:19:56.111Z DEBUG modem << #XHTTPCREQ: -104
2022-02-07T12:19:56.113Z DEBUG modem << ERROR
2022-02-07T12:19:56.118Z DEBUG modem << #XDATAMODE: 0
2022-02-07T12:19:56.119Z DEBUG modem << #XHTTPCCON: 0
2022-02-07T12:20:05.708Z DEBUG modem << %CESQ: 27,1,3,0

Is this normal that the modem still return "OK" regardless of the 'timed out' .
What happen to the "XHTTPCREQ: -104" after payload send?

Thanks

Parents
  • Hi,

     

    When you're issuing this:

    AT#XHTTPCCON=1,"...",443

    It assumes that it is a http connection to a https service.

     

    Once you send something that isn't considered https, the server closes the connection, and therefore you get the error on the next command.

     

    If you want to run https connection, you will have to provide a sec_tag to the initial connection. You shall place your CA root for your domain in this sec_tag.

     

    Kind regards,

    Håkon

  • I apply our CA to certificate manager, but still CANNOT create connection.

    AT#XHTTPCCON=1,"gateway.dev.jawbonehealth.com",443,5568
    #XHTTPCCON: 0
    ERROR

    Both the example.com and goole.com were connected with it's CA.

    AT#XHTTPCCON=1,"example.com",443,1234
    %CESQ: 20,1,3,0
    #XHTTPCCON: 1
    OK


    AT#XHTTPCCON=1,"google.com",443,1235
    #XHTTPCCON: 1
    OK


    Is there any log option can debug further?

Reply
  • I apply our CA to certificate manager, but still CANNOT create connection.

    AT#XHTTPCCON=1,"gateway.dev.jawbonehealth.com",443,5568
    #XHTTPCCON: 0
    ERROR

    Both the example.com and goole.com were connected with it's CA.

    AT#XHTTPCCON=1,"example.com",443,1234
    %CESQ: 20,1,3,0
    #XHTTPCCON: 1
    OK


    AT#XHTTPCCON=1,"google.com",443,1235
    #XHTTPCCON: 1
    OK


    Is there any log option can debug further?

Children
Related