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 
108 {
112 
117 {
121 
122 
127 {
132 
137 {
152 
153 
158 {
165 
170 {
193 
194 
199 {
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 
217 {
220 
221 //------------------------------------------------------------------------------
222 
227 {
228  // only for reading
229  UINT8 Status;
231  // only for writing
232  UINT8 StoreNwmFlag;
235  UINT8 GroupAddress;
237  UINT16 DeviceAddress;
240  UINT8 RfFreq_LSB;
241  UINT8 RfFreq_MID;
242  UINT8 RfFreq_MSB;
249  UINT16 RxWindowTime;
251  UINT8 MiscOptions;
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_ */
WiMOD_SAP_LORAWAN_IDs_AS923.h
WiMOD_SAP_LORAWAN_IDs_EU868.h
WiMOD_SAP_LORAWAN_IDs_US915.h