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

WiMODGlobalLink24.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
31 //------------------------------------------------------------------------------
32
33
34 #ifndef ARDUINO_WIMODGLOBALLINK24_H_
35 #define ARDUINO_WIMODGLOBALLINK24_H_
36
37
38
45 //------------------------------------------------------------------------------
46 //
47 // Section Includes Files
48 //
49 //------------------------------------------------------------------------------
50
51 #include "Arduino.h"
52 /************
53 * BUG in ardunino.h ?
54 * -> https://stackoverflow.com/questions/41093090/esp8266-error-macro-min-passed-3-arguments-but-takes-just-2
55 */
56
57 #include <string.h>
58
59 //#include "SAP/WiMOD_SAP_LORAWAN.h"
60 #include "SAP/WiMOD_SAP_GlobalLink24.h"
61 #include "SAP/WiMOD_SAP_DEVMGMT.h"
62 #include "SAP/WiMOD_SAP_Generic.h"
63 #include "utils/ComSLIP.h"
64 #include "HCI/WiMODLRHCI.h"
65
66 #include "WiMODLoRaWAN.h"
67
68 //-----------------------------------------------------------------------------
69 // common defines
70 //-----------------------------------------------------------------------------
72 #define WIMOD_GLOBALLINK24_SERIAL_BAUDRATE 115200
73
74 #define WiMOD_GLOBALLINK24_TX_BUFFER_SIZE 256
75 //-----------------------------------------------------------------------------
77 // types for callback functions
78 //-----------------------------------------------------------------------------
79
80
81
82 //-----------------------------------------------------------------------------
83 // API class declaration for the WiMOD GlobalLink24 Stack
84 //
85 //-----------------------------------------------------------------------------
93 class WiMODGlobalLink24 {
94 public:
95 /*explicit*/ WiMODGlobalLink24(Stream& s);
96 ~WiMODGlobalLink24(void);
97
98 void begin(TLoRaWANregion region = LoRaWAN_Region_proprietary_WW2G4);
99 void end(void);
100
102 void beginAndAutoSetup(void);
103 void autoSetupSupportedRegion(void);
105
106 /*
107 * DevMgmt SAP
108 */
109 bool Ping(TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
110 bool Reset(TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
111 bool GetDeviceInfo(TWiMODLR_DevMgmt_DevInfoLoRaWan* info, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
112 bool GetFirmwareInfo(TWiMODLR_DevMgmt_FwInfo* info, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
113 bool GetSystemStatus(TWiMODLR_DevMgmt_SystemStatusLorawan* info, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
114 bool GetRtc(UINT32* rtcTime,TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
115 bool SetRtc(const UINT32 rtcTime, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
116
117 bool GetOperationMode(TWiMOD_OperationMode* opMode, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
118 bool SetOperationMode(const TWiMOD_OperationMode opMode, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
119
120 bool SetRtcAlarm(const TWiMODLR_DevMgmt_RtcAlarm* rtcAlarm, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
121 bool GetRtcAlarm(TWiMODLR_DevMgmt_RtcAlarm* rtcAlarm, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
122 bool ClearRtcAlarm(TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
123
124 void RegisterPowerUpIndicationClient(TDevMgmtPowerUpCallback cb);
125 void RegisterRtcAlarmIndicationClient(TDevMgmtRtcAlarmCallback cb);
126
127 bool GetHciConfig(TWiMODLR_DevMgmt_HciConfig* hciConfig, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
128 bool SetHciConfig(TWiMODLR_DevMgmt_HciConfig& hciConfig, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
129
130
131 /*
132 * GlobalLink24 (LoRaWAN emulation) SAP
133 */
134 bool ActivateDevice(TWiMODGlobalLink24_ActivateDeviceData& activationData, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
135 bool ReactivateDevice(UINT32* devAdr, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
136 bool SetJoinParameter(TWiMODGlobalLink24_JoinParams& joinParams, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
137 bool JoinNetwork(TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
138
139 void RegisterJoinTxIndicationClient(TJoinTxIndicationCallback cb);
140
141 bool
142 convert(TWiMODLR_HCIMessage& RxMsg, TWiMODGlobalLink24_RX_Data* globalLink24RxData);
143 bool
144 convert(TWiMODLR_HCIMessage& rxMsg, TWiMODGlobalLink24_TxIndData* sendIndData);
145
146 bool
147 convert(TWiMODLR_HCIMessage& RxMsg, TWiMODGlobalLink24_RX_MacCmdData* globalLink24MacCmdData);
148
149 bool
150 convert(TWiMODLR_HCIMessage& RxMsg,TWiMODGlobalLink24_RX_JoinedNwkData* joinedNwkData);
151
152 bool
153 convert(TWiMODLR_HCIMessage& RxMsg, TWiMODGlobalLink24_RX_ACK_Data* ackData);
154
155 bool
156 convert(TWiMODLR_HCIMessage& RxMsg, TWiMODGlobalLink24_NoData_Data* info);
157
158 void
159 RegisterNoDataIndicationClient(TNoDataIndicationCallback cb);
160
161 void
162 RegisterTxCDataIndicationClient(TTxCDataIndicationCallback cb);
163
164 void
165 RegisterTxUDataIndicationClient(TTxUDataIndicationCallback cb);
166
167 void
168 RegisterRxUDataIndicationClient(TRxUDataIndicationCallback cb);
169
170 void
171 RegisterRxCDataIndicationClient(TRxCDataIndicationCallback cb);
172
173 void
174 RegisterRxMacCmdIndicationClient(TRxMacCmdIndicationCallback cb);
175
176 void
177 RegisterJoinedNwkIndicationClient(TJoinedNwkIndicationCallback cb);
178
179 void
180 RegisterRxAckIndicationClient(TRxAckIndicationCallback cb);
181
182 bool SendUData(const TWiMODGlobalLink24_TX_Data* data, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
183 bool SendCData(const TWiMODGlobalLink24_TX_Data* data,TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
184 bool SetRadioStackConfig(TWiMODGlobalLink24_RadioStackConfig* data,TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
185 bool GetRadioStackConfig(TWiMODGlobalLink24_RadioStackConfig* data, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
186 bool DeactivateDevice(TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
187 bool FactoryReset(TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
188 bool SetDeviceEUI(const UINT8* deviceEUI, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
189 bool GetDeviceEUI(UINT8* deviceEUI, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
190 // bool GetNwkStatus(UINT8* nwkStatus, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL); // implementation for spec up to V1.13
191 bool GetNwkStatus(TWiMODGlobalLink24_NwkStatus_Data* nwkStatus, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL); // new implementation for spec. V1.14
192 bool SendMacCmd(const TWiMODGlobalLink24_MacCmd* cmd, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
193 bool SetCustomConfig(const INT8 rfGain, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
194 bool GetCustomConfig(INT8* rfGain, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
195 bool GetSupportedBands(TWiMODGlobalLink24_SupportedBands* supportedBands, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
196
197
198 // bool GetLinkAdrReqConfig(TWiMODGlobalLink24_LinkAdrReqConfig* linkAdrReqCfg, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
199 // bool SetLinkAdrReqConfig(TWiMODGlobalLink24_LinkAdrReqConfig& linkAdrReqCfg, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
200 bool SetBatteryLevelStatus(UINT8 battStatus, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
201
202
203 /*
204 * Generic Cmd
205 */
206 bool ExecuteGenericCmd(TWiMODLR_Generic_CmdInfo* info, TWiMODLRResultCodes* hciResult = NULL, UINT8* rspStatus = NULL);
207
208 /*
209 * Info & QuickStart Cmds
210 */
211 void PrintBasicDeviceInfo(Stream& s);
212 void ConnectViaOTAA(const uint8_t* appEUI = NULL, const uint8_t* appKey = NULL);
213 void ConvertAppEuiStrToArray(char* appEuiStr, uint8_t* appEuiArray);
214 void ConvertAppKeyStrToArray(char* appKeyStr, uint8_t* appKeyArray);
215
216 void ConvertNwkSKeyStrToArray(char* nwkSKeyStr, uint8_t* nwkSKeyArray);
217 void ConvertAppSKeyStrToArray(char* appSKeyStr, uint8_t* appSKeyArray);
218
219 TWiMODLRResultCodes GetLastHciResult(void);
220 UINT8 GetLastResponseStatus(void);
221
222 void Process(void);
223 void EnableWakeupSequence(bool flag);
224 protected:
225 WiMODLoRaWAN GlobalLinkImp;
226 private:
227 };
228
229
230 #endif /* ARDUINO_WIMODGLOBALLINK24_H_ */
WiMODGlobalLink24::GetCustomConfig
bool GetCustomConfig(INT8 *rfGain, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Get the current offet for tx power level; expert level only.
Definition: WiMODGlobalLink24.cpp:2161
TJoinedNwkIndicationCallback
void(* TJoinedNwkIndicationCallback)(TWiMODLR_HCIMessage &rxMsg)
Definition: WiMOD_SAP_LORAWAN.h:154
WiMODGlobalLink24::GetRtc
bool GetRtc(UINT32 *rtcTime, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Gets the current RTC data info from WiMOD module.
Definition: WiMODGlobalLink24.cpp:462
WiMODGlobalLink24::ConvertAppSKeyStrToArray
void ConvertAppSKeyStrToArray(char *appSKeyStr, uint8_t *appSKeyArray)
Converts a string containing an AppSKey string into a given byte array.
Definition: WiMODGlobalLink24.cpp:217
WiMODGlobalLink24::RegisterNoDataIndicationClient
void RegisterNoDataIndicationClient(TNoDataIndicationCallback cb)
Register a callback function for the event "TX Join Indication".
Definition: WiMODGlobalLink24.cpp:1504
WiMODGlobalLink24::SendCData
bool SendCData(const TWiMODGlobalLink24_TX_Data *data, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Tries to send transmit C-Data to network server via RF link.
Definition: WiMODGlobalLink24.cpp:1808
TRxUDataIndicationCallback
void(* TRxUDataIndicationCallback)(TWiMODLR_HCIMessage &rxMsg)
Definition: WiMOD_SAP_LORAWAN.h:166
TLoRaWANregion
TLoRaWANregion
LoRaWAN Region support.
Definition: WiMOD_SAP_LORAWAN.h:79
WiMODGlobalLink24::SetRtc
bool SetRtc(const UINT32 rtcTime, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Sets the current RTC values to WiMOD module.
Definition: WiMODGlobalLink24.cpp:500
TWiMODGlobalLink24_NwkStatus_Data
Definition: WiMOD_SAP_GlobalLink24.h:103
WiMODGlobalLink24::~WiMODGlobalLink24
~WiMODGlobalLink24(void)
Desctructor.
Definition: WiMODGlobalLink24.cpp:78
WiMODGlobalLink24::GetLastResponseStatus
UINT8 GetLastResponseStatus(void)
Gets the last response code of the WiMOD of the last executed command.
Definition: WiMODGlobalLink24.cpp:2412
WiMODGlobalLink24::ConvertAppEuiStrToArray
void ConvertAppEuiStrToArray(char *appEuiStr, uint8_t *appEuiArray)
Converts a string containing an App EUI string into a given byte array.
Definition: WiMODGlobalLink24.cpp:159
TWiMODGlobalLink24_NoData_Data
Definition: WiMOD_SAP_GlobalLink24.h:104
WiMODGlobalLink24::SetJoinParameter
bool SetJoinParameter(TWiMODGlobalLink24_JoinParams &joinParams, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Sets the parameters used for the OTAA activation procedure.
Definition: WiMODGlobalLink24.cpp:1040
WiMODGlobalLink24::GetOperationMode
bool GetOperationMode(TWiMOD_OperationMode *opMode, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Gets the current operation mode of the WiMOD module.
Definition: WiMODGlobalLink24.cpp:545
WiMODGlobalLink24::RegisterRtcAlarmIndicationClient
void RegisterRtcAlarmIndicationClient(TDevMgmtRtcAlarmCallback cb)
Register a callback function for the RTC Alarm Indication - optional -.
Definition: WiMODGlobalLink24.cpp:782
WiMODGlobalLink24::SetDeviceEUI
bool SetDeviceEUI(const UINT8 *deviceEUI, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Sets a new DeviceEUI (aka. IEEE-Address) to the WiMOD.
Definition: WiMODGlobalLink24.cpp:1995
WiMODGlobalLink24::RegisterJoinedNwkIndicationClient
void RegisterJoinedNwkIndicationClient(TJoinedNwkIndicationCallback cb)
Register a callback function for the event "Joined Nwk Indication".
Definition: WiMODGlobalLink24.cpp:1683
TWiMODLR_DevMgmt_FwInfo
Basic information about the current firmware of the WiMOD.
Definition: WiMOD_SAP_DEVMGMT_IDs.h:220
WiMODGlobalLink24::SendUData
bool SendUData(const TWiMODGlobalLink24_TX_Data *data, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Tries to send transmit U-Data to network server via RF link.
Definition: WiMODGlobalLink24.cpp:1751
WiMODLoRaWAN
Main class representing the interface to the WiMOD running the firmware LoRaWAN EndNode Modem.
Definition: WiMODLoRaWAN.h:90
WiMODGlobalLink24::RegisterTxUDataIndicationClient
void RegisterTxUDataIndicationClient(TTxUDataIndicationCallback cb)
Register a callback function for the event "TX U Data Indication".
Definition: WiMODGlobalLink24.cpp:1599
TWiMODGlobalLink24_RadioStackConfig
Definition: WiMOD_SAP_GlobalLink24.h:100
WiMODLoRaWAN.h
TWiMODLR_DevMgmt_DevInfoLoRaWan
Structure containing basic information about the WiMOD device.
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:64
WiMODGlobalLink24::ConvertNwkSKeyStrToArray
void ConvertNwkSKeyStrToArray(char *nwkSKeyStr, uint8_t *nwkSKeyArray)
Converts a string containing an NwkSKey string into a given byte array.
Definition: WiMODGlobalLink24.cpp:197
TWiMODLR_HCIMessage
basic low level HCI message structure used for all serial messages to/from WiMOD
Definition: WiMODLRHCI.h:120
WiMOD_SAP_DEVMGMT.h
TWiMODGlobalLink24_ActivateDeviceData
Definition: WiMOD_SAP_GlobalLink24.h:93
TWiMODLR_DevMgmt_RtcAlarm
Structure containing the RTC Alarm config parameters of the WiMOD.
Definition: WiMOD_SAP_DEVMGMT_IDs.h:484
TWiMODGlobalLink24_RX_Data
Definition: WiMOD_SAP_GlobalLink24.h:97
WiMODLRHCI.h
TWiMOD_OperationMode
TWiMOD_OperationMode
This enum describes the possible operation modes of the WiMOD (only for LR-BASE).
Definition: WiMOD_SAP_DEVMGMT_IDs.h:440
WiMODGlobalLink24::GetDeviceEUI
bool GetDeviceEUI(UINT8 *deviceEUI, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Gets the DeviceEUI (aka. IEEE-Address) of the WiMOD.
Definition: WiMODGlobalLink24.cpp:2031
TWiMODGlobalLink24_SupportedBands
Definition: WiMOD_SAP_GlobalLink24.h:105
WiMODGlobalLink24::DeactivateDevice
bool DeactivateDevice(TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Deactivate the device (logical disconnect from lora network)
Definition: WiMODGlobalLink24.cpp:1923
WiMODGlobalLink24::JoinNetwork
bool JoinNetwork(TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Start joining the network via the OTAA procedure. Asynchronous process.
Definition: WiMODGlobalLink24.cpp:1108
WiMODGlobalLink24::RegisterTxCDataIndicationClient
void RegisterTxCDataIndicationClient(TTxCDataIndicationCallback cb)
Register a callback function for the event "TX C-Data Indication".
Definition: WiMODGlobalLink24.cpp:1551
WiMODGlobalLink24::GetNwkStatus
bool GetNwkStatus(TWiMODGlobalLink24_NwkStatus_Data *nwkStatus, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Gets the current status of the network "connection".
Definition: WiMODGlobalLink24.cpp:2077
WiMODGlobalLink24::SetHciConfig
bool SetHciConfig(TWiMODLR_DevMgmt_HciConfig &hciConfig, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Sets a new HCI configuration of the WiMOD.
Definition: WiMODGlobalLink24.cpp:862
WiMODGlobalLink24::GetRadioStackConfig
bool GetRadioStackConfig(TWiMODGlobalLink24_RadioStackConfig *data, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Gets the current radio config parameter set of the WiMOD.
Definition: WiMODGlobalLink24.cpp:1892
TWiMODGlobalLink24_TxIndData
Definition: WiMOD_SAP_GlobalLink24.h:95
TTxUDataIndicationCallback
void(* TTxUDataIndicationCallback)(TWiMODLR_HCIMessage &rxMsg)
Definition: WiMOD_SAP_LORAWAN.h:163
TRxAckIndicationCallback
void(* TRxAckIndicationCallback)(TWiMODLR_HCIMessage &rxMsg)
Definition: WiMOD_SAP_LORAWAN.h:175
TWiMODGlobalLink24_TX_Data
Definition: WiMOD_SAP_GlobalLink24.h:96
WiMODGlobalLink24::SetRadioStackConfig
bool SetRadioStackConfig(TWiMODGlobalLink24_RadioStackConfig *data, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Sets a new radio config parameter set of the WiMOD.
Definition: WiMODGlobalLink24.cpp:1854
TWiMODGlobalLink24_JoinParams
Definition: WiMOD_SAP_GlobalLink24.h:94
WiMODGlobalLink24::WiMODGlobalLink24
WiMODGlobalLink24(Stream &s)
Constructor.
Definition: WiMODGlobalLink24.cpp:69
ComSLIP.h
WiMODGlobalLink24::GetLastHciResult
TWiMODLRResultCodes GetLastHciResult(void)
Gets the last HCI result code from the last executed command.
Definition: WiMODGlobalLink24.cpp:2366
TRxMacCmdIndicationCallback
void(* TRxMacCmdIndicationCallback)(TWiMODLR_HCIMessage &rxMsg)
Definition: WiMOD_SAP_LORAWAN.h:172
WiMODGlobalLink24::RegisterRxAckIndicationClient
void RegisterRxAckIndicationClient(TRxAckIndicationCallback cb)
Register a callback function for the event "RX ACK (data) Indication".
Definition: WiMODGlobalLink24.cpp:1704
WiMODGlobalLink24::GetSupportedBands
bool GetSupportedBands(TWiMODGlobalLink24_SupportedBands *supportedBands, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Get the supported bands of this firmware.
Definition: WiMODGlobalLink24.cpp:2185
WiMODGlobalLink24::SetOperationMode
bool SetOperationMode(const TWiMOD_OperationMode opMode, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Sets the current operation mode of the WiMOD module.
Definition: WiMODGlobalLink24.cpp:584
WiMODGlobalLink24::ReactivateDevice
bool ReactivateDevice(UINT32 *devAdr, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Re-Activates the device via the ABP procedure.
Definition: WiMODGlobalLink24.cpp:996
TTxCDataIndicationCallback
void(* TTxCDataIndicationCallback)(TWiMODLR_HCIMessage &rxMsg)
Definition: WiMOD_SAP_LORAWAN.h:160
WiMODGlobalLink24::convert
bool convert(TWiMODLR_HCIMessage &RxMsg, TWiMODGlobalLink24_RX_Data *globalLink24RxData)
Convert a received low level HCI-Msg to a high-level Rx Data structure.
Definition: WiMODGlobalLink24.cpp:1196
WiMODGlobalLink24::end
void end(void)
Shut shut down function.
Definition: WiMODGlobalLink24.cpp:113
WiMODGlobalLink24::RegisterRxUDataIndicationClient
void RegisterRxUDataIndicationClient(TRxUDataIndicationCallback cb)
Register a callback function for the event "RX U-Data Indication".
Definition: WiMODGlobalLink24.cpp:1620
WiMODGlobalLink24::GetDeviceInfo
bool GetDeviceInfo(TWiMODLR_DevMgmt_DevInfoLoRaWan *info, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
GetDeviceInfo Cmd - Gets the basic device information of the WiMOD.
Definition: WiMODGlobalLink24.cpp:342
WiMODGlobalLink24::ClearRtcAlarm
bool ClearRtcAlarm(TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Clears pending RTC Alarms of the WiMOD.
Definition: WiMODGlobalLink24.cpp:707
WiMODGlobalLink24::RegisterJoinTxIndicationClient
void RegisterJoinTxIndicationClient(TJoinTxIndicationCallback cb)
Register a callback function for the event "TX Join Indication".
Definition: WiMODGlobalLink24.cpp:1143
WiMODGlobalLink24::SendMacCmd
bool SendMacCmd(const TWiMODGlobalLink24_MacCmd *cmd, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Send a MAC command to the server; expert level only.
Definition: WiMODGlobalLink24.cpp:2117
WiMODGlobalLink24::RegisterRxCDataIndicationClient
void RegisterRxCDataIndicationClient(TRxCDataIndicationCallback cb)
Register a callback function for the event "RX C-Data Indication".
Definition: WiMODGlobalLink24.cpp:1641
TJoinTxIndicationCallback
void(* TJoinTxIndicationCallback)(TWiMODLR_HCIMessage &rxMsg)
Definition: WiMOD_SAP_LORAWAN.h:151
WiMODGlobalLink24::GetHciConfig
bool GetHciConfig(TWiMODLR_DevMgmt_HciConfig *hciConfig, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Gets the current HCI configuration of the WiMOD.
Definition: WiMODGlobalLink24.cpp:821
TNoDataIndicationCallback
void(* TNoDataIndicationCallback)(void)
Definition: WiMOD_SAP_LORAWAN.h:157
WiMODGlobalLink24::RegisterPowerUpIndicationClient
void RegisterPowerUpIndicationClient(TDevMgmtPowerUpCallback cb)
Register a callback function for the PowerUp Indication - optional -.
Definition: WiMODGlobalLink24.cpp:744
WiMODGlobalLink24::GetFirmwareInfo
bool GetFirmwareInfo(TWiMODLR_DevMgmt_FwInfo *info, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
GetFirmwareInfo Cmd - Gets the basic information about the firmware of the WiMOD.
Definition: WiMODGlobalLink24.cpp:380
TRxCDataIndicationCallback
void(* TRxCDataIndicationCallback)(TWiMODLR_HCIMessage &rxMsg)
Definition: WiMOD_SAP_LORAWAN.h:169
TWiMODLRResultCodes
TWiMODLRResultCodes
Result codes for the local serial communication itself.
Definition: WiMODLRHCI.h:149
WiMODGlobalLink24::SetRtcAlarm
bool SetRtcAlarm(const TWiMODLR_DevMgmt_RtcAlarm *rtcAlarm, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Sets and enables the RTC alarm feature of the WiMOD.
Definition: WiMODGlobalLink24.cpp:637
WiMODGlobalLink24::SetCustomConfig
bool SetCustomConfig(const INT8 rfGain, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Setup a custom config for tx power settings; expert level only.
Definition: WiMODGlobalLink24.cpp:2139
WiMODGlobalLink24::GetSystemStatus
bool GetSystemStatus(TWiMODLR_DevMgmt_SystemStatusLorawan *info, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
GetSystemStatus Cmd - Gets the basic information about the system status of the WiMOD.
Definition: WiMODGlobalLink24.cpp:419
WiMOD_SAP_Generic.h
TWiMODGlobalLink24_RX_MacCmdData
Definition: WiMOD_SAP_GlobalLink24.h:98
WiMODGlobalLink24::SetBatteryLevelStatus
bool SetBatteryLevelStatus(UINT8 battStatus, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Set the Battry Level Status.
Definition: WiMODGlobalLink24.cpp:2254
TWiMODLR_DevMgmt_HciConfig
HCI Configuration Parameters.
Definition: WiMOD_SAP_DEVMGMT_IDs.h:519
WiMODGlobalLink24
Main class representing the interface to the WiMOD running the firmware GlobalLink24 EndNode Modem.
Definition: WiMODGlobalLink24.h:93
TDevMgmtRtcAlarmCallback
void(* TDevMgmtRtcAlarmCallback)(void)
Definition: WiMOD_SAP_DEVMGMT.h:96
WiMODGlobalLink24::ConnectViaOTAA
void ConnectViaOTAA(const uint8_t *appEUI=NULL, const uint8_t *appKey=NULL)
do a jump start and use OTAA to connect to a Nwk server
Definition: WiMODGlobalLink24.cpp:139
TDevMgmtPowerUpCallback
void(* TDevMgmtPowerUpCallback)(void)
Definition: WiMOD_SAP_DEVMGMT.h:93
TWiMODLR_DevMgmt_SystemStatusLorawan
Basic information about system status of the WiMOD.
Definition: WiMOD_SAP_DEVMGMT_Lorawan_IDs.h:77
TWiMODGlobalLink24_RX_ACK_Data
Definition: WiMOD_SAP_GlobalLink24.h:102
WiMODGlobalLink24::RegisterRxMacCmdIndicationClient
void RegisterRxMacCmdIndicationClient(TRxMacCmdIndicationCallback cb)
Register a callback function for the event "RX MAC Cmd Indication".
Definition: WiMODGlobalLink24.cpp:1662
WiMODGlobalLink24::begin
void begin(TLoRaWANregion region=LoRaWAN_Region_proprietary_WW2G4)
This function must be called once before any other service can be used.
Definition: WiMODGlobalLink24.cpp:98
WiMODGlobalLink24::Reset
bool Reset(TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Reset Cmd - Reboots the WiMOD module.
Definition: WiMODGlobalLink24.cpp:306
WiMODGlobalLink24::ActivateDevice
bool ActivateDevice(TWiMODGlobalLink24_ActivateDeviceData &activationData, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Activates the device via the ABP procedure.
Definition: WiMODGlobalLink24.cpp:931
TWiMODGlobalLink24_RX_JoinedNwkData
Definition: WiMOD_SAP_GlobalLink24.h:99
WiMODGlobalLink24::ConvertAppKeyStrToArray
void ConvertAppKeyStrToArray(char *appKeyStr, uint8_t *appKeyArray)
Converts a string containing an App Key string into a given byte array.
Definition: WiMODGlobalLink24.cpp:178
WiMODGlobalLink24::GetRtcAlarm
bool GetRtcAlarm(TWiMODLR_DevMgmt_RtcAlarm *rtcAlarm, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Gets information about the RTC alarm feature of the WiMOD.
Definition: WiMODGlobalLink24.cpp:679
WiMODGlobalLink24::FactoryReset
bool FactoryReset(TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Reset all internal settings to default values (incl. DevEUI !!!)
Definition: WiMODGlobalLink24.cpp:1955
WiMODGlobalLink24::Ping
bool Ping(TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Ping Cmd - Checks the serial connection to the WiMOD module.
Definition: WiMODGlobalLink24.cpp:284
WiMODGlobalLink24::ExecuteGenericCmd
bool ExecuteGenericCmd(TWiMODLR_Generic_CmdInfo *info, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
Generic Execution Function for HCI commands that are currently not implemented.
Definition: WiMODGlobalLink24.cpp:2315
TWiMODGlobalLink24_MacCmd
Definition: WiMOD_SAP_GlobalLink24.h:101