Application Status over CoAP (Alpha)#

The component implements status notifications and resources over CoAP. The component can be used in any application to gather runtime information about devices. The component should be initialized with the sl_wisun_app_status_init() function. Conditional sending can be customized by implementing the sl_wisun_app_status_condition_cb() function. Server and notification parameters can be configured in the sl_wisun_app_status_config.h file or at runtime using the appropriate setters/getters.

When the application starts, the component is initialized automatically with the default values from the configuration header. The configuration interface provides options to enable or disable the expected statistics data from the nodes, such as device information, execution time statistics, and neighbor information.

Notifications can be received on any CoAP server, such as the libcoap server application. Over the prebuilt binaries, any custom library can be used to implement a CoAP server that receives the notifications from the Wi-SUN node.

CoAP resources can be accessed using the CoAP client, such as the libcoap client application to provide a solution for handling CoAP requests sent directly to the node. The application status resource is configurable through the configuration header file and can be optionally enabled or disabled at compile time.

The following JSON shows the payload of the status notification/resource:

{
"dev_info": {
  "hw": "BRD4270B A06 EFR32FG25B222F1920IM56",
  "sw": "Wi-SUN Ping Application v2.0.0 (stack: v2.3.0 FFN)",
  "mac": "60:A4:23:FF:FE:37:A7:57",
  "ip": "fd12:3456::62a4:23ff:fe37:a757"
},
"stat": {
  "run": "000-02:47:37",
  "conn_cnt": 2,
  "conn": "000-00:30:35",
  "tot_conn": "000-02:43:23",
  "disconn": "000-00:26:26",
  "tot_disconn": "000-00:04:26",
  "available": "97.35%"
},
"nb_info": {
  "ip":["t","lt","txc","txf","txms","txmsf","rpl","etx","rslo","rsli"],
  "fd12:3456::62a4:23ff:fe37:aed9":[0,2191,1352,0,0,0,128,134,133,143],
  "fd12:3456::32fb:10ff:feed:414e":[2,2080,29,0,0,0,65535,141,119,132],
  "fd12:3456::62a4:23ff:fe37:aee3":[2,545,14,0,0,0,65535,160,101,114]
}
}