This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

https client connection problem

Hi , 

I am using nrf connect 1.2.0 dk. I am now testing the https client example. 

However, I always get the connection fail error as belows. 

Provisioning certificate


Waiting for network.. OK


Connecting to google.com


connect() failed, err: 45

"To connect to other servers, you might need to provision a different certificate. You can download a certificate for a given server using your web browser. Alternatively, you can obtain it from a dedicated website like SSL Labs."

According to the instruction, I download a certificate from the https://www.ssllabs.com/ssltest/

I submitted a query of "google.com" in that website and download a pem. 

I also add back those double quotation and newline character to the pem. However, the results are same. 

Besides, I also change the NBIOT without epco setting in the configuration which is workable in other example .

My questions is:

How can I get a correct certificate?

How can I download directly via web browser?

Thank you.

Regards, 

Chapman

Parents Reply
  • The problem seems to be related to the network.

    Your trace shows that the connection gets reset during the TLS handshake, which in turn causes the connect to fail.

    When looking further into the trace, I find several lines where the modem reports "No PLMN action allowed".

    Can you try to read out the certificate that is written to the modem?

    The AT command would be: AT%CMNG=2,42,0

    Edit: Note that the modem must be disabled (CFUN=4) when sending the command

    The output should match the CA certificate of google.com. If it does not, that would explain the error.

    What SIM card are you using?

    Are you using the same network (NB-IoT, and legacy PCO) and SIM card when running the asset_tracker sample?

    Could you take a modem trace of that as well for me to compare?

Children
Related