Nagaraj Krishnamurthy / LoRaWAN-NAMote72-Application-Demo_IoTium

Dependencies:   LoRaWAN-lib SX1272Lib lib_gps lib_mma8451q lib_mpl3115a2 mbed

Fork of LoRaWAN-NAMote72-Application-Demo_Multitech by Nagaraj Krishnamurthy

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Config.h Source File

Config.h

00001 /*
00002  / _____)             _              | |
00003 ( (____  _____ ____ _| |_ _____  ____| |__
00004  \____ \| ___ |    (_   _) ___ |/ ___)  _ \
00005  _____) ) ____| | | || |_| ____( (___| | | |
00006 (______/|_____)_|_|_| \__)_____)\____)_| |_|
00007     (C)2015 Semtech
00008 
00009 Description: End device communication parameters
00010 
00011 License: Revised BSD License, see LICENSE.TXT file include in the project
00012 
00013 Maintainer: Uttam Bhat
00014 */
00015 
00016 #ifndef __LORA_CONFIG_H__
00017 #define __LORA_CONFIG_H__
00018 
00019 /*!
00020  * Configure End-Device to use 8-channels corresponding to Block A
00021  * Comment/Uncomment to disable/enable Hybrid mode
00022  */
00023 #define USE_BAND_915_HYBRID
00024 
00025 #ifndef USE_BAND_915_HYBRID
00026 /*!
00027  * Configure End-Device to use 64-channels across to Block A thru Block H
00028  */
00029 #define USE_BAND_915
00030 
00031 #endif
00032 
00033 /*!
00034  * Join requests trials periodicity. It is the time between RX1/RX2 and next TX
00035  */
00036 #define OVER_THE_AIR_ACTIVATION_DUTYCYCLE           2*5000000  // value in us
00037 
00038 /*!
00039  * Defines the application data transmission periodicity. It is the time between RX1/RX2 and next TX
00040  */
00041 #define APP_TX_DUTYCYCLE                            2*5000000  // value in us
00042 
00043 /*!
00044  * LoRaWAN confirmed messages
00045  * \remark 1 : Confirmed messages enabled. Must receive ACK from network server
00046            0 : Confirmed messages disabled. 
00047  */
00048 #define LORAWAN_CONFIRMED_MSG_ON                    1
00049 
00050 /*!
00051  * LoRaWAN Adaptive Data Rate
00052  *
00053  * \remark Please note that when ADR is enabled the end-device uses default datarate of DR_0
00054  */
00055 #define LORAWAN_ADR_ON                              0
00056 
00057 /*!
00058  * Default mote datarate
00059  * \remark DR_0 : 980 bps; DR_1 : 1760 bps; DR_2 : 3125 bps; DR_3 : 5470 bps; DR_4 : 12500 bps
00060  */
00061 #define LORAWAN_DEFAULT_DATARATE                    DR_0
00062 
00063 /*!
00064  * LoRaWAN application port
00065  */
00066 #define LORAWAN_APP_PORT                            5
00067 
00068 /*!
00069  * LoRaWAN User defined Tx Power
00070  *
00071  * \remark The Tx power level is set as TX_POWER_P_DBM, where 10 <= P <= 30 and P is even value { i.e. P = 10, 12, 14 ... 28 or 30 }
00072  */
00073 #define LORAWAN_TX_POWER                            TX_POWER_20_DBM
00074 
00075 #if ( LORAWAN_APP_PORT == 5 )
00076 /*====================================================
00077             US01 GPS APPLICATION DEMO (PORT 5)
00078 ====================================================*/
00079 
00080 /*!
00081  * User application data buffer size
00082  */
00083 #define LORAWAN_APP_DATA_SIZE                       11
00084 
00085 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
00086 
00087 #elif ( LORAWAN_APP_PORT == 6 )
00088 /*====================================================
00089                 SENET M2X DEMO (PORT 6)
00090 ====================================================*/
00091 
00092 /*!
00093  * User application data buffer size
00094  */
00095 #define LORAWAN_APP_DATA_SIZE                       2
00096 
00097 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
00098 
00099 #elif ( LORAWAN_APP_PORT == 7 )
00100 /*====================================================
00101                 SENET GPS DEMO (PORT 7)
00102 ====================================================*/
00103 
00104 /*!
00105  * User application data buffer size
00106  */
00107 #define LORAWAN_APP_DATA_SIZE                       11
00108 
00109 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
00110 
00111 #elif ( LORAWAN_APP_PORT == 11 )
00112 /*====================================================
00113                 PUSH BUTTON DEMO (PORT 11)
00114 ====================================================*/
00115 
00116 /*!
00117  * User application data buffer size
00118  */
00119 #define LORAWAN_APP_DATA_SIZE                       2
00120 
00121 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
00122 
00123 #elif ( LORAWAN_APP_PORT == 12 )
00124 /*====================================================
00125                 TRANSMIT ON VERTICAL ORIENTATION DEMO (PORT 12)
00126 ====================================================*/
00127 
00128 /*!
00129  * User application data buffer size
00130  */
00131 #define LORAWAN_APP_DATA_SIZE                       2
00132 
00133 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
00134 
00135 #elif ( LORAWAN_APP_PORT == 13 )
00136 /*====================================================
00137                 SENET MYDEVICES SENSOR DEMO (PORT 13)
00138 ====================================================*/
00139 
00140 /*!
00141  * User application data buffer size
00142  */
00143 #define LORAWAN_APP_DATA_SIZE                       11
00144 
00145 #define BAT_VAL_PERCENT
00146 
00147 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
00148 
00149 
00150 #endif
00151 
00152 #endif //  __LORA_CONFIG_H__