hi there,
I am currently trying to use the samples of "ncs/nrf/samples/openthread/coap_server" and "coap_client". I have flashed them onto two nrf52840dk_nrf52840 development boards. I have called the API to attempt to obtain the realm local multicast address and tried to use OTBR running on a Raspberry Pi to send multicast packets to the realm local multicast address. My ultimate goal is to verify whether messages sent to the realm local address in the Thread network will be resent twice due to the MPL mechanism. At the moment, I have the following questions:
-
When I obtain the realm local multicast address, does it mean that devices in the Thread network composed of coap_server and coap_client have all subscribed to this realm local address? If I send multicast packet information to this address, can they receive it? if they still not subscribe the address, what should i do to let them subscribe it?
-
How can I verify the information sent to the multicast address? The methods I am currently considering are using a dongle to capture packets in the air(sniffer) for verification or printing the received multicast information in the RTT viewer window. However, I lack experience in this and would like to know if there are similar samples that I can refer to.
Thank you very much. If more information is needed, please reply, and I will provide it immediately.
best regards,
Zhou
ps. this is how i get the realm local address
switch(deviceRole){ case OT_DEVICE_ROLE_CHILD: printk("THREAD_CONNECTED\n"); printk("CHILD Role.\n"); break; case OT_DEVICE_ROLE_ROUTER: printk("THREAD_CONNECTED\n"); printk("ROUTER Role.\n"); //when the coap_server become the router in the thread network, try to get the realm local address ipaddress = otThreadGetRealmLocalAllThreadNodesMulticastAddress(ot); for (int i = 0; i < 8; ++i){ ipv6_16bit[i] = ipaddress->mFields.m16[i]; } printk("Realm Local ipv6 address listed below:\n"); printk("%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", ipv6_16bit[0],ipv6_16bit[1],ipv6_16bit[2],ipv6_16bit[3], ipv6_16bit[4],ipv6_16bit[5],ipv6_16bit[6],ipv6_16bit[7]); break;