HTTPS Sample Problems

I am trying to use the HTTPS_Client example but I am struggling to get it working. It returns 200 unmodified, which makes me think everything is working in terms of the board and sim set up. When I modify it, it no longer works. Specifically, I am trying to reach a server I am hosting locally and tunneling to the web using the service Ngrok. 

I am changing the HTTPS Hostname, and the certificate to match the one the Ngrok link needs. But when I send a push request, I get the following output:

+CEREG: 5,"2D51","02D26916",7,,,"00001010","11000001"
Network connectivity established and IP address assigned
Looking up 684742f5075a.ngrok-free.app
Resolved 13.57.100.232 (AF_INET)
Connecting to 684742f5075a.ngrok-free.app:443
Sent 77 bytes
Received 0 bytes
Finished, closing socket.

Ngrok gives no indication it received anything and does not forward anything to my local server


Below are all the modifications to the HTTPS client sample I made:
In Kconfig:
changed HTTPS_HOSTNAME to:
string "HTTPS hostname"
default "684742f5075a.ngrok-free.app"

In main
modified certificate:
static const char cert[] =
 #include "ngrokcert.pem.inc"


In CMakeLists.txt:
Changed the name of the certificate file to match
generate_inc_file_for_target(
app
cert/ngrokcert.pem
${gen_dir}/ngrokcert.pem.inc


Parents Reply Children
Related