summaryrefslogtreecommitdiff
path: root/digital/beacon/src/network.c
diff options
context:
space:
mode:
Diffstat (limited to 'digital/beacon/src/network.c')
-rw-r--r--digital/beacon/src/network.c20
1 files changed, 20 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