Fork of Semtech LoRaWAN stack

Fork of LoRaWAN-lib by canuck lehead

Branch:
india_support
Revision:
43:eed39925bade
Parent:
31:930f949fdd9e
diff -r fc9baa35ae1a -r eed39925bade LoRaMac-board.h
--- a/LoRaMac-board.h	Tue Aug 08 11:21:18 2017 -0400
+++ b/LoRaMac-board.h	Mon Aug 21 16:09:09 2017 -0400
@@ -376,6 +376,123 @@
  * LoRaMac channels which are allowed for the join procedure
  */
 #define JOIN_CHANNELS      ( uint16_t )( LC( 1 ) | LC( 2 ) | LC( 3 ) )
+#elif defined( USE_BAND_INDIA_865 )
+
+/*!
+ * LoRaMac maximum number of channels
+ */
+#define LORA_MAX_NB_CHANNELS                        16
+
+/*!
+ * Minimal datarate that can be used by the node
+ */
+#define LORAMAC_TX_MIN_DATARATE                     DR_0
+
+/*!
+ * Maximal datarate that can be used by the node
+ */
+#define LORAMAC_TX_MAX_DATARATE                     DR_7
+
+/*!
+ * Minimal datarate that can be used by the node
+ */
+#define LORAMAC_RX_MIN_DATARATE                     DR_0
+
+/*!
+ * Maximal datarate that can be used by the node
+ */
+#define LORAMAC_RX_MAX_DATARATE                     DR_7
+
+/*!
+ * Default datarate used by the node
+ */
+#define LORAMAC_DEFAULT_DATARATE                    DR_0
+
+/*!
+ * Minimal Rx1 receive datarate offset
+ */
+#define LORAMAC_MIN_RX1_DR_OFFSET                   0
+
+/*!
+ * Maximal Rx1 receive datarate offset
+ */
+#define LORAMAC_MAX_RX1_DR_OFFSET                   7
+
+/*!
+ * Minimal Tx output power that can be used by the node
+ */
+#define LORAMAC_MIN_TX_POWER                        TX_POWER_10_DBM
+
+/*!
+ * Maximal Tx output power that can be used by the node
+ */
+#define LORAMAC_MAX_TX_POWER                        TX_POWER_20_DBM
+
+/*!
+ * Default Tx output power used by the node
+ */
+#define LORAMAC_DEFAULT_TX_POWER                    TX_POWER_20_DBM
+
+/*!
+ * LoRaMac TxPower definition
+ */
+#define TX_POWER_30_DBM                             0
+#define TX_POWER_28_DBM                             1
+#define TX_POWER_26_DBM                             2
+#define TX_POWER_24_DBM                             3
+#define TX_POWER_22_DBM                             4
+#define TX_POWER_20_DBM                             5
+#define TX_POWER_18_DBM                             6
+#define TX_POWER_16_DBM                             7
+#define TX_POWER_14_DBM                             8
+#define TX_POWER_12_DBM                             9
+#define TX_POWER_10_DBM                             10
+
+/*!
+ * LoRaMac datarates definition
+ */
+#define DR_0                                        0  // SF12 - BW125
+#define DR_1                                        1  // SF11 - BW125
+#define DR_2                                        2  // SF10 - BW125
+#define DR_3                                        3  // SF9  - BW125
+#define DR_4                                        4  // SF8  - BW125
+#define DR_5                                        5  // SF7  - BW125
+#define DR_6                                        6  // SF7  - BW250
+#define DR_7                                        7  // FSK
+
+/*!
+ * Verification of default datarate
+ */
+#if ( LORAMAC_DEFAULT_DATARATE > DR_5 )
+#error "A default DR higher than DR_5 may lead to connectivity loss."
+#endif
+
+/*!
+ * Second reception window channel definition.
+ */
+// Channel = { Frequency [Hz], Datarate }
+#define RX_WND_2_CHANNEL                                  { 866550000, DR_2 }
+
+/*!
+ * LoRaMac maximum number of bands
+ */
+#define LORA_MAX_NB_BANDS                           1
+
+// Band = { DutyCycle, TxMaxPower, LastTxDoneTime, TimeOff }
+#define BAND0              { 1, TX_POWER_20_DBM, 0,  0 } //  100.0 %
+
+/*!
+ * LoRaMac default channels
+ */
+// Channel = { Frequency [Hz], { ( ( DrMax << 4 ) | DrMin ) }, Band }
+#define LC1                { 865062500, { ( ( DR_5 << 4 ) | DR_0 ) }, 0 }
+#define LC2                { 865402500, { ( ( DR_5 << 4 ) | DR_0 ) }, 0 }
+#define LC3                { 865985000, { ( ( DR_5 << 4 ) | DR_0 ) }, 0 }
+
+/*!
+ * LoRaMac channels which are allowed for the join procedure
+ */
+#define JOIN_CHANNELS      ( uint16_t )( LC( 1 ) | LC( 2 ) | LC( 3 ) )
 
 #elif defined( USE_BAND_915 ) || defined( USE_BAND_915_HYBRID )
 
@@ -506,6 +623,7 @@
  * }
  * \endcode
  */
+
 #else
     #error "Please define a frequency band in the compiler options."
 #endif