1.9.1 Application Example

The G3 Coordinator ICMPv6 Cycles application implements a G3-Hybrid Coordinator, capable of creating a G3 network. Once the devices are joined to the network, after 2 minutes since the last join, the Coordinator starts cycling the joined devices with ICMPv6 Echo Requests (pings).

The G3 Coordinator ICMPv6 Cycles application shows debug information and information about the cycles through a serial port, whose settings are:
In order to separate functionalities, there are five application files, each one with its own state machine:
  • G3 management (app_g3_management.c): It manages the G3 stack, including:
    • Network creation.
    • Configuration of G3 stack (ADP and MAC) parameters.
  • TCP/IP management (app_tcpip_management.c): It configures the TCP/IP stack, including:
    • Set IPv6 addresses.
    • Specific configuration for the G3 stack.
  • Extensible Authentication Protocol (EAP) server (app_eap_server.c): It manages the LBP Coordinator module, accepting the join requests by devices and maintaining the list of joined devices.
  • Cycles (app_cycles.c): It manages the cycles of the joined devices. Once the devices are joined to the network, after 2 minutes since the last join, it starts cycling the joined devices with ICMPv6 Echo Requests. The results are displayed through a serial port.
  • Storage: It contains the Extended Address (EUI64) generation and non-volatile data storage.
    • For PIC32CXMT (app_storate_pic32cxmt.c) it is implemented using UniqueID, User Signature, GPBR and SUPC power-down detection.
    • For WBZ45 (app_storate_wbz451.c) it is implemented using True Random Number Generator (TRNG) and Persistent Data Server (PDS).

In the following subsections each application file is described in more detail.