Export RSSI to default parent in the CC26xx web demo

The current version of the CC26xx web demo publishes over MQTT the default parent's IPv6 address and the last observed RSSI of this link. This is collected by active probing (periodic ping).

This commit brings the probing functionality to the example's main code module. The MQTT client keeps publishing as previously, but we now also export the same information through CoAP resources. Configuration is still possible through the example's web server.
This commit is contained in:
Jonas Olsson 2015-08-16 17:16:16 +01:00
parent e96b15773a
commit 67045d4012
9 changed files with 280 additions and 95 deletions

View file

@ -80,6 +80,16 @@
#define CC26XX_WEB_DEMO_NET_UART 1
#endif
/*---------------------------------------------------------------------------*/
/* Active probing of RSSI from our preferred parent */
#if (CC26XX_WEB_DEMO_COAP_SERVER || CC26XX_WEB_DEMO_MQTT_CLIENT)
#define CC26XX_WEB_DEMO_READ_PARENT_RSSI 1
#else
#define CC26XX_WEB_DEMO_READ_PARENT_RSSI 0
#endif
#define CC26XX_WEB_DEMO_RSSI_MEASURE_INTERVAL_MAX 86400 /* secs: 1 day */
#define CC26XX_WEB_DEMO_RSSI_MEASURE_INTERVAL_MIN 5 /* secs */
/*---------------------------------------------------------------------------*/
/* User configuration */
/* Take a sensor reading on button press */
#define CC26XX_WEB_DEMO_SENSOR_READING_TRIGGER &button_left_sensor
@ -169,6 +179,7 @@ typedef struct cc26xx_web_demo_config_s {
uint32_t magic;
int len;
uint32_t sensors_bitmap;
int def_rt_ping_interval;
mqtt_client_config_t mqtt_config;
net_uart_config_t net_uart;
} cc26xx_web_demo_config_t;