[riot-users] Problem with udp sock api

Philipp Blum philipp-blum at jakiku.de
Thu Jul 18 22:46:51 CEST 2019


Wow, I wouldn't say bad. 
There is a complete POSIX sockets example in the source code:
RIOT OS support the POSIX socket API. There are tons of examples in the
Internet for POSIX sockets. 
But if you want to have a more complete code an guide.
1. Server on the sensor. UDP + Protobuf:
2. Complete guide for this sensor server and the host application. (BLE,

Am 2019-07-18 15:25, schrieb oliver: 

> Hello together,
> I'm trying to understand, how the UDP sock API [1 [1]] works, but the
> documentation /example are very bad / useless.
> My questions are:
> 1:
> How can I create an UDP server which listen on a specific port and has
> an unique IPv6 addr ?? The example [1 [1]] isn't very helpful. I don't
> understand why some variables like "local" [2] are defined. The
> documentation does not help. The documentation says "Common IP-based
> transport layer end point." for the struct sock_udp_ep_t. But why do I
> need this?? I want to receive and send udp packages to other boards. Why
> is this so difficult to implement ??
> 2:
> How can I send an udp package with the following parameters given:
> - message
> - portnumber
> - dst ipv6 addr
> The documentation / example does not help here either.
> 3:
> How can I get the unique Ipv6 addr from my device (samr21-xpro). I want
> to call "getIPv6()" and want the Ipv6 addr which this device has.
> [1] https://doc.riot-os.org/group__net__sock__udp.html
> [2] sock_udp_ep_t local = SOCK_IPV6_EP_ANY;


[1] https://doc.riot-os.org/group__net__sock__udp.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/users/attachments/20190718/4e26f7f4/attachment.htm>

More information about the users mailing list