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
  • trace-2025-09-23T15-37-37.545Z.mtrace
    Here is the trace!

    This time I did not have the port even open, (previously ever time I've run the sample I have my server running and being tunneled with ngrok, this time I did not have that set up) But despite that it gave the exact same output. 

    Is it possible it has something to do with some firewalls somewhere? It's not a normal computer so maybe it's getting blocked from going through. I've used ngrok with different cellular modules and it has worked, namely the SIM7000G, so I've been assuming that is not the issue.

Children
Related