UDP Sock API

Hi everyone,

I'm trying to get communication working between Linux and RIOT OS with UDP sockets.

My hardware setup is composed by a UDOONeo board and a Nucleo-F303RE. Both are embedding a MRF24J40MD. The UDOONeo uses kernel 4.1 and wpan-tools 0.8. On the Nucleo-F303RE, I'm using RIOT OS 2018.10.

With "udp send <ipv6_address> <port> <message>" command from example "gnrc_networking", I'm able to retrieve messages sent from RIOT OS to Linux with this Python script : https://pastebin.com/Zg7SZdFF

In the opposite direction (Linux -> RIOT OS), I can't receive any messages. Here's the code of the small application : https://pastebin.com/zVEZD4Lm

I'm never entering the part of the code with send_ack() and handle_udp_command(). This snippet works perfectly from another RIOT OS instance on a Nucleo-F303RE. The Python script used to send packets from Linux : https://pastebin.com/yufGytsv

It seems that my Python script sends to a 802.15.4 broadcast short address and the destination & source addresses are included in the payload of the frame.

Does anyone have any clue to my issue ? Or a better solution. My snippet for RIOT OS is almost the same as the UDP Sock API examples.

Best regards

Joel

Hi Carron,

Hi Kaspar,

Thanks for your answer.

Yes I can ping RIOT OS from Linux with addresses ff02::2 and the complete IPv6 address. From RIOT OS, I can ping Linux with the complete IPv6 address but not with ff02::2 (my kernel doesn't handle coordinator mode in wpan-tools I think).

"uname -a" gives :

"Linux 4.1.15_2.0.x-udoo+g7773e460a540 #1 SMP PREEMPT Mon Nov 12 16:59:36 CET 2018 armv7l armv7l armv7l GNU/Linux"

I've patched the MRF24J40 Linux driver to add some debug messages and activated the debug messages in RIOT OS (GNRC part). When I send a packet from Linux, I can see that the GNRC is receiving a message but the UDP packet never reaches the application.

In the direction RIOT OS to Linux, I can send UDP packets and I can handle them with this Python script : https://pastebin.com/uBRXc3dh

Here the frames from RIOT OS and from Linux : https://pastebin.com/K7ei02R3