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

WiMOD_SAP_LORAWAN_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: V2.0
36 * FOR FIRMWARE: ProLink_
37 *
38 * SEE FILE: ProLink_LoRaWAN_EndNode_Modem_HCI_Spec.pdf (version 2.0)
39 * for detailed information
40 *
41 */
42
43
44 #ifndef ARDUINO_SAP_WIMOD_SAP_LORAWAN_PROLINK_IDS_H_
45 #define ARDUINO_SAP_WIMOD_SAP_LORAWAN_PROLINK_IDS_H_
46
47 #include "utils/WMDefs.h"
48
49 #include "WiMOD_SAP_LORAWAN_IDs.h"
50
51 #include "WiMOD_SAP_LORAWAN_IDs_EU868.h" /* Europe */
52 #include "WiMOD_SAP_LORAWAN_IDs_RU868.h" /* Russia */
53 #include "WiMOD_SAP_LORAWAN_IDs_IN865.h" /* India */
54 #include "WiMOD_SAP_LORAWAN_IDs_AS923.h" /* Asia/Pacific */
55 #include "WiMOD_SAP_LORAWAN_IDs_IL915.h" /* Israel */
56 #include "WiMOD_SAP_LORAWAN_IDs_US915.h" /* US */
57 #include "WIMOD_SAP_LORAWAN_IDs_AU915.h" /* Australia */
58
63 typedef enum TProLinkLoRaWAN_FreqBand
64 {
65 ProLink_LoRaWAN_FreqBand_EU_868 = LORAWAN_BAND_EU_868,
67 ProLink_LoRaWAN_FreqBand_IN_865 = LORAWAN_BAND_IN_865,
69 ProLink_LoRaWAN_FreqBand_US_915 = LORAWAN_BAND_US_915,
71 ProLink_LoRaWAN_FreqBand_AU_915 = LORAWAN_BAND_AU_915,
73 ProLink_LoRaWAN_FreqBand_AS_923_1 = LORAWAN_BAND_AS_923_1,
74 ProLink_LoRaWAN_FreqBand_AS_923_2 = LORAWAN_BAND_AS_923_2,
75 ProLink_LoRaWAN_FreqBand_AS_923_3 = LORAWAN_BAND_AS_923_3,
77 ProLink_LoRaWAN_FreqBand_RU_868 = LORAWAN_BAND_EU_868,
80 ProLink_LoRaWAN_FreqBand_EU_868_RX2_SF9 = LORAWAN_BAND_EU_868_RX2_SF9,
81 ProLink_LoRaWAN_FreqBand_IN_865_RX2_SF8 = LORAWAN_BAND_IN_865_RX2_SF8,
83 ProLink_LoRaWAN_FreqBand_WW2G4 = GLOBALLINK24_BAND_WW_2G4,
84 ProLink_LoRaWAN_FreqBand_WW2G4_RX2 = GLOBALLINK24_BAND_WW_2G4_RX2,
85 } TProLinkLoRaWAN_FreqBand;
86
87
91 typedef struct TWiMODProLinkLORAWAN_TX_Data
92 {
93 UINT8 Port;
94 UINT8 Length;
95 UINT8 Payload[WiMODLORAWAN_APP_PAYLOAD_LEN];
96 // only for RX
97 UINT32 ChannelBlockTime;
98 } TWiMODProLinkLORAWAN_TX_Data;
99
100
104 typedef struct TWiMODLORAWAN_DevTimeReqInfo
105 {
106 // UINT8 Status;
107 UINT32 ChannelBlockTime;
108 } TWiMODLORAWAN_DevTimeReqInfo;
109
110
114 typedef struct TWiMODLORAWAN_DevTimeAnsInfo
115 {
116 UINT8 Status;
117 UINT32 GpsTime;
118 } TWiMODLORAWAN_DevTimeAnsInfo;
119
120
121 typedef struct TWiMODLORAWAN_McastConfig
122 {
123 UINT8 MulticastIndex;
124 UINT32 DeviceAddress;
126 /* only for GET-Operations */
127 UINT8 MulticastStatus;
129 /* only for SET-Operations */
130 UINT8 NwkSKey[WiMODLORAWAN_NWK_SESSION_KEY_LEN];
131 UINT8 AppSKey[WiMODLORAWAN_APP_SESSION_KEY_LEN];
132 } TWiMODLORAWAN_McastConfig;
133
134
135
139 typedef struct TWiMODLORAWAN_McastData
140 {
141 // only for RX
142 UINT8 StatusFormat;
144 UINT32 DeviceAddress;
146 UINT8 LoRaWANPort;
148 UINT8 AppPayload[WiMODLORAWAN_APP_PAYLOAD_LEN]; ;
149 UINT8 Length;
150
151 // optional - see StatusFormat code
152 UINT8 ChannelIndex;
153 UINT8 DataRateIndex;
154 INT8 RSSI;
155 INT8 SNR;
156 UINT8 RxSlot;
157 bool OptionalInfoAvaiable;
160 } TWiMODLORAWAN_McastData;
161
162
163 /* bit fields for Multicast error indications */
164 #define PROLINK_MCAST_ERR_WRONG_MTYPE (1 << 0)
165 #define PROLINK_MCAST_ERR_WRONG_DEV_ADR (1 << 1)
166 #define PROLINK_MCAST_ERR_WRONG_MIC (1 << 2)
167 #define PROLINK_MCAST_ERR_UNEXPTECTED_FCNT (1 << 3)
168 #define PROLINK_MCAST_ERR_RX_MAC_CMD (1 << 4)
169 #define PROLINK_MCAST_ERR_WRONG_DOWNLINK (1 << 5)
170 #define PROLINK_MCAST_ERR_MCAST_DOWNLINK_ERR (1 << 6)
171
172
176 typedef struct TWiMODLORAWAN_McastNoData
177 {
178 // only for RX
179 UINT8 StatusFormat;
181 UINT8 ErrorCode;
183 UINT32 DeviceAddress;
185 } TWiMODLORAWAN_McastNoData;
186
187
191 typedef struct TWiMODProLinkLORAWAN_RadioStackConfig
192 {
193 UINT8 DataRateIndex;
194 UINT8 TXPowerLevel;
195 UINT8 Options;
197 UINT8 Retransmissions;
198 UINT8 BandIndex;
199 UINT8 HeaderMacCmdCapacity;
201 // US915/AU915 Firmware only
202 UINT8 SubBandMask1;
203 UINT8 SubBandMask2;
205 // optional for SetRadioStack cmd
206 UINT8 WrongParamErrCode;
208 } TWiMODProLinkLORAWAN_RadioStackConfig;
209
210
211
212 #endif /* ARDUINO_SAP_WIMOD_SAP_LORAWAN_PROLINK_IDS_H_ */
TWiMODLORAWAN_DevTimeAnsInfo
info data structure for LoRa device time request MAC command
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:114
TWiMODLORAWAN_McastData::LoRaWANPort
UINT8 LoRaWANPort
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:146
TWiMODLORAWAN_McastNoData
Structure containing a MultiCast Data.
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:176
TWiMODProLinkLORAWAN_RadioStackConfig::SubBandMask2
UINT8 SubBandMask2
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:203
TWiMODLORAWAN_McastConfig::NwkSKey
UINT8 NwkSKey[WiMODLORAWAN_NWK_SESSION_KEY_LEN]
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:130
TWiMODProLinkLORAWAN_TX_Data::Payload
UINT8 Payload[WiMODLORAWAN_APP_PAYLOAD_LEN]
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:95
TWiMODLORAWAN_McastNoData
struct TWiMODLORAWAN_McastNoData TWiMODLORAWAN_McastNoData
Structure containing a MultiCast Data.
ProLink_LoRaWAN_FreqBand_WW2G4_RX2
@ ProLink_LoRaWAN_FreqBand_WW2G4_RX2
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:84
TWiMODLORAWAN_McastData
Structure containing a MultiCast Data.
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:139
TWiMODProLinkLORAWAN_RadioStackConfig::WrongParamErrCode
UINT8 WrongParamErrCode
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:206
TWiMODLORAWAN_McastConfig::AppSKey
UINT8 AppSKey[WiMODLORAWAN_APP_SESSION_KEY_LEN]
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:131
ProLink_LoRaWAN_FreqBand_AU_915
@ ProLink_LoRaWAN_FreqBand_AU_915
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:71
TWiMODLORAWAN_McastData::RxSlot
UINT8 RxSlot
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:156
TWiMODProLinkLORAWAN_TX_Data
struct TWiMODProLinkLORAWAN_TX_Data TWiMODProLinkLORAWAN_TX_Data
Structure containing all data necessary to transmitting a data message.
WiMOD_SAP_LORAWAN_IDs.h
TWiMODLORAWAN_McastData::DeviceAddress
UINT32 DeviceAddress
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:144
TWiMODLORAWAN_McastData::RSSI
INT8 RSSI
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:154
ProLink_LoRaWAN_FreqBand_AS_923_3
@ ProLink_LoRaWAN_FreqBand_AS_923_3
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:75
WiMOD_SAP_LORAWAN_IDs_AS923.h
TWiMODLORAWAN_DevTimeReqInfo
struct TWiMODLORAWAN_DevTimeReqInfo TWiMODLORAWAN_DevTimeReqInfo
info data structure for LoRa device time request MAC command
ProLink_LoRaWAN_FreqBand_US_915
@ ProLink_LoRaWAN_FreqBand_US_915
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:69
WiMOD_SAP_LORAWAN_IDs_IL915.h
TWiMODProLinkLORAWAN_TX_Data::Port
UINT8 Port
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:93
TWiMODLORAWAN_McastData::StatusFormat
UINT8 StatusFormat
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:142
TWiMODProLinkLORAWAN_RadioStackConfig::HeaderMacCmdCapacity
UINT8 HeaderMacCmdCapacity
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:199
TWiMODLORAWAN_McastData::DataRateIndex
UINT8 DataRateIndex
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:153
TWiMODLORAWAN_McastData
struct TWiMODLORAWAN_McastData TWiMODLORAWAN_McastData
Structure containing a MultiCast Data.
TWiMODProLinkLORAWAN_RadioStackConfig::DataRateIndex
UINT8 DataRateIndex
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:193
TWiMODLORAWAN_McastData::AppPayload
UINT8 AppPayload[WiMODLORAWAN_APP_PAYLOAD_LEN]
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:148
TWiMODLORAWAN_DevTimeAnsInfo::GpsTime
UINT32 GpsTime
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:117
ProLink_LoRaWAN_FreqBand_IN_865_RX2_SF8
@ ProLink_LoRaWAN_FreqBand_IN_865_RX2_SF8
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:81
TWiMODLORAWAN_McastNoData::StatusFormat
UINT8 StatusFormat
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:179
TWiMODProLinkLORAWAN_RadioStackConfig
Radio stack configuration related to to LoRaWAN specific options.
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:191
TWiMODProLinkLORAWAN_RadioStackConfig::BandIndex
UINT8 BandIndex
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:198
TWiMODLORAWAN_McastNoData::DeviceAddress
UINT32 DeviceAddress
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:183
TWiMODProLinkLORAWAN_TX_Data::ChannelBlockTime
UINT32 ChannelBlockTime
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:97
TWiMODLORAWAN_DevTimeReqInfo
info data structure for LoRa device time request MAC command
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:104
TWiMODLORAWAN_McastData::SNR
INT8 SNR
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:155
TWiMODProLinkLORAWAN_RadioStackConfig::TXPowerLevel
UINT8 TXPowerLevel
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:194
WiMOD_SAP_LORAWAN_IDs_EU868.h
WiMOD_SAP_LORAWAN_IDs_IN865.h
TWiMODProLinkLORAWAN_RadioStackConfig::SubBandMask1
UINT8 SubBandMask1
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:202
TWiMODProLinkLORAWAN_TX_Data
Structure containing all data necessary to transmitting a data message.
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:91
ProLink_LoRaWAN_FreqBand_AS_923_2
@ ProLink_LoRaWAN_FreqBand_AS_923_2
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:74
TWiMODProLinkLORAWAN_RadioStackConfig
struct TWiMODProLinkLORAWAN_RadioStackConfig TWiMODProLinkLORAWAN_RadioStackConfig
Radio stack configuration related to to LoRaWAN specific options.
WiMOD_SAP_LORAWAN_IDs_RU868.h
ProLink_LoRaWAN_FreqBand_AS_923_1
@ ProLink_LoRaWAN_FreqBand_AS_923_1
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:73
TWiMODProLinkLORAWAN_RadioStackConfig::Options
UINT8 Options
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:195
TWiMODLORAWAN_McastConfig
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:121
TWiMODProLinkLORAWAN_RadioStackConfig::Retransmissions
UINT8 Retransmissions
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:197
TWiMODLORAWAN_McastNoData::ErrorCode
UINT8 ErrorCode
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:181
TWiMODLORAWAN_McastData::ChannelIndex
UINT8 ChannelIndex
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:152
ProLink_LoRaWAN_FreqBand_EU_868
@ ProLink_LoRaWAN_FreqBand_EU_868
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:65
TWiMODLORAWAN_McastConfig::MulticastStatus
UINT8 MulticastStatus
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:127
ProLink_LoRaWAN_FreqBand_EU_868_RX2_SF9
@ ProLink_LoRaWAN_FreqBand_EU_868_RX2_SF9
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:80
TWiMODLORAWAN_DevTimeAnsInfo
struct TWiMODLORAWAN_DevTimeAnsInfo TWiMODLORAWAN_DevTimeAnsInfo
info data structure for LoRa device time request MAC command
ProLink_LoRaWAN_FreqBand_RU_868
@ ProLink_LoRaWAN_FreqBand_RU_868
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:77
TWiMODProLinkLORAWAN_TX_Data::Length
UINT8 Length
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:94
WiMOD_SAP_LORAWAN_IDs_US915.h
TWiMODLORAWAN_McastData::OptionalInfoAvaiable
bool OptionalInfoAvaiable
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:157
ProLink_LoRaWAN_FreqBand_IN_865
@ ProLink_LoRaWAN_FreqBand_IN_865
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:67
TProLinkLoRaWAN_FreqBand
TProLinkLoRaWAN_FreqBand
Channel Band Selection.
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:63
TWiMODLORAWAN_DevTimeReqInfo::ChannelBlockTime
UINT32 ChannelBlockTime
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:107
ProLink_LoRaWAN_FreqBand_WW2G4
@ ProLink_LoRaWAN_FreqBand_WW2G4
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:83
TWiMODLORAWAN_McastConfig::DeviceAddress
UINT32 DeviceAddress
Definition: WiMOD_SAP_LORAWAN_ProLink_IDs.h:124