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
  • rupcar said:
    Here is the modem trace recording with the original code. Let me know if I did smoething wrong during it.

    Thanks a lot, Carole! Trace is looking good :-)

    And now I finally have an explanation for what is happening. The carrier is sending a detach request right after the nRF9160 modem has connected to a cell: 

    This leads to a disconnect event from the network before the DNS lookup can be completed.

    07:26:11.521821 M4 TRACE_GROUP_UNASSIGNED L23_AT_STRING AT_STRING <= +CEREG: 2,"0065","01052508",7\r\n
    07:26:11.601136 M4 TRACE_GROUP_UNASSIGNED L23_AT_STRING AT_STRING <= +CSCON: 1\r\n
    07:26:15.068757 M4 TRACE_GROUP_UNASSIGNED L23_AT_STRING AT_STRING <= +CEREG: 5,"0065","01052508",7,,,"11100000","11100000"\r\n
    07:26:15.105896 M4 TRACE_GROUP_UNASSIGNED SOCKET_RPC_GETADDRINFO_REQ_MSG flags = 0, family = 1, socktype = 1, protocol = 6,  hostname_len = 11, PDN ID = 255
    07:26:15.134736 M4 TRACE_GROUP_UNASSIGNED L23_AT_STRING AT_STRING <= +CEREG: 2,"0065","01052508",7\r\n
    07:26:16.474000 M4 TRACE_GROUP_UNASSIGNED L23_AT_STRING AT_STRING <= +CSCON: 0\r\n
    07:26:16.575043 M4 TRACE_GROUP_UNASSIGNED L23_AT_STRING AT_STRING <= +CEREG: 2\r\n
    07:26:18.856446 M4 TRACE_GROUP_UNASSIGNED SOCKET_RPC_GETADDRINFO_RES_MSG err_code = 16

    The reason for the detach is: 

    Which according to 3GPP TS 24.301 Annex A. means: 

    Cause #15 – No suitable cells in tracking area 
    This EMM cause is sent to the UE if it requests service, or if the network initiates a detach request, in
    a tracking area where the UE, by subscription, is not allowed to operate, but when it should find
    another allowed tracking area or location area in the same PLMN or an equivalent PLMN. 

    In other words, you need to talk to Twilio and check with them why the UE isn’t allowed to remain connected. 

    Cheers, 

    Markus 

Reply
  • rupcar said:
    Here is the modem trace recording with the original code. Let me know if I did smoething wrong during it.

    Thanks a lot, Carole! Trace is looking good :-)

    And now I finally have an explanation for what is happening. The carrier is sending a detach request right after the nRF9160 modem has connected to a cell: 

    This leads to a disconnect event from the network before the DNS lookup can be completed.

    07:26:11.521821 M4 TRACE_GROUP_UNASSIGNED L23_AT_STRING AT_STRING <= +CEREG: 2,"0065","01052508",7\r\n
    07:26:11.601136 M4 TRACE_GROUP_UNASSIGNED L23_AT_STRING AT_STRING <= +CSCON: 1\r\n
    07:26:15.068757 M4 TRACE_GROUP_UNASSIGNED L23_AT_STRING AT_STRING <= +CEREG: 5,"0065","01052508",7,,,"11100000","11100000"\r\n
    07:26:15.105896 M4 TRACE_GROUP_UNASSIGNED SOCKET_RPC_GETADDRINFO_REQ_MSG flags = 0, family = 1, socktype = 1, protocol = 6,  hostname_len = 11, PDN ID = 255
    07:26:15.134736 M4 TRACE_GROUP_UNASSIGNED L23_AT_STRING AT_STRING <= +CEREG: 2,"0065","01052508",7\r\n
    07:26:16.474000 M4 TRACE_GROUP_UNASSIGNED L23_AT_STRING AT_STRING <= +CSCON: 0\r\n
    07:26:16.575043 M4 TRACE_GROUP_UNASSIGNED L23_AT_STRING AT_STRING <= +CEREG: 2\r\n
    07:26:18.856446 M4 TRACE_GROUP_UNASSIGNED SOCKET_RPC_GETADDRINFO_RES_MSG err_code = 16

    The reason for the detach is: 

    Which according to 3GPP TS 24.301 Annex A. means: 

    Cause #15 – No suitable cells in tracking area 
    This EMM cause is sent to the UE if it requests service, or if the network initiates a detach request, in
    a tracking area where the UE, by subscription, is not allowed to operate, but when it should find
    another allowed tracking area or location area in the same PLMN or an equivalent PLMN. 

    In other words, you need to talk to Twilio and check with them why the UE isn’t allowed to remain connected. 

    Cheers, 

    Markus 

Children
Related