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

Basic http get example

Hello,

We are working with the nrf 9160 dk.

We need to use internet connectivity to send an http get and post to a remote server.

We want to utilize the NB-IoT modem on the board. 

As it stands now, can get connected to the network but we cannot send a get or post to the remote server.

Kindly let us know if there is a configuration or a example code we can use to achieve this.

Thanks and regards

Parents Reply
  • Hi,

    smauelGIS said:
    Did you use CONFIG_LTE_NETWORK_MODE_NBIOT=y for the test with NB1?

    Yes, I tested with this config entry.

    smauelGIS said:
    It still hangs infact at getaddrinfo() procedure. we get an error code 60.

    This indicates that the network you're connected to does not provide a DNS service (getaddrinfo cannot resolve the hostname), or that its currently unavailable.

    You can manually resolve the hostname at your end, and input that as a string, like this "127.0.0.1".

     

    Kind regards,

    Håkon

Children
Related