Step 1: Extending Contiki with a new platform - michaelkirsche/6lowpan4omnet-diy GitHub Wiki

This step enables you to compile Contiki with its interfaces mapped to OMNeT++, thus enabling the use of the 6LoWPAN implementation in OMNeT++. After downloading/extracting or cloning the release, copy the new omnetpp platform for Contiki into Contiki's platform folder (e.g., /home/user/contiki-2.6/platform/).

You will find a makefile (Makefile.omnetpp) and a configuration file (contiki-conf.h) amongst other files in the directory. The platform definition itself was derived from Contiki's native platform. Configuration options for the 6LoWPAN protocol can be adjusted in the configuration file, which contains a list of possible parameters with descriptions. Make sure that at least the following #defines are properly set, adjust others as necessary:

  • #define CLOCK_CONF_SECOND 1000000
  • #define UIP_CONF_IPV6 1
  • #define UIP_CONF_TCP 1
  • #define UIP_CONF_UDP 1
  • #define UIP_CONF_ICMP6 1
  • #define SICSLOWPAN_CONF_COMPRESSION (e.g.) 2 (or SICSLOWPAN_CONF_COMPRESSION_HC06)
  • #define SICSLOWPAN_CONF_FRAG 1
  • #define SICSLOWPAN_REASS_MAXAGE (e.g.) 20 (required when fragmentation is enabled)
  • #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS (e.g.) 100 (required for HC06 compression)
  • #define NETSTACK_CONF_MAC omnet_mac_driver
  • #define NETSTACK_CONF_NETWORK sicslowpan_driver

>>> Goto Step 2 - Adjusting Contiki