From ab37e59170a915f80156a005d13f0a826271730d Mon Sep 17 00:00:00 2001 From: stocrene <53317894+stocrene@users.noreply.github.com> Date: Tue, 21 Dec 2021 16:55:46 +0100 Subject: [PATCH] Added getClass() Return the active Class --- src/MKRWAN.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/MKRWAN.h b/src/MKRWAN.h index cca65c2..8584c97 100644 --- a/src/MKRWAN.h +++ b/src/MKRWAN.h @@ -468,6 +468,16 @@ class LoRaModem : public Stream } return true; } + + String getClass() { + String class_name = ""; + sendAT(GF("+CLASS?")); + if (waitResponse("+OK=") == 1) { + class_name = stream.readStringUntil('\r'); + } + return class_name; + } + bool configureBand(_lora_band band) { sendAT(GF("+BAND="), band);