1.7.1 Application Example
The G3 Device UDP/ICMPv6 Responder application implements a G3-Hybrid Device, capable of joining a G3 network. Once it is joined it can reply to UDP and ICMPv6 requests.
This application can be used to pass the G3 Conformance certification tests. By default
the application is not configured for G3 Conformance tests. In order to configure it,
the function APP_G3_MANAGEMENT_SetConformanceConfig()
must be called.
In the provided example this is done at initialization if macro
APP_G3_MANAGEMENT_CONFORMANCE_TEST
is defined, but the user could
implement another method to configure it dynamically.
- Baud-rate depending on the platform, see 1.7.3 Hardware Configuration
- 8 data bits
- no parity
- 1 stop bit
- G3 management
(app_g3_management.c): It manages the G3 stack, including:
- Network discovery and join.
- Configuration of G3 stack (ADP, MAC and LBP) parameters, including specific configuration for G3 Conformance tests.
- TCP/IP management
(app_tcpip_management.c): It configures the TCP/IP stack,
including:
- Set IPv6 addresses.
- Specific configuration for the G3 stack.
- UDP responder (app_udp_responder.c): It opens an UDP server socket and handles the messages defined in G3 Conformance tests.
- 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.