[riot-notifications] [RIOT] ng_networking example: add capability to send UDP packets repeatedly (#3501)

Peter Kietzmann notifications at github.com
Wed Sep 2 12:47:42 CEST 2015


> +        /* allocate IPv6 header */
> +        ip = gnrc_ipv6_hdr_build(udp, NULL, 0, (uint8_t *)&addr, sizeof(addr));
> +        if (ip == NULL) {
> +            puts("Error: unable to allocate IPv6 header");
> +            gnrc_pktbuf_release(udp);
> +            return;
> +        }
> +        /* send packet */
> +        if (!gnrc_netapi_dispatch_send(GNRC_NETTYPE_UDP, GNRC_NETREG_DEMUX_CTX_ALL, ip)) {
> +            puts("Error: unable to locate UDP thread");
> +            gnrc_pktbuf_release(ip);
> +            return;
> +        }
> +        printf("Success: send %u byte to %s:%u\n", (unsigned)payload->size,
> +               addr_str, tmp);
> +        xtimer_usleep(delay);

Seems this does not work on samr21-xpro

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3501/files#r38519153
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150902/d9551de6/attachment.html>


More information about the notifications mailing list