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

upload http_client

hello team,

I'm using nRF CONNECT 3.3.0, SEGGER Embedded studio IDE with Cmake version 3.16.5 and SDK

my device (nRF9160DK) is connected with system but SEGGER Embedded give me that error

other hand I tried with nRF connect so I'm sure that what step to upload and run the program but

I tried to upload http_client example so get something like that log error

Can someone help me out what are the step to use nRF connect to upload and get output on terminal windows

Parents
  • hello Nordic DevZone

    I'm stilling facing the same issue, I'm trying with 3 4 url to get some results but all time the result s same as here in image.

    as per I got two different example and I tried both of them  and the link are here >  example1    example2

    one more thing I want to know that do we have length limits of url because when I used a long url to get JSON its reboot device ?

    So please help me out

  • can someone help me out  ????

  • Hi Shekhar,

    Let us focus on one sample at the time and try to make that work.

    The HTTPS client sample from the official NCS repo.

    It's hard to say what the exact issue is without more information.

    • What changes have you done to the default sample?

    This is the output from running the default sample:

  • hey thank for you time
     tell me some other way to get this because in this we need ROOT_CA certificate right ?? an I don't think so this is ideal ans some security issue

    One more thing I want to know that do we have length limits of URL because when I used a long URL (100+ char) to get JSON its reboot device ? 

Reply
  • hey thank for you time
     tell me some other way to get this because in this we need ROOT_CA certificate right ?? an I don't think so this is ideal ans some security issue

    One more thing I want to know that do we have length limits of URL because when I used a long URL (100+ char) to get JSON its reboot device ? 

Children
  • It depends on what you want to achieve. e.g Default sample connects to www.google.com which needs a X.509 certificate provided in the samples/nrf9160/https_client/cert folder.

    Connect to your own server, what type of server?
    --> 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.

    Then you can put the certificate in PEM format as instructed in the doc.

    The certificate is provisioned in the cert_provision() function


    Where do you put this "URL"? Please provide more details to help me understand the issue.

  • Que1) is that necessary to give any certificate for HTTPS connection by nRF9160 ?

    Is there any option with out certificate and fingerprints may be ??

    Que2) if I used this URL the device rebooting again and again it not even enter in main()

  • Q1: For HTTPS it is.

    It does sound like you want to connect just to a server using HTTP?
    Are you aware of the difference between HTTP and HTTPS?
    You could use regular HTTP if you do not want to use certificates for security.

    Q2: This is most likely caused by something else. Cannot say without any serial logs etc. Try to enable debug logs from the necessary modules.
    note that for the https sample you would also need to change the hostname another place in the code as well.


  • hey

    I want get and post some JSON data on a server by http protocol with is secure but I'm getting this error

  • Try to set none to the verification.

    Please share the full code so I could try to reproduce the issue.
    (We can make this case private if there is sensitive information)