1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-28 23:09:46 +01:00
RIOT/examples/gnrc_minimal
2023-12-10 13:51:04 +01:00
..
main.c examples/gnrc_minimal: use netifs_print_ipv6() 2022-06-06 20:46:48 +02:00
Makefile treewide: fix path to external_board_dirs test in doc 2023-05-13 18:31:05 +02:00
Makefile.ci examples,tests: Update Makefile.cis 2023-12-10 13:51:04 +01:00
Makefile.gnu.dep examples/gnrc_minimal: move TOOLCHAIN dep to Makefile.gnu.dep 2021-01-27 11:13:08 +01:00
README.md examples/gnrc_minimal: remove obsolete xbee reference from readme 2018-04-19 11:31:40 +02:00

gnrc_minimal example

This is a minimalistic example for RIOT's gnrc network stack. The application will auto initialize the device's default network interface and the IPv6 stack and print its link-local address. You can ping the printed address from another device to check if the node is alive. Please note that you may have to disable 6LoWPAN header compression (IPHC), since this example does not include it. In the gnrc_networking example or any other application with GNRC and a shell, you can do so by calling ifconfig <if_id> -iphc).

The example demonstrates how one can reduce the memory footprint of a gnrc application by enabling only the minimum subset of features and setting configuration options to smaller values than the default. In particular, this reduction of memory consumption in comparison to the gnrc_networking example is achieved by:

  • Using only the gnrc_ipv6 and gnrc_ndp modules (instead of gnrc_ipv6_router_default). This configures the node as a IPv6/6LoWPAN host instead of a router and disable optional features such as 6LoWPAN IPHC or fragmentation.
  • Not using gnrc_rpl.
  • Disabling features meant for helping during development and debugging such as the shell or setting the DEVELHELP flag.
  • Using the minimal standard pseudo random number generator instead of the Mersenne Twister.
  • Reducing the number of configurable IPv6 addresses per interface to 4 (instead of 7 or 8).
  • Reducing the packet buffer size from 6kB to 512 bytes.
  • Reducing the maximum neighbor cache size from 8 to 1.

Please take a look at the Makefile to see how the configuration is done.