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

Pinging between two nRF52 DK with Link-local ipv6 addresses

Hi everyone,

I am using nRF52 DK with 52832 on it. My current SDK version is 15.2.0. I know that for IoT applications there is external hardware needed as router like RPi. However, I thought to do that upon establishing BLE and IPSP connection with the help of local IPv6 addresses that obtained from MAC addresses I can ping with link-local manner. In theory, it seems to work well but I failed.  I have read similar questions about that topic but I would like to learn that is my idea work, in theory, and can be implemented? or Should I give up this idea?

Best regards,

Halil  

  • Hi, you can always use the link local address, fe80::. This is what is always negotiated during connection, and it's created from the device MAC address. To get a global address you must run a server that sends out router advertisement messages with the global prefix, for example "radvd".

    Please follow the user guide for setting up a RPi. https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/iot_ug_border_router.html?cp=6_1_5_5_0  You do not need to compile a new kernel, as stated in the user guide, because the newest Raspbian has everything that is needed. You can skip the part about "distributing a global IPv6 prefix" If you just want to use the link-local address.

  • Dear Stian,

    Thanks for the detailed answer. However, I asked to learn whether it is possible to send ping between two nRF52s after IPSP and LwIP connection. I aim not to use a router device like RPi sending ping will be between nRF52s without any external hardware.

  • Hi,

    Do you mean that the network connection between the nRF52 devices is a single, direct link, with no other network equipment involved at all?

    Or, that both nRF52 devices are connected to an external network, but the pinging happens from one nRF52 to the other?

    Or, something different?

    Regards,
    Terje

  • Hi,

    I meant a direct link without connection to an external network. I aimed TCP/IP communication between two nRF52 DKs after establishing a physical and link-layer connection and an IPSP connection. The communication will take place in the local network and on the direct link. I do not want the network to be visible to outside. The link-local IPv6 addresses obtained from MAC addresses of the devices will be used  (FE80::2). No need for router advertisement and solicitation. 

    Best regards,

    Halil

  • Hi,

    We are entering holiday season and key personnel from the IoT team have already started their vacation. That means I cannot verify my answers, but this is my understanding of the matter:

    The protocols used for providing network connectivity for the nRF52832, in the SDK, are intended for connecting the nRF52832 to a bigger network. The protocols are asymmetric, most notably because the BLE connection (over which the network connection is made) is asymmetric. (In a BLE connection, one end is Central and the other end is Peripheral.) This means the implementation on the nRF end differs from the implementation on the RPi end.

    In addition to the BLE connection having different implementations in each end, so does e.g. 6LoWPAN. In the SDK, we have implemented the parts that would be on the nRF side, when connecting to e.g. an RPi. If you want to use the same technology, but exchange the RPi for an nRF device, that means you must implement the "usually at the RPi side" parts of the protocols yourself, as it is not provided in our SDK.

    To conclude, if you need traffic directly from one nRF to another nRF, on a direct link, the best option may be to just use BLE. If you need TCP/IP communication you either need to make the implementation yourself, or use an RPi (or other network device) that both nRF devices connect to. (When both nRF devices are connected to the routing device, the nRF devices can send packets to each other as normal. The routing device (e.g. RPi) do not need to be connected to a larger network.)

    Regards,
    Terje

Related