Long Range / Mbed 2 deprecated SX1272_LoRaWAN_App_LR

Dependencies:   X_NUCLEO_IKS01A2 driver_mbed_TH02 mbed LoRaWAN-lib-v1_0_1 SX1272Lib

Fork of Training-Aug2018-SX1272-X-NUCLEO-IKS01A2 by Uttam Bhat

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 #else
00032 
00033 // define channel block: e.g. USE_BAND_915_HYBRID_BLOCK_A, USE_BAND_915_HYBRID_BLOCK_B ... USE_BAND_915_HYBRID_BLOCK_H etc.
00034 #define USE_BAND_915_HYBRID_BLOCK_A
00035 
00036 #endif
00037 
00038 /*!
00039  * Join requests trials periodicity. It is the time between RX1/RX2 and next TX
00040  */
00041 #define OVER_THE_AIR_ACTIVATION_DUTYCYCLE           5000000  // value in us
00042 
00043 /*!
00044  * Defines the application data transmission periodicity. It is the time between RX1/RX2 and next TX
00045  */
00046 #define APP_TX_DUTYCYCLE                            6000000  // value in us
00047 
00048 /*!
00049  * Defines the randomness in the dutycycle. 
00050  */
00051 #define APP_TX_DUTYCYCLE_RND                        3000000
00052 
00053 /*!
00054  * LoRaWAN confirmed messages
00055  * \remark 1 : Confirmed messages enabled. Must receive ACK from network server
00056            0 : Confirmed messages disabled. 
00057  */
00058 #define LORAWAN_CONFIRMED_MSG_ON                    0
00059 
00060 /*!
00061  * LoRaWAN Adaptive Data Rate
00062  *
00063  * \remark Please note that when ADR is enabled the end-device uses default datarate of DR_0
00064  */
00065 #define LORAWAN_ADR_ON                              0
00066 
00067 /*!
00068  * Default mote datarate
00069  * \remark DR_0 : 980 bps; DR_1 : 1760 bps; DR_2 : 3125 bps; DR_3 : 5470 bps; DR_4 : 12500 bps
00070  */
00071 #define LORAWAN_DEFAULT_DATARATE                    DR_0
00072 
00073 /*!
00074  * LoRaWAN application port
00075  */
00076 #define LORAWAN_APP_PORT                            5
00077 
00078 /*!
00079  * LoRaWAN User defined Tx Power
00080  *
00081  * \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 }
00082  */
00083 #define LORAWAN_TX_POWER                            TX_POWER_10_DBM
00084 
00085 #if ( LORAWAN_APP_PORT == 5 )
00086 /*====================================================
00087             US01 GPS APPLICATION DEMO (PORT 5)
00088 ====================================================*/
00089 
00090 /*!
00091  * User application data buffer size
00092  */
00093 #define LORAWAN_APP_DATA_SIZE                       11
00094 
00095 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
00096 
00097 #elif ( LORAWAN_APP_PORT == 8 )
00098 /*====================================================
00099                 IKS01A1 SENSOR DATA (PORT 8)
00100 ====================================================*/
00101 
00102 #define USE_IKS01A1_SENSOR
00103 /*!
00104  * User application data buffer size
00105  */
00106 #define LORAWAN_APP_DATA_SIZE                       11
00107 
00108 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
00109 
00110 #elif ( LORAWAN_APP_PORT == 9 )
00111 /*====================================================
00112     IKS01A1 SENSOR DATA (PORT 9) + CAYENNE LPP
00113 ====================================================*/
00114 
00115 #define USE_IKS01A1_SENSOR
00116 
00117 #define USE_CAYENNE_LPP
00118 /*!
00119  * User application data buffer size
00120  */
00121 #define LORAWAN_APP_DATA_SIZE                       11
00122 
00123 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
00124 
00125 #elif ( LORAWAN_APP_PORT == 11 )
00126 /*====================================================
00127                 PUSH BUTTON DEMO (PORT 11)
00128 ====================================================*/
00129 
00130 /*!
00131  * User application data buffer size
00132  */
00133 #define LORAWAN_APP_DATA_SIZE                       3
00134 
00135 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
00136 
00137 #elif ( LORAWAN_APP_PORT == 12 )
00138 /*====================================================
00139                 GROVE SENSOR DEMO (PORT 11)
00140 ====================================================*/
00141 
00142 #define USE_GROVE_SENSOR
00143 
00144 #define USE_CAYENNE_LPP
00145 
00146 /*!
00147  * User application data buffer size
00148  */
00149 #define LORAWAN_APP_DATA_SIZE                       7
00150 
00151 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
00152 
00153 #endif
00154 
00155 #endif //  __LORA_CONFIG_H__