http_client network error on thingy91

Hello,

I am trying to use http requests on Thingy91 and therefore I tried with the sample from zephyr/samples/net/sockets/http_client.

I can build the project without any problem but when I try to run it, I get the following error when I open a putty terminal:

I did not change anything in the code, and I was supposing it was not a network problem since I activated my SIM card and I can run the asset_tracker and see the data in nrFcloud without any issue.

I am using the nrfConnectSDK 2.0.0, and the SIM is from twilio.

Best regards,

C

Parents
  • Hello Carole,

    rupcar said:

    I also tried with a new Thingy and a new SIM, but it did not change much, the "getAddrInfo() failed" appears half of the time again.

    Do you have any ideas what I could try ?

    Which SIM card(s) are you using and who is the provider?  

    The first thing I would check is that there are no issues with the network connection. A good approach to do that with is by running the AT Client again with the commands I have provided. 

    Regards, 

    Markus 

Reply
  • Hello Carole,

    rupcar said:

    I also tried with a new Thingy and a new SIM, but it did not change much, the "getAddrInfo() failed" appears half of the time again.

    Do you have any ideas what I could try ?

    Which SIM card(s) are you using and who is the provider?  

    The first thing I would check is that there are no issues with the network connection. A good approach to do that with is by running the AT Client again with the commands I have provided. 

    Regards, 

    Markus 

Children
  • Hi,

    Thank you for the quick answer.

    I am using Super SIM cards from Twilio.

    Here is the log I get when running the AT Commands:

    2022-07-27T12:12:14.652Z INFO Modem port is opened
    2022-07-27T12:12:14.662Z DEBUG modem >> AT+CFUN?
    2022-07-27T12:12:14.701Z DEBUG modem << +CFUN: 0
    2022-07-27T12:12:14.703Z DEBUG modem << OK
    2022-07-27T12:12:21.835Z DEBUG modem >> AT+CGMR
    2022-07-27T12:12:21.848Z DEBUG modem << mfw_nrf9160_1.3.2
    2022-07-27T12:12:21.850Z DEBUG modem << OK
    2022-07-27T12:12:34.840Z DEBUG modem >> AT%MDMEV=1
    2022-07-27T12:12:34.853Z DEBUG modem << OK
    2022-07-27T12:12:58.399Z DEBUG modem >> AT%XMODEMSLEEP=1,1000,60000
    2022-07-27T12:12:58.414Z DEBUG modem << %XMODEMSLEEP: 4
    2022-07-27T12:12:58.415Z DEBUG modem << OK
    2022-07-27T12:13:09.308Z DEBUG modem >> AT+CEREG=5
    2022-07-27T12:13:09.324Z DEBUG modem << OK
    2022-07-27T12:13:20.401Z DEBUG modem >> AT%CESQ=1
    2022-07-27T12:13:20.413Z DEBUG modem << OK
    2022-07-27T12:13:27.342Z DEBUG modem >> AT%XSYSTEMMODE?
    2022-07-27T12:13:27.357Z DEBUG modem << %XSYSTEMMODE: 1,0,0,0
    2022-07-27T12:13:27.360Z DEBUG modem << OK
    2022-07-27T12:13:34.503Z DEBUG modem >> AT+CFUN=1
    2022-07-27T12:13:34.545Z DEBUG modem << %XMODEMSLEEP: 4,0
    2022-07-27T12:13:34.547Z DEBUG modem << OK
    2022-07-27T12:13:36.209Z DEBUG modem << %CESQ: 53,2,19,2
    2022-07-27T12:13:36.221Z DEBUG modem << +CEREG: 2,"0065","01052508",7
    2022-07-27T12:13:36.312Z DEBUG modem << %CESQ: 48,2,20,2
    2022-07-27T12:13:40.116Z DEBUG modem << %CESQ: 50,2,25,3
    2022-07-27T12:13:43.102Z DEBUG modem << %MDMEV: SEARCH STATUS 2
    2022-07-27T12:13:43.107Z DEBUG modem << +CEREG: 5,"0065","01052508",7,,,"11100000","11100000"
    2022-07-27T12:13:43.115Z DEBUG modem >> AT+COPS=3,2
    2022-07-27T12:13:43.120Z DEBUG modem << OK
    2022-07-27T12:13:43.124Z DEBUG modem >> AT+COPS?
    2022-07-27T12:13:43.130Z DEBUG modem << +COPS: 0,2,"22801",7
    2022-07-27T12:13:43.132Z DEBUG modem << OK
    2022-07-27T12:13:43.143Z DEBUG modem >> AT%XCBAND
    2022-07-27T12:13:43.148Z DEBUG modem << %XCBAND: 20
    2022-07-27T12:13:43.153Z DEBUG modem << OK
    2022-07-27T12:13:43.159Z DEBUG modem >> AT+CGDCONT?
    2022-07-27T12:13:43.169Z DEBUG modem << +CGDCONT: 0,"IP","super","100.66.24.129",0,0
    2022-07-27T12:13:43.172Z DEBUG modem << OK
    2022-07-27T12:13:43.178Z DEBUG modem >> AT+CGACT?
    2022-07-27T12:13:43.188Z DEBUG modem << +CGACT: 0,1
    2022-07-27T12:13:43.190Z DEBUG modem << OK
    2022-07-27T12:13:43.936Z DEBUG modem << +CEREG: 0
    2022-07-27T12:13:44.762Z DEBUG modem << +CEREG: 2,"0065","01052508",7
    2022-07-27T12:13:45.236Z DEBUG modem << %CESQ: 255,0,255,0
    2022-07-27T12:13:48.621Z DEBUG modem << %CESQ: 49,2,17,2
    2022-07-27T12:13:48.722Z DEBUG modem << %CESQ: 47,2,22,3
    2022-07-27T12:13:52.386Z DEBUG modem << +CEREG: 5,"0065","01052508",7,,,"11100000","11100000"
    2022-07-27T12:13:52.393Z DEBUG modem >> AT+COPS=3,2
    2022-07-27T12:13:52.397Z DEBUG modem << OK
    2022-07-27T12:13:52.401Z DEBUG modem >> AT+COPS?
    2022-07-27T12:13:52.407Z DEBUG modem << +COPS: 0,2,"22801",7
    2022-07-27T12:13:52.409Z DEBUG modem << OK
    2022-07-27T12:13:52.415Z DEBUG modem >> AT%XCBAND
    2022-07-27T12:13:52.423Z DEBUG modem << %XCBAND: 20
    2022-07-27T12:13:52.424Z DEBUG modem << OK
    2022-07-27T12:13:52.430Z DEBUG modem >> AT+CGDCONT?
    2022-07-27T12:13:52.440Z DEBUG modem << +CGDCONT: 0,"IP","super","100.66.38.61",0,0
    2022-07-27T12:13:52.443Z DEBUG modem << OK
    2022-07-27T12:13:52.452Z DEBUG modem >> AT+CGACT?
    2022-07-27T12:13:52.457Z DEBUG modem << +CGACT: 0,1
    2022-07-27T12:13:52.459Z DEBUG modem << 
    2022-07-27T12:13:52.460Z DEBUG modem << OK
    2022-07-27T12:13:52.463Z DEBUG modem << +CEREG: 2,"0065","01052508",7
    2022-07-27T12:13:53.901Z DEBUG modem << %CESQ: 255,0,255,0
    2022-07-27T12:13:53.906Z DEBUG modem << +CEREG: 2
    2022-07-27T12:13:56.141Z DEBUG modem << %CESQ: 51,2,19,2
    2022-07-27T12:14:00.958Z DEBUG modem << %CESQ: 51,2,24,3
    

    I am not sure I understand what to deduce from there ?
    Thank you again!

Related