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

WiMOD_SAP_RadioLink_ProLink_IDs.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
31 //------------------------------------------------------------------------------
32
33
34 /*
35 * THIS IS AN EXAMPLE IMPLEMENTATION ACCORDING THE THE HCI SPEC: V1.3
36 * FOR FIRMWARE: LoRaWAN PROLINK
37 *
38 * SEE FILE: ProLink_LoRaWAN_EndNode_Modem_HCI_Spec_v1_3.pdf for detailed information
39 */
40
41
42 #ifndef ARDUINO_SAP_WIMOD_SAP_RADIOLINK_PROLINK_IDS_H_
43 #define ARDUINO_SAP_WIMOD_SAP_RADIOLINK_PROLINK_IDS_H_
44
45 #include "utils/WMDefs.h"
46
47 #include "WiMOD_SAP_LORAWAN_IDs_EU868.h" /* Europe */
48 //#include "WiMOD_SAP_LORAWAN_IDs_IN865.h" /* India */
49 #include "WiMOD_SAP_LORAWAN_IDs_US915.h" /* US */
50 #include "WIMOD_SAP_LORAWAN_IDs_AU915.h" /* Australia */
51 #include "WiMOD_SAP_LORAWAN_IDs_AS923.h" /* Asia/Pacific */
52 //#include "WiMOD_SAP_LORAWAN_IDs_RU868.h" /* Russia */
53
54 //------------------------------------------------------------------------------
55 //
56 // Service Access Point Identifier
57 //
58 //------------------------------------------------------------------------------
59
61 #define PROLINK_RADIOLINK_SAP_ID 0x03
62
63
65
66 // Status Codes
67 #define PROLINK_RADIOLINK_STATUS_OK 0x00 //Operation successful
68 #define PROLINK_RADIOLINK_STATUS_ERROR 0x01 //Operation failed
69 #define PROLINK_RADIOLINK_STATUS_CMD_NOT_SUPPORTED 0x02 //Command is not supported
70 #define PROLINK_RADIOLINK_STATUS_WRONG_PARAMETER 0x03 //HCI message contains wrong parameter
71 #define PROLINK_RADIOLINK_STATUS_WRONG_RADIO_MODE 0x04 //Stack is running in a wrong mode
72 #define PROLINK_RADIOLINK_STATUS_BUFFER_FULL 0x07 //Message queue is full, command rejected
73 #define PROLINK_RADIOLINK_STATUS_LENGTH_ERROR 0x08 //HCI message length is invalid or radio payload size is too large
74
76
77
78
79
80 // Message IDs
81 #define PROLINK_RADIOLINK_MSG_SEND_U_DATA_REQ 0x01
82 #define PROLINK_RADIOLINK_MSG_SEND_U_DATA_RSP 0x02
83
84 #define PROLINK_RADIOLINK_MSG_U_DATA_RX_IND 0x04
85 #define PROLINK_RADIOLINK_MSG_U_DATA_TX_IND 0x06
86
87 #define PROLINK_RADIOLINK_MSG_SET_RADIO_CFG_REQ 0x17
88 #define PROLINK_RADIOLINK_MSG_SET_RADIO_CFG_RSP 0x18
89
90 #define PROLINK_RADIOLINK_MSG_GET_RADIO_CFG_REQ 0x19
91 #define PROLINK_RADIOLINK_MSG_GET_RADIO_CFG_RSP 0x1A
92
93 #define PROLINK_RADIOLINK_MSG_RESET_RADIO_CFG_REQ 0x1B
94 #define PROLINK_RADIOLINK_MSG_RESET_RADIO_CFG_RSP 0x1C
95
96 #define PROLINK_RADIOLINK_MSG_SET_AES_KEY_REQ 0x21
97 #define PROLINK_RADIOLINK_MSG_SET_AES_KEY_RSP 0x22
98
99 #define PROLINK_RADIOLINK_MSG_GET_AES_KEY_REQ 0x23
100 #define PROLINK_RADIOLINK_MSG_GET_AES_KEY_RSP 0x24
101
102
103
107 typedef enum TRadioCfg_RadioModeProLink
108 {
109 ProLinkRadioMode_Standard = 0,
110 ProLinkRadioMode_Reserved,
111 } TRadioCfg_RadioModeProLink;
112
116 typedef enum TRadioCfg_ModulationProLink
117 {
118 ProLinkModulation_LoRa = 0,
119 ProLinkModulation_FSK,
120 } TRadioCfg_ModulationProLink;
121
122
126 typedef enum TRadioCfg_LoRaBandwidthProLink
127 {
128 ProLinkLoRaBandwith_125kHz = 0,
129 ProLinkLoRaBandwith_250kHz,
130 ProLinkLoRaBandwith_500kHz
131 } TRadioCfg_LoRaBandwidthProLink;
132
136 typedef enum TRadioCfg_LoRaSpreadingFactorProLink
137 {
138 ProLinkLoRa0_SF7 = 0,
139 ProLinkLoRa1_SF7,
140 ProLinkLoRa2_SF7,
141 ProLinkLoRa3_SF7,
142 ProLinkLoRa4_SF7,
143 ProLinkLoRa5_SF7,
144 ProLinkLoRa6_SF7,
145 ProLinkLoRa7_SF7,
146 ProLinkLoRa8_SF8,
147 ProLinkLoRa9_SF9,
148 ProLinkLoRa10_SF10,
149 ProLinkLoRa11_SF11,
150 ProLinkLoRa12_SF12,
151 } TRadioCfg_LoRaSpreadingFactorProLink;
152
153
157 typedef enum TRadioCfg_ErrorCodingProLink
158 {
159 ProLinkErrorCoding0_4_5 = 0,
160 ProLinkErrorCoding1_4_5,
161 ProLinkErrorCoding2_4_6,
162 ProLinkErrorCoding3_4_7,
163 ProLinkErrorCoding4_4_8,
164 } TRadioCfg_ErrorCodingProLink;
165
169 typedef enum TRadioCfg_TxPowerLevelProLink
170 {
171 ProLinkTxPowerLevel0_5_dBm = 0,
172 ProLinkTxPowerLevel1_5_dBm = 1,
173 ProLinkTxPowerLevel2_5_dBm = 2,
174 ProLinkTxPowerLevel3_5_dBm = 3,
175 ProLinkTxPowerLevel4_5_dBm = 4,
176 ProLinkTxPowerLevel5_5_dBm = 5,
177 ProLinkTxPowerLevel6_6_dBm,
178 ProLinkTxPowerLevel7_7_dBm,
179 ProLinkTxPowerLevel8_8_dBm,
180 ProLinkTxPowerLevel9_9_dBm,
181 ProLinkTxPowerLevel10_10_dBm,
182 ProLinkTxPowerLevel11_11_dBm,
183 ProLinkTxPowerLevel12_12_dBm,
184 ProLinkTxPowerLevel13_13_dBm,
185 ProLinkTxPowerLevel14_14_dBm,
186 ProLinkTxPowerLevel15_15_dBm,
187 ProLinkTxPowerLevel16_16_dBm,
188 ProLinkTxPowerLevel17_17_dBm,
189 ProLinkTxPowerLevel18_18_dBm,
190 ProLinkTxPowerLevel19_19_dBm,
191 ProLinkTxPowerLevel20_20_dBm,
192 } TRadioCfg_TxPowerLevelProLink;
193
194
198 typedef enum TRadioCfg_RxControlProLink
199 {
200 ProLinkRxCtrl_Receiver_Off = 0,
201 ProLinkRxCtrl_Receiver_AlwaysOn,
202 ProLinkRxCtrl_Receiver_RxWindowed,
203 } TRadioCfg_RxControlProLink;
204
205
206 // bit field for Misc.Options in RadioConfig structure
207 #define PROLINK_RADIOLINK_RADIO_CFG_MISC_EXTENDED_HCI_OUTPUT_FORMAT (1 << 0)
208 #define PROLINK_RADIOLINK_RADIO_CFG_MISC_HCI_TX_IND_ENABLED (1 << 2)
209 #define PROLINK_RADIOLINK_RADIO_CFG_MISC_HCI_ENCTRYPTION_ENABLED (1 << 5)
210
212
216 typedef enum TRadioCfg_FskDatarateProLink
217 {
218 ProLinkFskDatarate_50kbps = 0,
219 } TRadioCfg_FskDatarateProLink;
220
221 //------------------------------------------------------------------------------
222
226 typedef struct TWiMODLR_ProLinkRadioLink_RadioConfig
227 {
228 // only for reading
229 UINT8 Status;
231 // only for writing
232 UINT8 StoreNwmFlag;
234 TRadioCfg_RadioModeProLink RadioMode;
235 UINT8 GroupAddress;
237 UINT16 DeviceAddress;
239 TRadioCfg_ModulationProLink Modulation;
240 UINT8 RfFreq_LSB;
241 UINT8 RfFreq_MID;
242 UINT8 RfFreq_MSB;
243 TRadioCfg_LoRaBandwidthProLink LoRaBandWidth;
244 TRadioCfg_LoRaSpreadingFactorProLink LoRaSpreadingFactor;
245 TRadioCfg_ErrorCodingProLink ErrorCoding;
246 TRadioCfg_TxPowerLevelProLink PowerLevel;
248 TRadioCfg_RxControlProLink RxControl;
249 UINT16 RxWindowTime;
251 UINT8 MiscOptions;
252 TRadioCfg_FskDatarateProLink FskDatarate;
254 } TWiMODLR_ProLinkRadioLink_RadioConfig;
255
256
257 //------------------------------------------------------------------------------
258 //
259 // misc. defines
260 //
261 //------------------------------------------------------------------------------
263
264 #define PROLINK_RADIOLINK_AES_KEY_LEN 16 // 128 bit
265
267
268
269 #endif /* ARDUINO_SAP_WIMOD_SAP_RADIOLINK_PROLINK_IDS_H_ */
ProLinkTxPowerLevel3_5_dBm
@ ProLinkTxPowerLevel3_5_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:174
TRadioCfg_ModulationProLink
TRadioCfg_ModulationProLink
Modulation technique supported by the WiMOD only for LR-BASE mode in ProLink.
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:116
TWiMODLR_ProLinkRadioLink_RadioConfig::RadioMode
TRadioCfg_RadioModeProLink RadioMode
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:234
TWiMODLR_ProLinkRadioLink_RadioConfig::DeviceAddress
UINT16 DeviceAddress
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:237
ProLinkTxPowerLevel13_13_dBm
@ ProLinkTxPowerLevel13_13_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:184
ProLinkTxPowerLevel14_14_dBm
@ ProLinkTxPowerLevel14_14_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:185
ProLinkLoRa10_SF10
@ ProLinkLoRa10_SF10
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:148
ProLinkRadioMode_Standard
@ ProLinkRadioMode_Standard
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:109
TRadioCfg_FskDatarateProLink
TRadioCfg_FskDatarateProLink
Settings for the FSK data rate only for LR-BASE mode in ProLink.
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:216
ProLinkErrorCoding1_4_5
@ ProLinkErrorCoding1_4_5
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:160
TWiMODLR_ProLinkRadioLink_RadioConfig::FskDatarate
TRadioCfg_FskDatarateProLink FskDatarate
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:252
ProLinkLoRa1_SF7
@ ProLinkLoRa1_SF7
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:139
ProLinkTxPowerLevel0_5_dBm
@ ProLinkTxPowerLevel0_5_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:171
ProLinkTxPowerLevel17_17_dBm
@ ProLinkTxPowerLevel17_17_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:188
ProLinkTxPowerLevel16_16_dBm
@ ProLinkTxPowerLevel16_16_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:187
ProLinkTxPowerLevel20_20_dBm
@ ProLinkTxPowerLevel20_20_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:191
ProLinkRxCtrl_Receiver_AlwaysOn
@ ProLinkRxCtrl_Receiver_AlwaysOn
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:201
ProLinkLoRa0_SF7
@ ProLinkLoRa0_SF7
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:138
ProLinkFskDatarate_50kbps
@ ProLinkFskDatarate_50kbps
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:218
TWiMODLR_ProLinkRadioLink_RadioConfig::RxWindowTime
UINT16 RxWindowTime
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:249
ProLinkRadioMode_Reserved
@ ProLinkRadioMode_Reserved
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:110
TRadioCfg_LoRaBandwidthProLink
TRadioCfg_LoRaBandwidthProLink
Bandwidth settings for the LoRa modulation only for LR-BASE mode in ProLink.
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:126
TWiMODLR_ProLinkRadioLink_RadioConfig::StoreNwmFlag
UINT8 StoreNwmFlag
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:232
TRadioCfg_RxControlProLink
TRadioCfg_RxControlProLink
RX Operation modes only for LR-BASE mode in ProLink.
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:198
ProLinkErrorCoding4_4_8
@ ProLinkErrorCoding4_4_8
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:163
ProLinkErrorCoding3_4_7
@ ProLinkErrorCoding3_4_7
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:162
TWiMODLR_ProLinkRadioLink_RadioConfig::PowerLevel
TRadioCfg_TxPowerLevelProLink PowerLevel
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:246
TWiMODLR_ProLinkRadioLink_RadioConfig::GroupAddress
UINT8 GroupAddress
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:235
TWiMODLR_ProLinkRadioLink_RadioConfig::MiscOptions
UINT8 MiscOptions
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:251
TRadioCfg_LoRaSpreadingFactorProLink
TRadioCfg_LoRaSpreadingFactorProLink
SpreadingFactors for LoRa modulation only for LR-BASE mode in ProLink.
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:136
WiMOD_SAP_LORAWAN_IDs_AS923.h
ProLinkTxPowerLevel6_6_dBm
@ ProLinkTxPowerLevel6_6_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:177
ProLinkTxPowerLevel4_5_dBm
@ ProLinkTxPowerLevel4_5_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:175
TRadioCfg_TxPowerLevelProLink
TRadioCfg_TxPowerLevelProLink
TxPowerLevel settings only for LR-BASE mode in ProLink.
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:169
TWiMODLR_ProLinkRadioLink_RadioConfig::RfFreq_MID
UINT8 RfFreq_MID
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:241
ProLinkLoRaBandwith_125kHz
@ ProLinkLoRaBandwith_125kHz
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:128
ProLinkRxCtrl_Receiver_RxWindowed
@ ProLinkRxCtrl_Receiver_RxWindowed
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:202
TWiMODLR_ProLinkRadioLink_RadioConfig
struct TWiMODLR_ProLinkRadioLink_RadioConfig TWiMODLR_ProLinkRadioLink_RadioConfig
Structure containing the radio (stack) config parameters of the proprietary LR-BASE stack (only for P...
TWiMODLR_ProLinkRadioLink_RadioConfig::Status
UINT8 Status
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:229
ProLinkLoRaBandwith_500kHz
@ ProLinkLoRaBandwith_500kHz
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:130
ProLinkTxPowerLevel1_5_dBm
@ ProLinkTxPowerLevel1_5_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:172
ProLinkLoRa9_SF9
@ ProLinkLoRa9_SF9
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:147
ProLinkTxPowerLevel10_10_dBm
@ ProLinkTxPowerLevel10_10_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:181
WiMOD_SAP_LORAWAN_IDs_EU868.h
ProLinkTxPowerLevel5_5_dBm
@ ProLinkTxPowerLevel5_5_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:176
ProLinkTxPowerLevel9_9_dBm
@ ProLinkTxPowerLevel9_9_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:180
ProLinkModulation_FSK
@ ProLinkModulation_FSK
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:119
ProLinkTxPowerLevel15_15_dBm
@ ProLinkTxPowerLevel15_15_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:186
TRadioCfg_RadioModeProLink
TRadioCfg_RadioModeProLink
general operation mode of the radio part only for LR-BASE mode in ProLink
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:107
TWiMODLR_ProLinkRadioLink_RadioConfig::LoRaSpreadingFactor
TRadioCfg_LoRaSpreadingFactorProLink LoRaSpreadingFactor
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:244
ProLinkTxPowerLevel18_18_dBm
@ ProLinkTxPowerLevel18_18_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:189
TWiMODLR_ProLinkRadioLink_RadioConfig::Modulation
TRadioCfg_ModulationProLink Modulation
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:239
ProLinkModulation_LoRa
@ ProLinkModulation_LoRa
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:118
ProLinkErrorCoding0_4_5
@ ProLinkErrorCoding0_4_5
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:159
ProLinkTxPowerLevel2_5_dBm
@ ProLinkTxPowerLevel2_5_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:173
ProLinkErrorCoding2_4_6
@ ProLinkErrorCoding2_4_6
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:161
ProLinkLoRaBandwith_250kHz
@ ProLinkLoRaBandwith_250kHz
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:129
ProLinkLoRa12_SF12
@ ProLinkLoRa12_SF12
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:150
ProLinkLoRa2_SF7
@ ProLinkLoRa2_SF7
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:140
ProLinkTxPowerLevel7_7_dBm
@ ProLinkTxPowerLevel7_7_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:178
WiMOD_SAP_LORAWAN_IDs_US915.h
ProLinkTxPowerLevel11_11_dBm
@ ProLinkTxPowerLevel11_11_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:182
ProLinkLoRa3_SF7
@ ProLinkLoRa3_SF7
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:141
ProLinkLoRa11_SF11
@ ProLinkLoRa11_SF11
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:149
TWiMODLR_ProLinkRadioLink_RadioConfig::RxControl
TRadioCfg_RxControlProLink RxControl
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:248
ProLinkLoRa4_SF7
@ ProLinkLoRa4_SF7
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:142
TRadioCfg_ErrorCodingProLink
TRadioCfg_ErrorCodingProLink
ErrorCoding settings (for LoRa modulation) only for LR-BASE mode in ProLink.
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:157
ProLinkTxPowerLevel19_19_dBm
@ ProLinkTxPowerLevel19_19_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:190
ProLinkRxCtrl_Receiver_Off
@ ProLinkRxCtrl_Receiver_Off
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:200
TWiMODLR_ProLinkRadioLink_RadioConfig::LoRaBandWidth
TRadioCfg_LoRaBandwidthProLink LoRaBandWidth
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:243
ProLinkLoRa7_SF7
@ ProLinkLoRa7_SF7
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:145
ProLinkLoRa8_SF8
@ ProLinkLoRa8_SF8
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:146
ProLinkTxPowerLevel8_8_dBm
@ ProLinkTxPowerLevel8_8_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:179
TWiMODLR_ProLinkRadioLink_RadioConfig::RfFreq_MSB
UINT8 RfFreq_MSB
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:242
TWiMODLR_ProLinkRadioLink_RadioConfig::ErrorCoding
TRadioCfg_ErrorCodingProLink ErrorCoding
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:245
ProLinkLoRa6_SF7
@ ProLinkLoRa6_SF7
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:144
ProLinkTxPowerLevel12_12_dBm
@ ProLinkTxPowerLevel12_12_dBm
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:183
TWiMODLR_ProLinkRadioLink_RadioConfig
Structure containing the radio (stack) config parameters of the proprietary LR-BASE stack (only for P...
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:226
ProLinkLoRa5_SF7
@ ProLinkLoRa5_SF7
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:143
TWiMODLR_ProLinkRadioLink_RadioConfig::RfFreq_LSB
UINT8 RfFreq_LSB
Definition: WiMOD_SAP_RadioLink_ProLink_IDs.h:240