@@ -773,6 +773,37 @@ void TheThingsNetwork::configureKR920_923()
773
773
sendMacSet (MAC_PWRIDX, TTN_PWRIDX_KR920_923);
774
774
}
775
775
776
+ void TheThingsNetwork::configureIN865_867 ()
777
+ {
778
+ sendMacSet (MAC_ADR, " off" ); // TODO: remove when ADR is implemented for this plan
779
+ sendMacSet (MAC_RX2, " 2 866550000" ); // SF10
780
+
781
+ // Disable the three default LoRaWAN channels
782
+ sendChSet (MAC_CHANNEL_STATUS, 0 , " off" );
783
+ sendChSet (MAC_CHANNEL_STATUS, 1 , " off" );
784
+ sendChSet (MAC_CHANNEL_STATUS, 2 , " off" );
785
+
786
+ // Channel 3
787
+ sendChSet (MAC_CHANNEL_DCYCLE, 3 , " 299" );
788
+ sendChSet (MAC_CHANNEL_FREQ, 3 , " 865062500" );
789
+ sendChSet (MAC_CHANNEL_DRRANGE, 3 , " 0 5" );
790
+ sendChSet (MAC_CHANNEL_STATUS, 3 , " on" );
791
+
792
+ // Channel 4
793
+ sendChSet (MAC_CHANNEL_DCYCLE, 4 , " 299" );
794
+ sendChSet (MAC_CHANNEL_FREQ, 4 , " 865402500" );
795
+ sendChSet (MAC_CHANNEL_DRRANGE, 4 , " 0 5" );
796
+ sendChSet (MAC_CHANNEL_STATUS, 4 , " on" );
797
+
798
+ // Channel 5
799
+ sendChSet (MAC_CHANNEL_DCYCLE, 5 , " 299" );
800
+ sendChSet (MAC_CHANNEL_FREQ, 5 , " 865985000" );
801
+ sendChSet (MAC_CHANNEL_DRRANGE, 5 , " 0 5" );
802
+ sendChSet (MAC_CHANNEL_STATUS, 5 , " on" );
803
+
804
+ sendMacSet (MAC_PWRIDX, TTN_PWRIDX_IN865_867);
805
+ }
806
+
776
807
void TheThingsNetwork::configureChannels (uint8_t fsb)
777
808
{
778
809
switch (fp)
@@ -795,6 +826,9 @@ void TheThingsNetwork::configureChannels(uint8_t fsb)
795
826
case TTN_FP_KR920_923:
796
827
configureKR920_923 ();
797
828
break ;
829
+ case TTN_FP_IN865_867:
830
+ configureIN865_867 ();
831
+ break ;
798
832
default :
799
833
debugPrintMessage (ERR_MESSAGE, ERR_INVALID_FP);
800
834
break ;
@@ -808,6 +842,7 @@ bool TheThingsNetwork::setSF(uint8_t sf)
808
842
switch (fp)
809
843
{
810
844
case TTN_FP_EU868:
845
+ case TTN_FP_IN865_867:
811
846
case TTN_FP_AS920_923:
812
847
case TTN_FP_AS923_925:
813
848
case TTN_FP_KR920_923:
0 commit comments