UDP datagram sending

Hi :slight_smile:

I am writing an UDP module for sending and receiving datagrams with ACKs. It is based on udp and pktdump example. I have a certain problem with datagram sending from my custom thread. Using shell module the datagrams are prepared as pktsnip and then sent by calling "gnrc_netapi_dispatch_send(GNRC_NETTYPE_UDP, GNRC_NETREG_DEMUX_CTX_ALL, ip);". The thread number is 2 which indicates the main thread. Up to this point everything seems to work fine. When I'm doing the same thing using my custom thread it doesn't work. Why is it so?

Best regards, Mateusz Kubaszek

Hi Mateusz,

can you elaborate on how it "doesn't work"? I mean a small description of what's happening / until which point things work as expected / what happens next... How do you think the thread number of main is related to your problem? This IPC call:

gnrc_netapi_dispatch_send(GNRC_NETTYPE_UDP, GNRC_NETREG_DEMUX_CTX_ALL, ip);

should send a message to the appropriate (UDP-)thread, no matter from which thread it has been sent. That's why I assume your problem might be something else.

Best regards Peter