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; 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