Help with CoAP Client Sample on nRF9160 DK Using Jio NB-IoT SIM

Hi Nordic team,

I'm using the nRF9160 DK with nRF Connect SDK v2.9.1, and trying to run the coap_client sample to send a GET request to the public CoAP test server at coap.me (IP: 134.102.218.18), targeting the resource path /hello.

I'm using a Jio NB-IoT SIM for LTE connectivity.

I’ve configured the sample as follows:

Enabled CONFIG_COAP_CLIENT=y

Set CONFIG_COAP_SERVER_HOSTNAME="coap.me"

Set CONFIG_COAP_SERVER_PORT=5683

Enabled CONFIG_LTE_LINK_CONTROL=y and CONFIG_LTE_AUTO_INIT_AND_CONNECT=n

Using conn_mgr to establish the LTE connection before sending the CoAP request

I would like to ask:

Is there anything specific I need to change to get communication working with a CoAP server like coap.me?

Has anyone successfully used NB-IoT (especially with Jio SIM) to send CoAP requests over UDP?

Are there any known limitations or additional requirements for using NB-IoT for CoAP communication?

Thanks and regards,
Arun

  • From what I understand, the nRF9151 is fully compatible with the nrf9160dk_nrf9160_ns build target, and no changes to the configuration are required for this sample. Please correct me if I'm wrong.

    You're wrong. The upwards compatibility is AFAIK only about the AT cmds.

    Anyway, though zephyr is not only about the mcu or modem, it's about the board with the periphery, you should always use the specific board to build.  

  • That’s why I suspect the issue may be that Jio’s NB-IoT network allows DNS (UDP port 53), but blocks CoAP (UDP port 5683) or general UDP traffic to public servers.

    Blocking UDP port is quite uncommon.

    There may be a lot of reasons, therefore the modem trace or capture.

    From the board conf.

    # Disable Duplicate Address Detection (DAD)
    # due to not being properly implemented for offloaded interfaces.
    CONFIG_NET_IPV6_NBR_CACHE=n
    CONFIG_NET_IPV6_MLD=n

    Not sure, if your SIM uses IPv6 instead of IPv4. There are several pretty nasty consequences, as that comment already points to. Here in Europe quite a lot is only supporting IPv4 and so are also many samples only support IPv4. Even if it turns out, that it is related to IPv6, I will not be of too much help, because my SIMs gets only IPv4 ;-). But then maybe someone from Nordic jumps in.  

Related