summaryrefslogtreecommitdiff
path: root/digital
diff options
context:
space:
mode:
Diffstat (limited to 'digital')
-rw-r--r--digital/beacon/src/network.c20
-rw-r--r--digital/beacon/src/network.h8
2 files changed, 28 insertions, 0 deletions
diff --git a/digital/beacon/src/network.c b/digital/beacon/src/network.c
index 0b8785c1..4721dbf0 100644
--- a/digital/beacon/src/network.c
+++ b/digital/beacon/src/network.c
@@ -273,7 +273,27 @@ void ZDO_UnbindIndication(ZDO_UnbindInd_t *unbindInd)
(void)unbindInd;
}
+/* This function returns the LQI of the joined network */
+uint8_t network_get_lqi(void)
+{
+ ZDO_GetLqiRssi_t lqiRssi;
+
+ lqiRssi.nodeAddr = 0;
+ ZDO_GetLqiRssi(&lqiRssi);
+
+ return lqiRssi.lqi;
+}
+/* This function returns the RSSI of the joined network */
+int8_t network_get_rssi(void)
+{
+ ZDO_GetLqiRssi_t lqiRssi;
+
+ lqiRssi.nodeAddr = 0;
+ ZDO_GetLqiRssi(&lqiRssi);
+
+ return lqiRssi.rssi;
+}
\ No newline at end of file
diff --git a/digital/beacon/src/network.h b/digital/beacon/src/network.h
index 004434f0..10673c25 100644
--- a/digital/beacon/src/network.h
+++ b/digital/beacon/src/network.h
@@ -74,6 +74,14 @@ void network_leave(void);
/* Leave network response */
void zdpLeaveResp(ZDO_ZdpResp_t *zdpResp);
+/* This function returns the LQI of the joined network */
+uint8_t network_get_lqi(void);
+
+/* This function returns the RSSI of the joined network */
+int8_t network_get_rssi(void);
+
+
+
#endif // ifndef _NETWORK_H
// eof network.h