| Demo HCI Implementation for WiMOD-LR Devices V2.0.3

WiMOD_SAP_LORAWAN_IDs_AS923.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
6
32 //------------------------------------------------------------------------------
33
34
35 /*
36 * THIS IS AN EXAMPLE IMPLEMENTATION ACCORDING THE THE HCI SPEC:
37 * ProLink_LoRaWAN_EndNode_Modem_Region_AU915_HCI_Spec.pdf
38 *
39 * see ProLink_LoRaWAN_EndNode_Modem_Region_AU915_HCI_Spec.pdf
40 * for detailed information
41 *
42 * Reference: RP002-1.0.1 LoRaWAN Regional Parameters document (LoRa Alliance)
43 *
44 */
45
46
47
48 #ifndef ARDUINO_SAP_WIMOD_SAP_LORAWAN_IDS_AS923_H_
49 #define ARDUINO_SAP_WIMOD_SAP_LORAWAN_IDS_AS923_H_
50 //------------------------------------------------------------------------------
51 //
52 // Section Includes Files
53 //
54 //------------------------------------------------------------------------------
55
57
58 #define WIMOD_LORAWAN_AS923
59
60
61
62 // LoRa Radio Band Index
63 //#define LORAWAN_BAND_NZ_865 4 // @deprecated removed in HCI spec V1_15
64 //#define LORAWAN_BAND_SG_923 5 // @deprecated removed in HCI spec V1_15
65
66 /*
67 * deprecated definitions
68 */
69 #define LORAWAN_BAND_AS_923_BN_923 10 // Brunei @deprecated
70 #define LORAWAN_BAND_AS_923_KH_923 11 // Cambodia @deprecated
71 #define LORAWAN_BAND_AS_923_ID_923 12 // Indonesiae @deprecated
72 #define LORAWAN_BAND_AS_923_JP_920 13 // Japan @deprecated
73 #define LORAWAN_BAND_AS_923_LA_920 14 // Laos @deprecated
74 #define LORAWAN_BAND_AS_923_LA_915 15 // New Zealand @deprecated
75 #define LORAWAN_BAND_AS_923_SG_920 16 // Singapore @deprecated
76 #define LORAWAN_BAND_AS_923_TW_922 17 // Taiwan @deprecated
77 #define LORAWAN_BAND_AS_923_TH_920 18 // Thailand @deprecated
78 #define LORAWAN_BAND_AS_923_VN_920 19 // Vietnam @deprecated
79
80 /*
81 * new definitions according to RP002-1.0.1 LoRaWAN Regional Parameters document (LoRa Alliance)
82 */
83 #define LORAWAN_BAND_AS_923_1 10
84 #define LORAWAN_BAND_AS_923_2 11
85 #define LORAWAN_BAND_AS_923_3 12
86
87
88 // LoRa Data Rate Index
89
90 #define LORAWAN_DATA_RATE_AS923_LORA_SF12_125KHZ 0
91 #define LORAWAN_DATA_RATE_AS923_LORA_SF11_125KHZ 1
92 #define LORAWAN_DATA_RATE_AS923_LORA_SF10_125KHZ 2
93 #define LORAWAN_DATA_RATE_AS923_LORA_SF9_125KHZ 3
94 #define LORAWAN_DATA_RATE_AS923_LORA_SF8_125KHZ 4
95 #define LORAWAN_DATA_RATE_AS923_LORA_SF7_125KHZ 5
96 #define LORAWAN_DATA_RATE_AS923_LORA_SF7_250KHZ 6
97 #define LORAWAN_DATA_RATE_AS923_LORA_FSK 7
98
99 #define IS_LORAWAN_AS923_DATA_RATE(x) ( ((x) >= LORAWAN_DATA_RATE_AS923_LORA_SF12_125KHZ) && \
100 ((x) <= LORAWAN_DATA_RATE_AS923_LORA_FSK) )
101
102
103
105
110 typedef enum TLoRaWANDataRateAS923
111 {
112 LoRaWAN_DataRate_AS923_LoRa_SF12_125kHz = 0,
113 LoRaWAN_DataRate_AS923_LoRa_SF11_125kHz,
114 LoRaWAN_DataRate_AS923_LoRa_SF10_125kHz,
115 LoRaWAN_DataRate_AS923_LoRa_SF9_125kHz,
116 LoRaWAN_DataRate_AS923_LoRa_SF8_125kHz,
117 LoRaWAN_DataRate_AS923_LoRa_SF7_125kHz,
118 LoRaWAN_DataRate_AS923_LoRa_SF7_250kHz,
119 LoRaWAN_DataRate_AS923_LoRa_FSK,
120 } TLoRaWANDataRateAS923;
121
122
123
125
126 // @deprecated removed in HCI spec V1_15
127
129 //
130 //#define LORAWAN_CH_NZ_865_0_MHZ 0
131 //#define LORAWAN_CH_NZ_865_2_MHZ 1
132 //#define LORAWAN_CH_NZ_865_4_MHZ 2
133 //#define LORAWAN_CH_NZ_866_2_MHZ 3
134 //#define LORAWAN_CH_NZ_866_4_MHZ 4
135 //#define LORAWAN_CH_NZ_866_6_MHZ 5
136 //#define LORAWAN_CH_NZ_866_8_MHZ 6
137 //#define LORAWAN_CH_NZ_867_0_MHZ 7
138 //#define LORAWAN_CH_NZ_865_6_MHZ 8
139 //#define LORAWAN_CH_NZ_865_9_MHZ 9
140 //#define LORAWAN_CH_NZ_867_2_MHZ 128
141 //
142 /*
143 //#define IS_LORAWAN_CH_NZ(x) ( ((x) == LORAWAN_CH_NZ_865_0_MHZ) || \
144 // ((x) == LORAWAN_CH_NZ_865_2_MHZ) || \
145 // ((x) == LORAWAN_CH_NZ_865_4_MHZ) || \
146 // ((x) == LORAWAN_CH_NZ_866_2_MHZ) || \
147 // ((x) == LORAWAN_CH_NZ_866_4_MHZ) || \
148 // ((x) == LORAWAN_CH_NZ_865_4_MHZ) || \
149 // ((x) == LORAWAN_CH_NZ_866_6_MHZ) || \
150 // ((x) == LORAWAN_CH_NZ_867_0_MHZ) || \
151 // ((x) == LORAWAN_CH_NZ_865_6_MHZ) || \
152 // ((x) == LORAWAN_CH_NZ_865_9_MHZ) || \
153 // ((x) == LORAWAN_CH_NZ_867_2_MHZ) )
154 */
155 //
157
158 // @deprecated removed in HCI spec V1_15
160 // * @brief Channel definition for New Zealand
161 // */
162 //typedef enum TLoRaWAN_Channel_NewZealand
163 //{
164 // LoRaWAN_Channel_NewZealand_865_0_Mhz = 0, /*!< carrier frequency of 865.000 MHz */
165 // LoRaWAN_Channel_NewZealand_865_2_Mhz = 1, /*!< carrier frequency of 866.200 MHz */
166 // LoRaWAN_Channel_NewZealand_865_4_Mhz = 2, /*!< carrier frequency of 865.400 MHz */
167 // LoRaWAN_Channel_NewZealand_866_2_Mhz = 3, /*!< carrier frequency of 866.200 MHz */
168 // LoRaWAN_Channel_NewZealand_866_4_Mhz = 4, /*!< carrier frequency of 866.400 MHz */
169 // LoRaWAN_Channel_NewZealand_866_6_Mhz = 5, /*!< carrier frequency of 866.600 MHz */
170 // LoRaWAN_Channel_NewZealand_866_8_Mhz = 6, /*!< carrier frequency of 866.800 MHz */
171 // LoRaWAN_Channel_NewZealand_867_0_Mhz = 7, /*!< carrier frequency of 867.000 MHz */
172 // LoRaWAN_Channel_NewZealand_865_6_Mhz = 8, /*!< carrier frequency of 865.600 MHz */
173 // LoRaWAN_Channel_NewZealand_865_9_Mhz = 9, /*!< carrier frequency of 865.900 MHz */
174 // LoRaWAN_Channel_NewZealand_867_2_Mhz = 128, /*!< carrier frequency of 867.200 MHz */
175 //} TLoRaWAN_Channel_NewZealand;
176
177
179
180 // @deprecated removed in HCI spec V1_15
182 //
183 //#define LORAWAN_CH_SG_923_5_MHZ 0
184 //#define LORAWAN_CH_SG_923_7_MHZ 1
185 //#define LORAWAN_CH_SG_923_9_MHZ 2
186 //#define LORAWAN_CH_SG_924_1_MHZ 3
187 //#define LORAWAN_CH_SG_924_3_MHZ 4
188 //#define LORAWAN_CH_SG_924_5_MHZ 5
189 //#define LORAWAN_CH_SG_924_7_MHZ 6
190 //#define LORAWAN_CH_SG_924_9_MHZ 7
191 //#define LORAWAN_CH_SG_923_8_MHZ 8
192 //#define LORAWAN_CH_SG_922_5_MHZ 128
193 //
194 /*
195 //#define IS_LORAWAN_CH_SG(x) ( ((x) == LORAWAN_CH_SG_923_5_MHZ) || \
196 // ((x) == LORAWAN_CH_SG_923_7_MHZ) || \
197 // ((x) == LORAWAN_CH_SG_923_9_MHZ) || \
198 // ((x) == LORAWAN_CH_SG_924_1_MHZ) || \
199 // ((x) == LORAWAN_CH_SG_924_3_MHZ) || \
200 // ((x) == LORAWAN_CH_SG_924_5_MHZ) || \
201 // ((x) == LORAWAN_CH_SG_924_7_MHZ) || \
202 // ((x) == LORAWAN_CH_SG_924_9_MHZ) || \
203 // ((x) == LORAWAN_CH_SG_923_8_MHZ) || \
204 // ((x) == LORAWAN_CH_SG_922_5_MHZ) )
205 */
207
208 // @deprecated removed in HCI spec V1_15
210 // * @brief Channel definition for Singapore
211 // */
212 //typedef enum TLoRaWAN_Channel_Singapore
213 //{
214 // LoRaWAN_Channel_Singapore_923_5_Mhz = 0, /*!< carrier frequency of 923.500 MHz */
215 // LoRaWAN_Channel_Singapore_923_7_Mhz = 1, /*!< carrier frequency of 823.700 MHz */
216 // LoRaWAN_Channel_Singapore_923_9_Mhz = 2, /*!< carrier frequency of 923.900 MHz */
217 // LoRaWAN_Channel_Singapore_924_1_Mhz = 3, /*!< carrier frequency of 924.100 MHz */
218 // LoRaWAN_Channel_Singapore_924_3_Mhz = 4, /*!< carrier frequency of 924.300 MHz */
219 // LoRaWAN_Channel_Singapore_924_5_Mhz = 5, /*!< carrier frequency of 924.500 MHz */
220 // LoRaWAN_Channel_Singapore_924_7_Mhz = 6, /*!< carrier frequency of 924.700 MHz */
221 // LoRaWAN_Channel_Singapore_924_9_Mhz = 7, /*!< carrier frequency of 924.900 MHz */
222 // LoRaWAN_Channel_Singapore_923_8_Mhz = 8, /*!< carrier frequency of 923.800 MHz */
223 // LoRaWAN_Channel_Singapore_922_5_Mhz = 128, /*!< carrier frequency of 922.500 MHz */
224 //} TLoRaWAN_Channel_Singapore;
225 //
226
227
229
230
232
233 // LoRa Channel Index ( AS923 )
234
235 #define LORAWAN_CH_AS_923_2_MHZ 0
236 #define LORAWAN_CH_AS_923_4_MHZ 1
237 #define LORAWAN_CH_AS_923_2_MHZ_2 128
238
239 #define IS_LORAWAN_CH_AS(x) ( ((x) == LORAWAN_CH_AS_923_2_MHZ) || \
240 ((x) == LORAWAN_CH_AS_923_4_MHZ) || \
241 ((x) == LORAWAN_CH_AS_923_2_MHZ_2) )
242
244
245
246
247
251 typedef enum TLoRaWAN_Channel_AS_1
252 {
253 LoRaWAN_Channel_AS_923_2_Mhz = 0,
254 LoRaWAN_Channel_AS_923_4_Mhz = 1,
255 LoRaWAN_Channel_AS_923_2_Mhz_2 = 128,
256 } TLoRaWAN_Channel_AS_1;
257
258
262 typedef enum TLoRaWAN_Channel_AS_2
263 {
264 LoRaWAN_Channel_AS_921_4_Mhz = 0,
265 LoRaWAN_Channel_AS_921_6_Mhz = 1,
266 LoRaWAN_Channel_AS_921_4_Mhz_2 = 128,
267 } TLoRaWAN_Channel_AS_2;
268
272 typedef enum TLoRaWAN_Channel_AS_3
273 {
274 LoRaWAN_Channel_AS_916_6_Mhz = 0,
275 LoRaWAN_Channel_AS_916_8_Mhz = 1,
276 LoRaWAN_Channel_AS_916_6_Mhz_2 = 128,
277 } TLoRaWAN_Channel_AS_3;
278
279
280 #endif /* ARDUINO_SAP_WIMOD_SAP_LORAWAN_IDS_AS923_H_ */
LoRaWAN_Channel_AS_916_6_Mhz_2
@ LoRaWAN_Channel_AS_916_6_Mhz_2
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:276
LoRaWAN_Channel_AS_916_6_Mhz
@ LoRaWAN_Channel_AS_916_6_Mhz
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:274
LoRaWAN_DataRate_AS923_LoRa_SF11_125kHz
@ LoRaWAN_DataRate_AS923_LoRa_SF11_125kHz
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:113
LoRaWAN_Channel_AS_923_2_Mhz_2
@ LoRaWAN_Channel_AS_923_2_Mhz_2
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:255
TLoRaWANDataRateAS923
TLoRaWANDataRateAS923
LoRa data rate definitions for Asia 923 MHz Band.
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:110
TLoRaWAN_Channel_AS_3
TLoRaWAN_Channel_AS_3
Channel definition for AS 923MHz Band 3.
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:272
LoRaWAN_DataRate_AS923_LoRa_SF10_125kHz
@ LoRaWAN_DataRate_AS923_LoRa_SF10_125kHz
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:114
LoRaWAN_Channel_AS_921_6_Mhz
@ LoRaWAN_Channel_AS_921_6_Mhz
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:265
LoRaWAN_DataRate_AS923_LoRa_FSK
@ LoRaWAN_DataRate_AS923_LoRa_FSK
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:119
LoRaWAN_DataRate_AS923_LoRa_SF9_125kHz
@ LoRaWAN_DataRate_AS923_LoRa_SF9_125kHz
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:115
TLoRaWAN_Channel_AS_2
TLoRaWAN_Channel_AS_2
Channel definition for AS 923MHz Band 2.
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:262
TLoRaWAN_Channel_AS_1
TLoRaWAN_Channel_AS_1
‍**
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:251
LoRaWAN_DataRate_AS923_LoRa_SF8_125kHz
@ LoRaWAN_DataRate_AS923_LoRa_SF8_125kHz
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:116
LoRaWAN_Channel_AS_923_4_Mhz
@ LoRaWAN_Channel_AS_923_4_Mhz
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:254
LoRaWAN_DataRate_AS923_LoRa_SF7_250kHz
@ LoRaWAN_DataRate_AS923_LoRa_SF7_250kHz
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:118
LoRaWAN_DataRate_AS923_LoRa_SF7_125kHz
@ LoRaWAN_DataRate_AS923_LoRa_SF7_125kHz
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:117
LoRaWAN_Channel_AS_916_8_Mhz
@ LoRaWAN_Channel_AS_916_8_Mhz
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:275
LoRaWAN_Channel_AS_921_4_Mhz
@ LoRaWAN_Channel_AS_921_4_Mhz
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:264
LoRaWAN_Channel_AS_921_4_Mhz_2
@ LoRaWAN_Channel_AS_921_4_Mhz_2
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:266
LoRaWAN_Channel_AS_923_2_Mhz
@ LoRaWAN_Channel_AS_923_2_Mhz
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:253
LoRaWAN_DataRate_AS923_LoRa_SF12_125kHz
@ LoRaWAN_DataRate_AS923_LoRa_SF12_125kHz
Definition: WiMOD_SAP_LORAWAN_IDs_AS923.h:112