Skip to content

Commit 90fe34d

Browse files
committed
mac set rx2 3 869525000 removed from init function.
It belongs in setFrequencyPlan. Tests show that a join works, and some downlinks too without setting RX2.
1 parent 5f461c5 commit 90fe34d

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/rn2xx3.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ void rn2xx3::autobaud()
3636
_serial.write((byte)0x00);
3737
_serial.write(0x55);
3838
_serial.println();
39+
// we could use sendRawCommand(F("sys get ver")); here
3940
_serial.println("sys get ver");
4041
response = _serial.readStringUntil('\n');
4142
}
@@ -187,10 +188,11 @@ bool rn2xx3::initOTAA(String AppEUI, String AppKey, String DevEUI)
187188

188189
// Semtech and TTN both use a non default RX2 window freq and SF.
189190
// Maybe we should not specify this for other networks.
190-
if (_moduleType == RN2483)
191-
{
192-
sendRawCommand(F("mac set rx2 3 869525000"));
193-
}
191+
// if (_moduleType == RN2483)
192+
// {
193+
// sendRawCommand(F("mac set rx2 3 869525000"));
194+
// }
195+
// Disabled for now because an OTAA join seems to work fine without.
194196

195197
_serial.setTimeout(30000);
196198
sendRawCommand(F("mac save"));
@@ -274,7 +276,9 @@ bool rn2xx3::initABP(String devAddr, String AppSKey, String NwkSKey)
274276
break;
275277
case RN2483:
276278
sendRawCommand(F("mac reset 868"));
277-
sendRawCommand(F("mac set rx2 3 869525000"));
279+
// sendRawCommand(F("mac set rx2 3 869525000"));
280+
// In the past we set the downlink channel here,
281+
// but setFrequencyPlan is a better place to do it.
278282
break;
279283
default:
280284
// we shouldn't go forward with the init

0 commit comments

Comments
 (0)