Commit Graph
5 Commits
Author SHA1 Message Date
Olaf Bergmann a267d3a2b0 server.c: fixed Contiki-related debug functions
The debug function for printing lladdress have been renamed and moved
to net-debug.h. This change now includes this header and uses the
appropriate macros instead.
2016-06-10 15:07:25 +02:00
Carsten Schoenert b4973f1d73 fixup argument list for uip_ds6_prefix_add
uip_ds6_prefix_add is using 6 arguments, better use explicit argument
list than let the compiler decide. Some compiler will complain if some
optionally arguments are missed.
2016-01-10 17:49:07 +01:00
Olaf Bergmann d55bd85e14 examples/contiki/server.c: Define clock_offset locally
The global variable clock_offset has been removed from libcoap, so
we have to define our own.
2015-03-11 14:37:18 +01:00
Olaf Bergmann b87f45eeb2 remove unused code from Contiki server example 2015-02-16 17:04:57 +01:00
Olaf Bergmann 4635435771 Created a self-contained Contiki server example
Directory examples/contiki now contains a small example server for
Contiki and a Makefile for platform minimal-net.

Build:

  make contiki     # clones Contiki
  make server      # creates the minimal-net coap server

Run:

Unfortunately, you have to run the server with sudo unless you
set CAP_NET_ADMIN for both, the server executable, and ifconfig
(sudo setcap cap_net_admin+pei ...).

  sudo ./server

Then, add the server's interface address to the tap0 device and
optionally set a default route:

  sudo ip -6 a a aaaa::1000 dev tap0
  sudo ip -6 r a aaaa::/64 dev tap0

Although everything should work now, it does not. I had to send
router advertisements on tap0:

  sudo radvd -C ./radvd.conf

Note that on Debian (and Ubuntu, and ...), radvd will not start
when IPv6 forwarding is disabled (which is usually the case on
end systems). Trying to enable like this did not work for me:

  sudo sysctl -w net.ipv6.conf.tap0.forwarding=1
  sudo sysctl -w net.ipv6.conf.tap0.mc_forwarding=1

Workaround (ugly): get the radvd sources, compile them and use that.
2015-02-16 16:30:28 +01:00