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

Communicate between two nfr52dk devices via IPv6

Hello,

Setup: Running Ubuntu 18.04 inside Windows Host (using VMWare).

Device: nrf52840DK

Operating System (used for development): RIOT

I would like to communicate between two nrf52dk devices. I would like to use IPv6 for the same.

I am able to get the IP addresses using ifconfig command, once I successfully flash the board.

Note: The IP addresses cannot be PINGed. I get an invalid argument error when I PING the IP from the Ubuntu terminal.

ipaddr command in the J-Link says that "the device doesn't support ethernet". (Same error in Windows as well)

Experiment:

I have 2 nrf52dk devices.

I flashed both of them with different codes.
First with code which would receive UDP packets (Left terminal in the image below).The line highlighted yellow outputs that server was started.

Second with the code which would send UDP packets (Right terminal in the image below). Logs clearly show that the device is sent the UDP packets successfully. But, at the same time, I should be receiving the packets. But clearly, the image (left terminal in the image) shows that I did not receive them.

Note: The code works just fine. It has been tested on virtual nodes. Correct execution should look something like the following image. (Please compare the left terminals in both images).

Thank you.

Parents
  • Hello,

    Sorry. Is this OpenThread? Is it one of our example applications? Just not sure exactly what I am looking at here. Could you please specify?

    Thank you!

    Best regards,

    Edvin

  • No, the network stack is GNRC, default one present in RIOT OS. 

    This is something which I wrote. But, the code is not the issue. I tried using Tutorial tasks from RIOT OS, even they did not work.

    The issue here is that I am not able to communicate between 2 nrf52dk devices. The examples/screenshots are just a reference. 

    Please discard example from the problem, if they are confusing you. Please help me identify a way how can I communicate between the two devices using a local IP address. That's it.

    Thanks

  • The Nordic nRF52840 does not support Ethernet. There are some ways of connecting the nRFs to the internet, but I am only familiar with our IOT examples from our SDK, and the Thread or Zigbee examples from our Thread SDK. Maybe you want to take a look at those.

    The radio on the nRF is not Wifi compatible. Only BLE and 802.15.4, so you need a gateway that supports one of these, and some internet connectivity (WiFi or Ethernet) to act as a bridge between the nRFs and the IP protocol.

    Best regards,

    Edvin

  • So, what kind of gateway support are we talking about for '802.15.4'?

    For BLE, I found the following article (did not work for me though):

    https://devzone.nordicsemi.com/b/blog/posts/setting-up-ipv6-over-ble-using-nrf52-series-and-ri

    And is this not ideal for what I am doing. I need to have minimal networking stack (in this case it would be BLE + networking stack.).

    Also, in the picture below:

    The device logs the IPv6 addresses (generated by "ifconfig" command). Are these dummy IPs or something else? Because I am not able to ping these addresses. I receive an "invalid argument" error when I try to do so. Thanks.

Reply
  • So, what kind of gateway support are we talking about for '802.15.4'?

    For BLE, I found the following article (did not work for me though):

    https://devzone.nordicsemi.com/b/blog/posts/setting-up-ipv6-over-ble-using-nrf52-series-and-ri

    And is this not ideal for what I am doing. I need to have minimal networking stack (in this case it would be BLE + networking stack.).

    Also, in the picture below:

    The device logs the IPv6 addresses (generated by "ifconfig" command). Are these dummy IPs or something else? Because I am not able to ping these addresses. I receive an "invalid argument" error when I try to do so. Thanks.

Children
  • I don't know what RIOT lists. It is not something we are familiar with. The blog post that you refer to isn't written by us. 

    What did you flash the nRF boards with?

    If you want to use 802.15.4, we have the Thread and Zigbee SDKs. I wouldn't classify these as a minimal networking stack, though.

    The other examples that we have are in the normal SDK (link in previous reply).

    Here is a general guide on how to set up 6LoWPAN:

    http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fiot_getting_started.html

    There are some "how to" guides to get started in the bottom of the examples. Here is the example for CoAP:

    http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fiot_sdk_app_coap_server.html&anchor=iot_sdk_app_coap_server_test

    BR,

    Edvin

  • I flashed a code which I wrote (for RIOT OS) for a handshake between client and server.

    Sorry, this may be repetitive, but I feel I do not have a clear answer.

    "is there a way to communicate between the two nRF52DK devices without using BLE or any other extra layers in between"?

    If not, is it because nRF52DK does not support ethernet?

    Note: I do not wish to be connected to the internet, I just need an IP address and I would like to communicate via that.

    Thank you.

  • The protocols that are supported on the nRF52840 chip is BLE, 802.15.4, or you can use the radio in proprietary mode (check out the SDK\examples\proprietary_rf\esb_[rx/tx], which uses the raw radio module. However, I am not sure if you would be able to communicate with a computer with this protocol.

    I assume that you are not interrested in Thread or Zigbee, since you don't want any other extra layers in between.

    If you want to ping the devices, you must give them an IP address. You can do this by following the guides that I have linked.

    assume that RIOT is the part that you have flashed on the DKs. Sorry for being repetative, but I am not familiar with it. If so, I suggest that you check with the guys who wrote RIOT, or at least the nRF port for RIOT, if you want to know how to use it with the nRF.

    Best regards,

    Edvin

  • You can do this by following the guides that I have linked.

    Which link are you referring to here?

    And Sure, I will contact RIOT, if they can suggest a way.

    Thanks.

  • This one, and this one.

    These are (some of) the guides for our IoT SDK.

    Best regards,

    Edvin