Skip to content

Commit 286cbdf

Browse files
committed
Add AT+TCONF and AT+TTONE
1 parent 44c9265 commit 286cbdf

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

src/MKRWAN.h

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,41 @@ class LoRaModem : public Stream
466466
return true;
467467
}
468468

469+
String getTConf() {
470+
String tconf_read;
471+
tconf_read="GetTConf Fail";
472+
473+
sendAT(GF("+TCONF=?"));
474+
if (waitResponse(tconf_read) == 1) {
475+
tconf_read=tconf_read.substring(0, tconf_read.lastIndexOf('\r', tconf_read.indexOf("OK")));
476+
}
477+
return tconf_read;
478+
}
479+
480+
String setTConf(String params) {
481+
String tconf;
482+
tconf="SetTConf Fail";
483+
484+
//DBG("Debug in TConf. Parameters:", params);
485+
params.trim();
486+
sendAT(GF("+TCONF="), params.c_str());
487+
if (waitResponse(1000,tconf) == 1) {
488+
DBG("Waitresponse ok");
489+
}
490+
else {
491+
DBG("FAIL");
492+
}
493+
tconf = getTConf();
494+
return tconf;
495+
}
496+
497+
bool enTtone() {
498+
sendAT(GF("+TTONE"));
499+
if (waitResponse() == 1) {
500+
return true;
501+
}
502+
return false;
503+
}
469504

470505
int getrxfreq() {
471506
return getValue("RX2FQ").toInt();

0 commit comments

Comments
 (0)