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

9160DK: http_client sample connect() failed with error 60

Hi Support Team

     I try to run the http_client sample based on ncs1.2.0,  and I use the following configs because only NB-Iot available in our location: 

     

     when start running the sample, the terminal prints as:

     

     I try to find solutions from devzone; and find this tickets: 

https://devzone.nordicsemi.com/f/nordic-q-a/58556/basic-http-get-example/237525#237525, according to the suggestions in the ticket, I try to use "216.58.208.174" replace "google.com" but it didn't work(  I think it's not the root cause for my case, for my getaddinfo() is always ok   ); I also tested the mqtt_simple demo, whether use the defalut code directly or add the configure 'CONFIG_MQTT_BROKER_HOSTNAME="137.135.83.217"', the sample can runs well...

     So I still have no idea to deal with the "connect error 60" of the http_client sample. Can you give some suggestions?

    

BR

Smile

   

Parents
  • Hi!

    As Håkon states in the ticket you linked to: 

    The behavior you see is highly likely inherited from the network that you are connecting to.

    Have you tested if TCP works at all in your current network?

    Did you try mqtt_simple, where you set the IP manually in prj.conf? mqtt.eclipse.org currently resolves to 137.135.83.217, so that would be:

    CONFIG_MQTT_BROKER_HOSTNAME="137.135.83.217"

     

    If that fails, try an UDP based sample, like this one (change define NTP_HOST to 129.240.2.6):

    https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/ntp/src/main.c

    Did you do this? 

    Best regards,

    Heidi

Reply
  • Hi!

    As Håkon states in the ticket you linked to: 

    The behavior you see is highly likely inherited from the network that you are connecting to.

    Have you tested if TCP works at all in your current network?

    Did you try mqtt_simple, where you set the IP manually in prj.conf? mqtt.eclipse.org currently resolves to 137.135.83.217, so that would be:

    CONFIG_MQTT_BROKER_HOSTNAME="137.135.83.217"

     

    If that fails, try an UDP based sample, like this one (change define NTP_HOST to 129.240.2.6):

    https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/ntp/src/main.c

    Did you do this? 

    Best regards,

    Heidi

Children
No Data