File tree Expand file tree Collapse file tree 1 file changed +53
-1
lines changed
Expand file tree Collapse file tree 1 file changed +53
-1
lines changed Original file line number Diff line number Diff line change @@ -615,7 +615,16 @@ class LoRaModem : public Stream
615615 return false ;
616616 }
617617 return true ;
618- }
618+ }
619+
620+ int getDataRate () {
621+ int dr = -1 ;
622+ sendAT (GF (" +DR?" ));
623+ if (waitResponse (" +OK=" ) == 1 ) {
624+ dr = stream.readStringUntil (' \r ' ).toInt ();
625+ }
626+ return dr;
627+ }
619628
620629 bool setADR (bool adr) {
621630 sendAT (GF (" +ADR=" ), adr);
@@ -625,6 +634,15 @@ class LoRaModem : public Stream
625634 return true ;
626635 }
627636
637+ int getADR () {
638+ int adr = -1 ;
639+ sendAT (GF (" +ADR?" ));
640+ if (waitResponse (" +OK=" ) == 1 ) {
641+ adr = stream.readStringUntil (' \r ' ).toInt ();
642+ }
643+ return adr;
644+ }
645+
628646 String getDevAddr () {
629647 String devaddr = " " ;
630648 sendAT (GF (" +DEVADDR?" ));
@@ -652,6 +670,40 @@ class LoRaModem : public Stream
652670 return appskey;
653671 }
654672
673+ bool setFCU (uint16_t fcu) {
674+ sendAT (GF (" +FCU=" ), fcu);
675+ if (waitResponse () != 1 ) {
676+ return false ;
677+ }
678+ return true ;
679+ }
680+
681+ int32_t getFCU () {
682+ int32_t fcu = -1 ;
683+ sendAT (GF (" +FCU?" ));
684+ if (waitResponse (" +OK=" ) == 1 ) {
685+ fcu = stream.readStringUntil (' \r ' ).toInt ();
686+ }
687+ return fcu;
688+ }
689+
690+ bool setFCD (uint16_t fcd) {
691+ sendAT (GF (" +FCD=" ), fcd);
692+ if (waitResponse () != 1 ) {
693+ return false ;
694+ }
695+ return true ;
696+ }
697+
698+ int32_t getFCD () {
699+ int32_t fcd = -1 ;
700+ sendAT (GF (" +FCD?" ));
701+ if (waitResponse (" +OK=" ) == 1 ) {
702+ fcd = stream.readStringUntil (' \r ' ).toInt ();
703+ }
704+ return fcd;
705+ }
706+
655707
656708private:
657709
You can’t perform that action at this time.
0 commit comments