From 1891ec6adbbfc6c7608dbbbbaecd0afeea67b716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Amann?= <30447739+Bjoerns-TB@users.noreply.github.com> Date: Sat, 11 Apr 2020 14:14:04 +0200 Subject: [PATCH 1/2] Update LoRaWan.h --- src/LoRaWan.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/LoRaWan.h b/src/LoRaWan.h index fa492ab4..f60d3c2b 100644 --- a/src/LoRaWan.h +++ b/src/LoRaWan.h @@ -404,6 +404,13 @@ class LoRaWanClass * \return Return null */ void setDeviceLowPower(void); + + /** + * \brief Send ping + * + * \return Return null + */ + void sendDevicePing(void); /** * \brief Reset device @@ -498,4 +505,4 @@ class LoRaWanClass extern LoRaWanClass lora; -#endif \ No newline at end of file +#endif From 950fa7dd714b9b5dddc744707a273ed548322d98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Amann?= <30447739+Bjoerns-TB@users.noreply.github.com> Date: Sat, 11 Apr 2020 14:31:26 +0200 Subject: [PATCH 2/2] Update LoRaWan.cpp --- src/LoRaWan.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/LoRaWan.cpp b/src/LoRaWan.cpp index e5940721..424bd1c8 100644 --- a/src/LoRaWan.cpp +++ b/src/LoRaWan.cpp @@ -773,6 +773,15 @@ void LoRaWanClass::setDeviceLowPower(void) delay(DEFAULT_TIMEWAIT); } +void LoRaWanClass::sendDevicePing(void) +{ + sendCommand("AT\r\n"); +#if _DEBUG_SERIAL_ + loraDebugPrint(DEFAULT_DEBUGTIME); +#endif + smartDelay(DEFAULT_TIMEWAIT); +} + // // Reset the LoRa module. Does not factory reset // @@ -1042,4 +1051,4 @@ short LoRaWanClass::sendCommandAndWaitForResponse(char* command, char *response, } -LoRaWanClass lora; \ No newline at end of file +LoRaWanClass lora;