Demo HCI Implementation for WiMOD-LR Devices  V2.0.3
WiMODLoRaWAN Class Reference

Main class representing the interface to the WiMOD running the firmware LoRaWAN EndNode Modem. More...

#include <WiMODLoRaWAN.h>

Inheritance diagram for WiMODLoRaWAN:
Collaboration diagram for WiMODLoRaWAN:

Public Member Functions

 WiMODLoRaWAN (Stream &s)
 Constructor. More...
 
 ~WiMODLoRaWAN (void)
 Desctructor.
 
void begin (TLoRaWANregion region=LoRaWAN_Region_EU868)
 This function must be called once before any other service can be used. More...
 
void end (void)
 Shut shut down function.
 
bool Ping (TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Ping Cmd - Checks the serial connection to the WiMOD module. More...
 
bool Reset (TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Reset Cmd - Reboots the WiMOD module. More...
 
bool GetDeviceInfo (TWiMODLR_DevMgmt_DevInfoLoRaWan *info, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 GetDeviceInfo Cmd - Gets the basic device information of the WiMOD. More...
 
bool GetFirmwareInfo (TWiMODLR_DevMgmt_FwInfo *info, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 GetFirmwareInfo Cmd - Gets the basic information about the firmware of the WiMOD. More...
 
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. More...
 
bool GetRtc (UINT32 *rtcTime, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Gets the current RTC data info from WiMOD module. More...
 
bool SetRtc (const UINT32 rtcTime, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Sets the current RTC values to WiMOD module. More...
 
bool GetOperationMode (TWiMOD_OperationMode *opMode, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Gets the current operation mode of the WiMOD module. More...
 
bool SetOperationMode (const TWiMOD_OperationMode opMode, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Sets the current operation mode of the WiMOD module. More...
 
bool SetRtcAlarm (const TWiMODLR_DevMgmt_RtcAlarm *rtcAlarm, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Sets and enables the RTC alarm feature of the WiMOD. More...
 
bool GetRtcAlarm (TWiMODLR_DevMgmt_RtcAlarm *rtcAlarm, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Gets information about the RTC alarm feature of the WiMOD. More...
 
bool ClearRtcAlarm (TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Clears pending RTC Alarms of the WiMOD. More...
 
void RegisterPowerUpIndicationClient (TDevMgmtPowerUpCallback cb)
 Register a callback function for the PowerUp Indication - optional -. More...
 
void RegisterRtcAlarmIndicationClient (TDevMgmtRtcAlarmCallback cb)
 Register a callback function for the RTC Alarm Indication - optional -. More...
 
bool GetHciConfig (TWiMODLR_DevMgmt_HciConfig *hciConfig, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Gets the current HCI configuration of the WiMOD. More...
 
bool SetHciConfig (TWiMODLR_DevMgmt_HciConfig &hciConfig, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Sets a new HCI configuration of the WiMOD. More...
 
bool ActivateDevice (TWiMODLORAWAN_ActivateDeviceData &activationData, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Activates the device via the ABP procedure. More...
 
bool ReactivateDevice (UINT32 *devAdr, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Re-Activates the device via the ABP procedure. More...
 
bool SetJoinParameter (TWiMODLORAWAN_JoinParams &joinParams, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Sets the parameters used for the OTAA activation procedure. More...
 
bool JoinNetwork (TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Start joining the network via the OTAA procedure. Asynchronous process. More...
 
void RegisterJoinTxIndicationClient (TJoinTxIndicationCallback cb)
 Register a callback function for the event "TX Join Indication". More...
 
bool convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLORAWAN_RX_Data *loraWanRxData)
 Convert a received low level HCI-Msg to a high-level Rx Data structure. More...
 
bool convert (TWiMODLR_HCIMessage &rxMsg, TWiMODLORAWAN_TxIndData *sendIndData)
 Convert a received low level HCI-Msg to a high-level tx ind structure. More...
 
bool convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLORAWAN_RX_MacCmdData *loraWanMacCmdData)
 Convert a received low level HCI-Msg to a high-level MAC-Cmd structure. More...
 
bool convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLORAWAN_RX_JoinedNwkData *joinedNwkData)
 Convert a received low level HCI-Msg to a high-level NwkJoined structure. More...
 
bool convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLORAWAN_RX_ACK_Data *ackData)
 Convert a received low level HCI-Msg to a high-level AckData structure. More...
 
bool convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLORAWAN_NoData_Data *info)
 Convert a received low level HCI-Msg to a high-level NoData structure. More...
 
void RegisterNoDataIndicationClient (TNoDataIndicationCallback cb)
 Register a callback function for the event "TX Join Indication". More...
 
void RegisterTxCDataIndicationClient (TTxCDataIndicationCallback cb)
 Register a callback function for the event "TX C-Data Indication". More...
 
void RegisterTxUDataIndicationClient (TTxUDataIndicationCallback cb)
 Register a callback function for the event "TX U Data Indication". More...
 
void RegisterRxUDataIndicationClient (TRxUDataIndicationCallback cb)
 Register a callback function for the event "RX U-Data Indication". More...
 
void RegisterRxCDataIndicationClient (TRxCDataIndicationCallback cb)
 Register a callback function for the event "RX C-Data Indication". More...
 
void RegisterRxMacCmdIndicationClient (TRxMacCmdIndicationCallback cb)
 Register a callback function for the event "RX MAC Cmd Indication". More...
 
void RegisterJoinedNwkIndicationClient (TJoinedNwkIndicationCallback cb)
 Register a callback function for the event "Joined Nwk Indication". More...
 
void RegisterRxAckIndicationClient (TRxAckIndicationCallback cb)
 Register a callback function for the event "RX ACK (data) Indication". More...
 
bool SendUData (const TWiMODLORAWAN_TX_Data *data, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Tries to send transmit U-Data to network server via RF link. More...
 
bool SendCData (const TWiMODLORAWAN_TX_Data *data, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Tries to send transmit C-Data to network server via RF link. More...
 
bool SetRadioStackConfig (TWiMODLORAWAN_RadioStackConfig *data, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Sets a new radio config parameter set of the WiMOD. More...
 
bool GetRadioStackConfig (TWiMODLORAWAN_RadioStackConfig *data, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Gets the current radio config parameter set of the WiMOD. More...
 
bool DeactivateDevice (TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Deactivate the device (logical disconnect from lora network) More...
 
bool FactoryReset (TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Reset all internal settings to default values (incl. DevEUI !!!) More...
 
bool SetDeviceEUI (const UINT8 *deviceEUI, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Sets a new DeviceEUI (aka. IEEE-Address) to the WiMOD. More...
 
bool GetDeviceEUI (UINT8 *deviceEUI, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Gets the DeviceEUI (aka. IEEE-Address) of the WiMOD. More...
 
bool GetNwkStatus (TWiMODLORAWAN_NwkStatus_Data *nwkStatus, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Gets the current status of the network "connection". More...
 
bool SendMacCmd (const TWiMODLORAWAN_MacCmd *cmd, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Send a MAC command to the server; expert level only. More...
 
bool SetCustomConfig (const INT8 rfGain, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Setup a custom config for tx power settings; expert level only. More...
 
bool GetCustomConfig (INT8 *rfGain, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Get the current offet for tx power level; expert level only. More...
 
bool GetSupportedBands (TWiMODLORAWAN_SupportedBands *supportedBands, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Get the supported bands of this firmware. More...
 
bool GetTxPowerLimitConfig (TWiMODLORAWAN_TxPwrLimitConfig *txPwrLimitCfg, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Get the configured TX limits for all sub-bands. More...
 
bool SetTxPowerLimitConfig (TWiMODLORAWAN_TxPwrLimitConfig &txPwrLimitCfg, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Set a single TX limit for a single sub-band. More...
 
bool SetBatteryLevelStatus (UINT8 battStatus, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Set the Battery Level Status. More...
 
bool ExecuteGenericCmd (TWiMODLR_Generic_CmdInfo *info, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Generic Execution Function for HCI commands that are currently not implemented. More...
 
void PrintBasicDeviceInfo (Stream &s)
 
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 More...
 
void ConvertAppEuiStrToArray (char *appEuiStr, uint8_t *appEuiArray)
 Converts a string containing an App EUI string into a given byte array. More...
 
void ConvertAppKeyStrToArray (char *appKeyStr, uint8_t *appKeyArray)
 Converts a string containing an App Key string into a given byte array. More...
 
void ConvertNwkSKeyStrToArray (char *nwkSKeyStr, uint8_t *nwkSKeyArray)
 Converts a string containing an NwkSKey string into a given byte array. More...
 
void ConvertAppSKeyStrToArray (char *appSKeyStr, uint8_t *appSKeyArray)
 Converts a string containing an AppSKey string into a given byte array. More...
 
TWiMODLRResultCodes GetLastHciResult (void)
 Gets the last HCI result code from the last executed command. More...
 
UINT8 GetLastResponseStatus (void)
 Gets the last response code of the WiMOD of the last executed command. More...
 
- Public Member Functions inherited from TWiMODLRHCI
 TWiMODLRHCI (Stream &s)
 Constructor. More...
 
 ~TWiMODLRHCI (void)
 Destructor.
 
virtual void begin (void)
 Init function of the generic HCI message handler. More...
 
TWiMODLRResultCodes SendHCIMessage (UINT8 dstSapID, UINT8 msgID, UINT8 rxMsgID, UINT8 *payload, UINT16 length)
 Generic function for transferring a HCI message to the WiMOD module. More...
 
TWiMODLRResultCodes SendHCIMessageWithoutRx (UINT8 dstSapID, UINT8 msgID, UINT8 *payload, UINT16 length)
 Generic function for transferring a HCI message to the WiMOD module. More...
 
void Process (void)
 Handle the receiver path; process all incomming bytes from the WiMOD. More...
 
void SendWakeUpSequence (void)
 : Send a sequence of dummy chars to give the WiMOD some time to wake up
 
void RegisterStackErrorClient (TWiMODStackErrorClient cb)
 
const TWiMODLR_HCIMessageGetRxMessage (void)
 
void EnableWakeupSequence (bool flag)
 

Protected Member Functions

virtual void ProcessUnexpectedRxMessage (TWiMODLR_HCIMessage &rxMsg)
 
bool copyLoRaWanResultInfos (TWiMODLRResultCodes *hciResult, UINT8 *rspStatus)
 
bool copyDevMgmtResultInfos (TWiMODLRResultCodes *hciResult, UINT8 *rspStatus)
 
- Protected Member Functions inherited from TWiMODLRHCI
TWiMODLRResultCodes PostMessage (UINT8 sapID, UINT8 msgID, UINT8 *payload, UINT16 length)
 
TWiMODLRResultCodes SendPacket (UINT8 *txData, UINT16 length)
 
bool WaitForResponse (UINT8 rxSapID, UINT8 rxMsgID)
 
UINT8 * ProcessRxMessage (UINT8 *rxBuffer, UINT16 length)
 

Protected Attributes

WiMOD_SAP_DevMgmt_Lorawan SapDevMgmt
 
WiMOD_SAP_LoRaWAN SapLoRaWan
 
WiMOD_SAP_Generic SapGeneric
 

Detailed Description

Main class representing the interface to the WiMOD running the firmware LoRaWAN EndNode Modem.

THIS IS AN EXAMPLE IMPLEMENTATION ACCORDING THE THE HCI SPEC: V1.26 FOR FIRMWARE: LoRaWAN This class is the only API class a user should use for interacting with a WiMOD module that runs the IMST LoRaWAN EndNode Modem firmware.

Constructor & Destructor Documentation

◆ WiMODLoRaWAN()

WiMODLoRaWAN::WiMODLoRaWAN ( Stream &  s)

Constructor.

This function requires a cpp reference to the serial interface object that is to be used for communication.

#include <WiMODLoRaWAN.h>
WiMODLoRaWAN wimod(Serial3); // use the Arduino Serial3 as serial interface
void setup() {
// init stack
wimod.begin();
...
}

Member Function Documentation

◆ ActivateDevice()

bool WiMODLoRaWAN::ActivateDevice ( TWiMODLORAWAN_ActivateDeviceData activationData,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Activates the device via the ABP procedure.

See also
TWiMODLRResultCodes for interpretation of the values
Parameters
activationDatastructure holding the necessary parameters
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
msc_inline_mscgraph_24
// ABP data
const uint32_t DEV_ADR = 0x22;
const char NWKSKEY[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0f, 0x10 };
const char APPSKEY[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0f, 0x10 };
// create a local variable
void setup() {
//setup data
activationData.DeviceAddress = DEV_ADR;
memcpy(activationData.NwkSKey, NWKSKEY, 16);
memcpy(activationData.AppSKey, APPSKEY, 16);
// activate device
if (wimod.ActivateDevice(activationData)) {
// ABP procedure done
...
} else {
// Error executing ABP join request
...
}
...
Here is the call graph for this function:

◆ begin()

void WiMODLoRaWAN::begin ( TLoRaWANregion  region = LoRaWAN_Region_EU868)

This function must be called once before any other service can be used.

#include <WiMODLoRaWAN.h>
WiMODLoRaWAN wimod(Serial3); // use the Arduino Serial3 as serial interface
void setup() {
// init stack
wimod.begin();
...
}
Here is the call graph for this function:

◆ ClearRtcAlarm()

bool WiMODLoRaWAN::ClearRtcAlarm ( TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Clears pending RTC Alarms of the WiMOD.

See also
TWiMODLRResultCodes for interpretation of the values
Parameters
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
// clear a pending RTC alarm of WiMOD
wimod.ClearRtcAlarm();
...
Here is the call graph for this function:

◆ ConnectViaOTAA()

void WiMODLoRaWAN::ConnectViaOTAA ( const uint8_t *  appEUI = NULL,
const uint8_t *  appKey = NULL 
)

do a jump start and use OTAA to connect to a Nwk server

Parameters
appEUIpointer to an array containing the AppEUI/JoinEUI data to use
appKeypointer to an array containing the AppKey data to use
Here is the call graph for this function:

◆ convert() [1/6]

bool WiMODLoRaWAN::convert ( TWiMODLR_HCIMessage RxMsg,
TWiMODLORAWAN_NoData_Data info 
)

Convert a received low level HCI-Msg to a high-level NoData structure.

This function should be used by the NoData Indication Callback function prior processing the received data message.

Parameters
RxMsgReference to low-level HCI message.
Warning
DO NOT MANIPULATE THESE VALUES !!!
Parameters
infoPointer to the buffer where to store the received information
Return values
trueif the conversion was successful
msc_inline_mscgraph_25
Here is the call graph for this function:

◆ convert() [2/6]

bool WiMODLoRaWAN::convert ( TWiMODLR_HCIMessage RxMsg,
TWiMODLORAWAN_RX_ACK_Data ackData 
)

Convert a received low level HCI-Msg to a high-level AckData structure.

This function should be used by the Rx Ack Indication Callback function prior processing the received data message.

Parameters
RxMsgReference to low-level HCI message.
Warning
DO NOT MANIPULATE THESE VALUES !!!
Parameters
ackDataPointer to the buffer where to store the received data
Return values
trueif the conversion was successful
msc_inline_mscgraph_26
void myRxAckInd(TWiMODLR_HCIMessage& rxMsg) {
// convert/copy the raw message to a RX ACK data structure
if (wimod.convert(rxMsg, &rxAckData)) {
// OK, process data
...
}
}
...
void setup() {
...
// setup user callback for receiving RX ACK indications
wimod.RegisterRxAckIndicationClient(myRxAckInd);
}
...
Here is the call graph for this function:

◆ convert() [3/6]

bool WiMODLoRaWAN::convert ( TWiMODLR_HCIMessage RxMsg,
TWiMODLORAWAN_RX_Data loraWanRxData 
)

Convert a received low level HCI-Msg to a high-level Rx Data structure.

This function should be used by the Rx Data Indication Callback functions prior processing the received data message.

Parameters
RxMsgReference to low-level HCI message.
Warning
DO NOT MANIPULATE THESE VALUES !!!
Parameters
loraWanRxDataPointer to the buffer where to store the received data
Return values
trueif the conversion was successful
msc_inline_mscgraph_27
void onRxData(TWiMODLR_HCIMessage& rxMsg) {
// convert/copy the raw message to RX radio buffer
if (wimod.convert(rxMsg, &radioRxMsg)) {
// OK, process RX data
...
}
}
...
void setup() {
...
// setup user callbacks for RX data events
wimod.RegisterRxCDataIndicationClient(onRxData);
wimod.RegisterRxUDataIndicationClient(onRxData);
}
...
Here is the call graph for this function:

◆ convert() [4/6]

bool WiMODLoRaWAN::convert ( TWiMODLR_HCIMessage RxMsg,
TWiMODLORAWAN_RX_JoinedNwkData joinedNwkData 
)

Convert a received low level HCI-Msg to a high-level NwkJoined structure.

This function should be used by the JoinedNwk Indication Callback function prior processing the received data message.

Parameters
RxMsgReference to low-level HCI message.
Warning
DO NOT MANIPULATE THESE VALUES !!!
Parameters
joinedNwkDataPointer to the buffer where to store the received data
Return values
trueif the conversion was successful
msc_inline_mscgraph_28
void myJoinedNwkInd(TWiMODLR_HCIMessage& rxMsg) {
// convert/copy the raw message to a joined nwk indication data structure
if (wimod.convert(rxMsg, &joinData)) {
// OK, process data
...
}
}
...
void setup() {
...
// setup user callback for joined network indication (for OTAA procedure)
wimod.RegisterJoinedNwkIndicationClient(myJoinedNwkInd);
}
...
Here is the call graph for this function:

◆ convert() [5/6]

bool WiMODLoRaWAN::convert ( TWiMODLR_HCIMessage RxMsg,
TWiMODLORAWAN_RX_MacCmdData loraWanMacCmdData 
)

Convert a received low level HCI-Msg to a high-level MAC-Cmd structure.

This function should be used by the Rx Mac Cmd Indication Callback function prior processing the received data message.

Parameters
RxMsgReference to low-level HCI message.
Warning
DO NOT MANIPULATE THESE VALUES !!!
Parameters
loraWanMacCmdDataPointer to the buffer where to store the received data
Return values
trueif the conversion was successful
msc_inline_mscgraph_29
void myMacCmdInd(TWiMODLR_HCIMessage& rxMsg) {
// convert/copy the raw message to MAC cmd indication data
if (wimod.convert(rxMsg, &macData)) {
// OK, process data
...
}
}
...
void setup() {
...
// setup user callback for MAC cmd indication events
wimod.RegisterRxMacCmdIndicationClient(myMacCmdInd);
}
...
Here is the call graph for this function:

◆ convert() [6/6]

bool WiMODLoRaWAN::convert ( TWiMODLR_HCIMessage RxMsg,
TWiMODLORAWAN_TxIndData sendIndData 
)

Convert a received low level HCI-Msg to a high-level tx ind structure.

This function should be used by the Tx Data Indication Callback functions prior processing the received data message.

Parameters
RxMsgReference to low-level HCI message.
Warning
DO NOT MANIPULATE THESE VALUES !!!
Parameters
sendIndDataPointer to the buffer where to store the received data
Return values
trueif the conversion was successful
msc_inline_mscgraph_30
void myTxInd(TWiMODLR_HCIMessage& rxMsg) {
// convert/copy the raw message to tx indication data
if (wimod.convert(rxMsg, &txData)) {
// OK, process data
...
}
}
...
void setup() {
...
// setup user callbacks for TX indication events
wimod.RegisterTxUDataIndicationClient(myTxInd);
wimod.RegisterTxCDataIndicationClient(myTxInd);
}
...
Here is the call graph for this function:

◆ ConvertAppEuiStrToArray()

void WiMODLoRaWAN::ConvertAppEuiStrToArray ( char *  appEuiStr,
uint8_t *  appEuiArray 
)

Converts a string containing an App EUI string into a given byte array.

This convinience funtion offers the user the possibilty to use a string containing the AppEUI as text (e.g. "0x12 34 45 78 9A BC DE f0"). The string will be decoded to an byte array for further usage. The string can is interpreted as hex digits with or without a "0x" prefix. Each digit pair must be separated by a space char.

Parameters
appEuiStrString containing the hex coded appEUI
appEuiArrayarray that should store the converted byte values
Warning
There is no length check of the array. The user is responsible to reserve enough space.
Here is the call graph for this function:

◆ ConvertAppKeyStrToArray()

void WiMODLoRaWAN::ConvertAppKeyStrToArray ( char *  appKeyStr,
uint8_t *  appKeyArray 
)

Converts a string containing an App Key string into a given byte array.

This convinience funtion offers the user the possibilty to use a string containing the AppKey as text (e.g. "0x12 34 45 78 9A BC DE f0 10 20 30 40 50 60 70 80"). The string will be decoded to an byte array for further usage. The string can is interpreted as hex digits with or without a "0x" prefix. Each digit pair must be separated by a space char.

Parameters
appKeyStrString containing the hex coded appKey
appKeyArrayarray that should store the converted byte values
Warning
There is no length check of the array. The user is responsible to reserve enough space.
Here is the call graph for this function:

◆ ConvertAppSKeyStrToArray()

void WiMODLoRaWAN::ConvertAppSKeyStrToArray ( char *  appSKeyStr,
uint8_t *  appSKeyArray 
)

Converts a string containing an AppSKey string into a given byte array.

This convinience funtion offers the user the possibilty to use a string containing the AppSKey as text (e.g. "0x12 34 45 78 9A BC DE f0 10 20 30 40 50 60 70 80"). The string will be decoded to an byte array for further usage. The string can is interpreted as hex digits with or without a "0x" prefix. Each digit pair must be separated by a space char.

Parameters
appSKeyStrString containing the hex coded appKey
appSKeyArrayarray that should store the converted byte values
Warning
There is no length check of the array. The user is responsible to reserve enough space.
Here is the call graph for this function:

◆ ConvertNwkSKeyStrToArray()

void WiMODLoRaWAN::ConvertNwkSKeyStrToArray ( char *  nwkSKeyStr,
uint8_t *  nwkSKeyArray 
)

Converts a string containing an NwkSKey string into a given byte array.

This convinience funtion offers the user the possibilty to use a string containing the NwkSKey as text (e.g. "0x12 34 45 78 9A BC DE f0 10 20 30 40 50 60 70 80"). The string will be decoded to an byte array for further usage. The string can is interpreted as hex digits with or without a "0x" prefix. Each digit pair must be separated by a space char.

Parameters
nwkSKeyStrString containing the hex coded appKey
nwkSKeyArrayarray that should store the converted byte values
Warning
There is no length check of the array. The user is responsible to reserve enough space.
Here is the call graph for this function:

◆ DeactivateDevice()

bool WiMODLoRaWAN::DeactivateDevice ( TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Deactivate the device (logical disconnect from lora network)

Parameters
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
...
// "disconnect" this endnode from the network
if (wimod.DeactivateDevice()) {
// node is disconnected and can not transfer data to server
// unless it will be re-activated
}
...
Here is the call graph for this function:

◆ ExecuteGenericCmd()

bool WiMODLoRaWAN::ExecuteGenericCmd ( TWiMODLR_Generic_CmdInfo *  info,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Generic Execution Function for HCI commands that are currently not implemented.

This funtion enables the user to execute various HCI commands that are currently not implemented as commands within this API class.

The user has to know the HCI Command IDs and has to decode the response data on his own.

Parameters
infopointer to a structure containing the HCI commands to execute
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
...
// prepare command to send to WiMOD
TWiMODLR_Generic_CmdInfo cmdInfo;
cmdInfo.SapID = 0x01; // DevMgmt
cmdInfo.MsgReqID = 0x01; // Ping Req
cmdInfo.MsgRspID = 0x02; // expected response
// prepare payload for tx command
cmdInfo.CmdPayloadLength = 0
cmdInfo.CmdPayload[0] = 0xab;
...
// execute command
if (wimod.ExecuteGenericCmd(&cmdInfo)) {
// extract cmd reponse data
if (cmdInfo.CmdPayloadLength > 0) {
// repsonse data available
rspData =cmdInfo.CmdPayload[0]
...
// process data
...
}
}
Here is the call graph for this function:

◆ FactoryReset()

bool WiMODLoRaWAN::FactoryReset ( TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Reset all internal settings to default values (incl. DevEUI !!!)

Parameters
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
...
// do a complete factory reset of the WiMOD module
if (wimod.FactoryReset()) {
// WiMOD module will reset all internal values and will
// do a reboot;
// wait a while for reboot to be completed
}
...
Here is the call graph for this function:

◆ GetCustomConfig()

bool WiMODLoRaWAN::GetCustomConfig ( INT8 *  rfGain,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Get the current offet for tx power level; expert level only.

Parameters
rfGainpointer to store the offset value for tx power settings
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
Here is the call graph for this function:

◆ GetDeviceEUI()

bool WiMODLoRaWAN::GetDeviceEUI ( UINT8 *  deviceEUI,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Gets the DeviceEUI (aka. IEEE-Address) of the WiMOD.

Parameters
deviceEUIpointer for storing the received 64bit address
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
...
// (local) variable for the device EUI
uint8_t devEUI[8];
// get the devEUI
if (wimod.GetDeviceEUI(devEUI)) {
...
}
...
Here is the call graph for this function:

◆ GetDeviceInfo()

bool WiMODLoRaWAN::GetDeviceInfo ( TWiMODLR_DevMgmt_DevInfoLoRaWan info,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

GetDeviceInfo Cmd - Gets the basic device information of the WiMOD.

See also
HCI command specification.
Parameters
infopointer for storing the requested information (structure)
hciResultpointer for storing the the local HCI transfer result. This is an optional parameter.
rspStatuspointer to store the response code of the WiMOD This is an optional parameter.
Return values
trueif everything was successful
// create a local variable
// get information of WiMOD
wimod.GetDeviceInfo(&devInfo);
//access fields of structure
printf("ModulType-ID: %d:", devInfo.ModuleType);
printf("DeviceAddress: %x:", devInfo.DevAdr);
...
Here is the call graph for this function:

◆ GetFirmwareInfo()

bool WiMODLoRaWAN::GetFirmwareInfo ( TWiMODLR_DevMgmt_FwInfo info,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

GetFirmwareInfo Cmd - Gets the basic information about the firmware of the WiMOD.

See also
HCI command specification.
Parameters
infopointer for storing the requested information (structure)
hciResultpointer for storing the the local HCI transfer result. This is an optional parameter.
rspStatuspointer to store the response code of the WiMOD This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
// create a local variable
// get information of WiMOD
wimod.GetFirmwareInfo(&fwInfo);
//access fields of structure
printf("FW-Version: %d.%d:", fwInfo.FirmwareMayorVersion, fwInfo.FirmwareMinorVersion );
printf("FW-Name: %s:", fwInfo.FirmwareName);
...
Here is the call graph for this function:

◆ GetHciConfig()

bool WiMODLoRaWAN::GetHciConfig ( TWiMODLR_DevMgmt_HciConfig hciConfig,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Gets the current HCI configuration of the WiMOD.

See also
HCI documentation and feature specification for details
Parameters
hciConfigPointer to a structure where to store the HCI config related information
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
// create a local variable
// get information of WiMOD
wimod.GetHciConfig(&hciConfig);
...
// access values
if (hciConfig.NumWakeUpChars == 40) {
...
}
...
Here is the call graph for this function:

◆ GetLastHciResult()

TWiMODLRResultCodes WiMODLoRaWAN::GetLastHciResult ( void  )

Gets the last HCI result code from the last executed command.

If you missed setting the HciResult parameter while executing the last command, this method can recall the last value of that parameter.

See also
TWiMODLRResultCodes for possible values.
Returns
the result value of the last executed command
msc_inline_mscgraph_31
...
if (wimod.Ping() == false) {
// get (local) result of HCI command transmission
hciResult = wimod.GetLastHciResult();
// check result code
switch (hciResult):
case WiMODLR_RESULT_OK: // OK, no error
case WiMODLR_RESULT_PAYLOAD_LENGTH_ERROR: // given payload is too big
case WiMODLR_RESULT_PAYLOAD_PTR_ERROR: // wrong pointer to payload (NULL?)
case WiMODLR_RESULT_TRANMIT_ERROR, // Error sending data to WiMOD via serial interface
case WiMODLR_RESULT_SLIP_ENCODER_ERROR, // Error during SLIP encoding
case WiMODLR_RESULT_NO_RESPONSE // The WiMOD did not respond to a request command
...
}
...

◆ GetLastResponseStatus()

UINT8 WiMODLoRaWAN::GetLastResponseStatus ( void  )

Gets the last response code of the WiMOD of the last executed command.

If you missed setting the rspStatus parameter while executing the last command, this method can recall the last value of that parameter.

See also
LORAWAN_STATUS_* defines for possible values.
Returns
the result value of the last executed command

◆ GetNwkStatus()

bool WiMODLoRaWAN::GetNwkStatus ( TWiMODLORAWAN_NwkStatus_Data nwkStatus,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Gets the current status of the network "connection".

Parameters
nwkStatuspointer for storing the requested information
See also
LORAWAN_NWK_STATUS defines; e.g.:
  • LORAWAN_NWK_STATUS_INACTIVE,
  • LORAWAN_NWK_STATUS_ACTIVE_ABP,
  • LORAWAN_NWK_STATUS_ACTIVE_OTAA,
  • LORAWAN_NWK_STATUS_JOINING_OTAA
Parameters
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
...
// (local) variable
TWiMODLORAWAN_NwkStatus_Data nwkStatus;
// get the nwk status
if (wimod.GetNwkStatus(&nwkStatus)) {
switch (nwkStatus.NetworkStatus):
case LORAWAN_NWK_STATUS_INACTIVE: // device is not "connected"
case LORAWAN_NWK_STATUS_ACTIVE_ABP: // device has been activated by ABP
case LORAWAN_NWK_STATUS_ACTIVE_OTAA: // device has been activated by OTAA
case LORAWAN_NWK_STATUS_JOINING_OTAA:// an OTAA activation procedure is currently pending
...
}
...
Here is the call graph for this function:

◆ GetOperationMode()

bool WiMODLoRaWAN::GetOperationMode ( TWiMOD_OperationMode opMode,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Gets the current operation mode of the WiMOD module.

See also
TWiMODLRResultCodes for interpretation of the values
Parameters
opModePointer where to store the information
See also
TWiMOD_OperationMode for details
Parameters
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
// create a local variable
// get information of WiMOD
wimod.GetOperationMode(&opMode);
// access value
if (opMode == OperationMode_Application) {
// do normal operations
...
} else {
// special operation mode; normal operations are disabled
...
}
...
Here is the call graph for this function:

◆ GetRadioStackConfig()

bool WiMODLoRaWAN::GetRadioStackConfig ( TWiMODLORAWAN_RadioStackConfig data,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Gets the current radio config parameter set of the WiMOD.

Parameters
datapointer to data structure for storing the requested information
See also
TWiMODLORAWAN_TX_Data for details
Parameters
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
...
// local variable
TWiMODLORAWAN_RadioStackConfig radioCfg;
// get current radio config
if (wimod.GetRadioStackConfig(&radioCfg)) {
// check / process
...
}
Here is the call graph for this function:

◆ GetRtc()

bool WiMODLoRaWAN::GetRtc ( UINT32 *  rtcTime,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Gets the current RTC data info from WiMOD module.

See also
TWiMODLRResultCodes for interpretation of the values
Parameters
rtcTimePointer where to store the RTC information
See also
WIMOD_RTC_GET_* Macros for conversation of this value
Parameters
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
// create a local variable
uint32_t timestamp;
// get information of WiMOD
wimod.GetRtc(&timestamp);
//access fields of structure
printf("Year : %d:", WIMOD_RTC_GET_YEARS(timestamp));
printf("Month: %d:", WIMOD_RTC_GET_MONTHS(timestamp));
printf("Day : %d:", WIMOD_RTC_GET_DAYS(timestamp));
printf("Hour : %d:", WIMOD_RTC_GET_HOURS(timestamp));
printf("Min : %d:", WIMOD_RTC_GET_MINUTES(timestamp));
printf("Sec : %d:", WIMOD_RTC_GET_SECONDS(timestamp));
...
Here is the call graph for this function:

◆ GetRtcAlarm()

bool WiMODLoRaWAN::GetRtcAlarm ( TWiMODLR_DevMgmt_RtcAlarm rtcAlarm,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Gets information about the RTC alarm feature of the WiMOD.

See also
TWiMODLRResultCodes for interpretation of the values
Parameters
rtcAlarmPointer to a structure where to store the RTC alarm related information
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
// create a local variable
// get information of WiMOD
wimod.GetRtcAlarm(&rtcAlarm);
...
// access values
if (rtcAlarm.AlarmStatus == RTC_Alarm_Alarm_Set) {
printf("Alarm is active");
...
}
...
Here is the call graph for this function:

◆ GetSupportedBands()

bool WiMODLoRaWAN::GetSupportedBands ( TWiMODLORAWAN_SupportedBands supportedBands,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Get the supported bands of this firmware.

Parameters
supportedBandspointer to store area for result
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
Here is the call graph for this function:

◆ GetSystemStatus()

bool WiMODLoRaWAN::GetSystemStatus ( TWiMODLR_DevMgmt_SystemStatusLorawan info,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

GetSystemStatus Cmd - Gets the basic information about the system status of the WiMOD.

See also
HCI command specification.
Parameters
infopointer for storing the requested information (structure)
hciResultpointer for storing the the local HCI transfer result. This is an optional parameter.
rspStatuspointer to store the response code of the WiMOD This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
// create a local variable
// get information of WiMOD
wimod.GetSystemStatus(&sysStatus);
//access fields of structure
printf("Sys-SysTicks: %d:", sysStatus.SysTickCounter);
printf("Sys-Voltage (mv): %d:", sysStatus.BatteryStatus);
...
Here is the call graph for this function:

◆ GetTxPowerLimitConfig()

bool WiMODLoRaWAN::GetTxPowerLimitConfig ( TWiMODLORAWAN_TxPwrLimitConfig txPwrLimitCfg,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Get the configured TX limits for all sub-bands.

Parameters
txPwrLimitCfgpointer to store area for result
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
Here is the call graph for this function:

◆ JoinNetwork()

bool WiMODLoRaWAN::JoinNetwork ( TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Start joining the network via the OTAA procedure. Asynchronous process.

This functions starts an asynchronous process of joining to a network. It will take a time until a (final) result is ready. Therefore the callback interface (e.g. RegisterJoinedNwkIndicationClient) should be used.

See also
TWiMODLRResultCodes for interpretation of the values
Parameters
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
msc_inline_mscgraph_32
void myNwkJoinedCallback(TWiMODLR_HCIMessage& rxMsg) {
// handle and check the given rsp data of the server
...
}
void setup() {
...
// setup OTAA / join related parameters and transfer it to WiMOD
wimod.SetJoinParameter(joinParams);
// register joined nwk callback
wimod.RegisterJoinedNwkIndicationClient(myNwkJoinedCallback);
// start OTAA procedure by sending a join request
if (wimod.JoinNetwork()) {
// OK procedure has been started
// wait for callback indicating status of procedure
} else {
// error
...
}
...
Here is the call graph for this function:

◆ Ping()

bool WiMODLoRaWAN::Ping ( TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Ping Cmd - Checks the serial connection to the WiMOD module.

See also
HCI command specification.
Parameters
hciResultpointer for storing the the local HCI transfer result. This is an optional parameter.
rspStatuspointer to store the response code of the WiMOD This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
if (wimod.Ping()) {
// success ...
} else {
// error ...
}

OR:

if (!wimod.Ping(&hciResult)) {
// error: check HCI result codes
if (WiMODLR_RESULT_TRANMIT_ERROR == hciResult) {...}
if (WiMODLR_RESULT_NO_RESPONSE == hciResult) {...}
}

OR:

uint8 rspCode;
if (!wimod.Ping(&hciResult, &rspCode)) {
// error: check HCI result codes
if (WiMODLR_RESULT_OK == hciResult) {
if (rspCode == DEVMGMT_STATUS_ERROR) {
// operation failed
}
...
}
...
}
Here is the call graph for this function:

◆ ReactivateDevice()

bool WiMODLoRaWAN::ReactivateDevice ( UINT32 *  devAdr,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Re-Activates the device via the ABP procedure.

In case the device has been previously activated (e.g. during manufacturing) the user does not know the security keys. In this case a re-activation procedure must be used in order to use the stored values. (For ABP ONLY!)

See also
TWiMODLRResultCodes for interpretation of the values
Parameters
devAdrpointer where the store the "received" device address
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
msc_inline_mscgraph_33
// ABP data
const uint32_t DEV_ADR = 0x22;
// security keys are not known the user
void setup() {
// local variable
uint32_t devAddr = DEV_ADR;
// activate device
if (wimod.ReactivateDevice(activationData)) {
// ABP procedure done
...
} else {
// Error executing ABP join request
...
}
...
Here is the call graph for this function:

◆ RegisterJoinedNwkIndicationClient()

void WiMODLoRaWAN::RegisterJoinedNwkIndicationClient ( TJoinedNwkIndicationCallback  cb)

Register a callback function for the event "Joined Nwk Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters
cbpointer to a callback function that should be called if the event occurs.
msc_inline_mscgraph_34
Here is the call graph for this function:

◆ RegisterJoinTxIndicationClient()

void WiMODLoRaWAN::RegisterJoinTxIndicationClient ( TJoinTxIndicationCallback  cb)

Register a callback function for the event "TX Join Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters
cbpointer to a callback function that should be called if the event occurs.
void myJoinReqTxCallback(TWiMODLR_HCIMessage& rxMsg) {
// handle and check the given rsp data of the server
wimod.convert(rxMsg, &txData);
printf("joining attempt: %d", txData.NumTxPackets);
...
}
void setup() {
...
// register joined nwk callback
wimod.RegisterJoinTxIndicationClient(myJoinReqTxCallback);
...
}
Here is the call graph for this function:

◆ RegisterNoDataIndicationClient()

void WiMODLoRaWAN::RegisterNoDataIndicationClient ( TNoDataIndicationCallback  cb)

Register a callback function for the event "TX Join Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters
cbpointer to a callback function that should be called if the event occurs.
msc_inline_mscgraph_35
void myNoDataInd() {
// no data has been received; timeout occurred.?
...
}
...
void setup() {
...
// setup user callback for "no data rx" indications
wimod.RegisterNoDataIndicationClient(myNoDataInd);
}
...
Here is the call graph for this function:

◆ RegisterPowerUpIndicationClient()

void WiMODLoRaWAN::RegisterPowerUpIndicationClient ( TDevMgmtPowerUpCallback  cb)

Register a callback function for the PowerUp Indication - optional -.

See also
TWiMODLRResultCodes for interpretation of the values
Parameters
cbPointer a callback function
See also
TDevMgmtPowerUpCallback for details
msc_inline_mscgraph_36
// user defined callback function
void myPowerUpCallback(void) {
// WiMOD just powered up
...
}
void setup() {
...
// "connect" the user defined to callback to the WiMOD callback feature
wimod.RegisterPowerUpIndicationClient(myPowerUpCallback);
...
}
Here is the call graph for this function:

◆ RegisterRtcAlarmIndicationClient()

void WiMODLoRaWAN::RegisterRtcAlarmIndicationClient ( TDevMgmtRtcAlarmCallback  cb)

Register a callback function for the RTC Alarm Indication - optional -.

See also
TWiMODLRResultCodes for interpretation of the values
Parameters
cbPointer a callback function
See also
TDevMgmtRtcAlarmCallback for details
msc_inline_mscgraph_37
// user defined callback function
void myRtcAlarmCallback(void) {
// RTC Alarm has just been triggered
...
}
void setup() {
...
// "connect" the user defined to callback to the WiMOD callback feature
wimod.RegisterRtcAlarmIndicationClient(myRtcAlarmCallback);
...
}
Here is the call graph for this function:

◆ RegisterRxAckIndicationClient()

void WiMODLoRaWAN::RegisterRxAckIndicationClient ( TRxAckIndicationCallback  cb)

Register a callback function for the event "RX ACK (data) Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters
cbpointer to a callback function that should be called if the event occurs.
msc_inline_mscgraph_38
Here is the call graph for this function:

◆ RegisterRxCDataIndicationClient()

void WiMODLoRaWAN::RegisterRxCDataIndicationClient ( TRxCDataIndicationCallback  cb)

Register a callback function for the event "RX C-Data Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters
cbpointer to a callback function that should be called if the event occurs.
msc_inline_mscgraph_39
Here is the call graph for this function:

◆ RegisterRxMacCmdIndicationClient()

void WiMODLoRaWAN::RegisterRxMacCmdIndicationClient ( TRxMacCmdIndicationCallback  cb)

Register a callback function for the event "RX MAC Cmd Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters
cbpointer to a callback function that should be called if the event occurs.
msc_inline_mscgraph_40
Here is the call graph for this function:

◆ RegisterRxUDataIndicationClient()

void WiMODLoRaWAN::RegisterRxUDataIndicationClient ( TRxUDataIndicationCallback  cb)

Register a callback function for the event "RX U-Data Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters
cbpointer to a callback function that should be called if the event occurs.
msc_inline_mscgraph_41
Here is the call graph for this function:

◆ RegisterTxCDataIndicationClient()

void WiMODLoRaWAN::RegisterTxCDataIndicationClient ( TTxCDataIndicationCallback  cb)

Register a callback function for the event "TX C-Data Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters
cbpointer to a callback function that should be called if the event occurs.
msc_inline_mscgraph_42
void myTxInd(TWiMODLR_HCIMessage& rxMsg) {
// convert/copy the raw message to tx indication data
if (wimod.convert(rxMsg, &txData)) {
// OK, process data
...
}
}
...
void setup() {
...
// setup user callback(s) for TX indication events
wimod.RegisterTxCDataIndicationClient(myTxInd);
}
...
Here is the call graph for this function:

◆ RegisterTxUDataIndicationClient()

void WiMODLoRaWAN::RegisterTxUDataIndicationClient ( TTxUDataIndicationCallback  cb)

Register a callback function for the event "TX U Data Indication".

This registered callback is called when the specified event is called by the WiMOD stack.

Parameters
cbpointer to a callback function that should be called if the event occurs.
msc_inline_mscgraph_43
void myTxInd(TWiMODLR_HCIMessage& rxMsg) {
// convert/copy the raw message to tx indication data
if (wimod.convert(rxMsg, &txData)) {
// OK, process data
...
}
}
...
void setup() {
...
// setup user callback(s) for TX indication events
wimod.RegisterTxUDataIndicationClient(myTxInd);
}
...
Here is the call graph for this function:

◆ Reset()

bool WiMODLoRaWAN::Reset ( TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Reset Cmd - Reboots the WiMOD module.

See also
HCI command specification.
Parameters
hciResultpointer for storing the the local HCI transfer result. This is an optional parameter.
rspStatuspointer to store the response code of the WiMOD This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
Here is the call graph for this function:

◆ SendCData()

bool WiMODLoRaWAN::SendCData ( const TWiMODLORAWAN_TX_Data data,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Tries to send transmit C-Data to network server via RF link.

Parameters
datapointer to data structure containing the TX-data and options.
See also
TWiMODLORAWAN_TX_Data for details
Parameters
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
msc_inline_mscgraph_44
...
// local variable
TWiMODLORAWAN_TX_Data txData;
// setup tx packet
txData.Port = 1;
txData.Length = strlen("Hello World!");
strncpy(txData.Payload, "Hello World!", WiMODLORAWAN_APP_PAYLOAD_LEN);
// send data
wimod.SendCData(&txData);
...
// if ACK callback has been registered: wait for callback
// to be called and check the received indication data
// in order to get the status of the transmission
...
Here is the call graph for this function:

◆ SendMacCmd()

bool WiMODLoRaWAN::SendMacCmd ( const TWiMODLORAWAN_MacCmd cmd,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Send a MAC command to the server; expert level only.

Parameters
cmdpointer containing the MAC command and parameters
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
...
// (local) variable
TWiMODLORAWAN_MacCmd macCmd;
// setup
macCmd.DataServiceType = LORAWAN_MAC_DATA_SERVICE_TYPE_U_DATA;
macCmd.MacCmdID = // see LoRa spec. for MAC command IDs
macCmd.Length = ...;
macCmd.Payload = ...;
// send mac command
if (wimod.SendMacCmd(macCmd)) {
...
}
...
Here is the call graph for this function:

◆ SendUData()

bool WiMODLoRaWAN::SendUData ( const TWiMODLORAWAN_TX_Data data,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Tries to send transmit U-Data to network server via RF link.

Parameters
datapointer to data structure containing the TX-data and options.
See also
TWiMODLORAWAN_TX_Data for details
Parameters
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
msc_inline_mscgraph_45
...
// local variable
TWiMODLORAWAN_TX_Data txData;
// setup tx packet
txData.Port = 1;
txData.Length = strlen("Hello World!");
strncpy(txData.Payload, "Hello World!", WiMODLORAWAN_APP_PAYLOAD_LEN);
// send data
wimod.SendUData(&txData);
...
Here is the call graph for this function:

◆ SetBatteryLevelStatus()

bool WiMODLoRaWAN::SetBatteryLevelStatus ( UINT8  battStatus,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Set the Battery Level Status.


**


**

Parameters
battStatusStatus value; 0 : mains power, 1-254 : batt level; 255: undefiend
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
Here is the call graph for this function:

◆ SetCustomConfig()

bool WiMODLoRaWAN::SetCustomConfig ( const INT8  rfGain,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Setup a custom config for tx power settings; expert level only.

Parameters
rfGainnew rfGain value for tx power settings; see HCI Spec.
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
Here is the call graph for this function:

◆ SetDeviceEUI()

bool WiMODLoRaWAN::SetDeviceEUI ( const UINT8 *  deviceEUI,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Sets a new DeviceEUI (aka. IEEE-Address) to the WiMOD.

Note: Setting a new DeviceEUI is requires to switch to customer operation mode. In "normal" application mode, this command is locked.

Parameters
deviceEUIpointer to data structure containing the new parameters (Must be an pointer of a 64bit address)
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
...
// (local) variable for the device EUI
uint8_t devEUI[8];
// setup deviceEUI
...
// send the devEUI to the WiMOD module
if (wimod.SetDeviceEUI(devEUI)) {
// WiMOD module will use the given devEUI...
}
...
Here is the call graph for this function:

◆ SetHciConfig()

bool WiMODLoRaWAN::SetHciConfig ( TWiMODLR_DevMgmt_HciConfig hciConfig,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Sets a new HCI configuration of the WiMOD.

See also
HCI documentation and feature specification for details
Warning
Changing the Baudrate applies instandly afer the command is executed!
Parameters
hciConfigPointer to a structure where to store the HCI config related information
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
// create a local variable
// create new config values
...
// set information of WiMOD
wimod.GetHciConfig(&hciConfig);
...
Here is the call graph for this function:

◆ SetJoinParameter()

bool WiMODLoRaWAN::SetJoinParameter ( TWiMODLORAWAN_JoinParams joinParams,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Sets the parameters used for the OTAA activation procedure.

See also
TWiMODLRResultCodes for interpretation of the values
Parameters
joinParamsstructure holding the necessary parameters
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
// OTAA data
const char JOINEUI[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 };
const char APPKEY[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0f, 0x10 };
void setup() {
// local variable
// setup parameters
memcpy(joinParams.JoinEUI, JOINEUI, 8);
memcpy(joinParams.AppKey, APPKEY, 16);
// transfer parameters to WiMOD
wimod.SetJoinParameter(joinParams);
...
Here is the call graph for this function:

◆ SetOperationMode()

bool WiMODLoRaWAN::SetOperationMode ( const TWiMOD_OperationMode  opMode,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Sets the current operation mode of the WiMOD module.

See also
TWiMODLRResultCodes for interpretation of the values
Parameters
opModeThe new operation mode to set
See also
TWiMOD_OperationMode for details
Parameters
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
// create a local variable
// set new operation mode
// set information of WiMOD
wimod.SetOperationMode(opMode);
...
Here is the call graph for this function:

◆ SetRadioStackConfig()

bool WiMODLoRaWAN::SetRadioStackConfig ( TWiMODLORAWAN_RadioStackConfig data,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Sets a new radio config parameter set of the WiMOD.

Parameters
datapointer to data structure containing the new parameters
See also
TWiMODLORAWAN_TX_Data for details
Parameters
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
...
// local variable
TWiMODLORAWAN_RadioStackConfig radioCfg;
// setup new config
radioCfg.DataRateIndex = (uint8_t) LoRaWAN_DataRate_EU868_LoRa_SF9_125kHz;
radioCfg.TXPowerLevel = LORAWAN_TX_POWER_LEVEL_MIN;
radioCfg.Options = LORAWAN_STK_OPTION_ADR |
radioCfg.PowerSavingMode = LORAWAN_POWER_SAVING_MODE_OFF;
radioCfg.Retransmissions = 7;
radioCfg.BandIndex = LORAWAN_BAND_EU_868_RX2_SF9;
// set new radio config
wimod.SetRadioStackConfig(&radioCfg);
// wait a little bit for config activation
Here is the call graph for this function:

◆ SetRtc()

bool WiMODLoRaWAN::SetRtc ( const UINT32  rtcTime,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Sets the current RTC values to WiMOD module.

See also
TWiMODLRResultCodes for interpretation of the values
Parameters
rtcTimeRTC information to setup
See also
WIMOD_RTC_MAKE_DATETIME_U32 Macro for conversation of this value
Parameters
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
// create a local variable
uint32_t timestamp;
// convert date/time to timestamp format ( 1st Oct 2016 16:12:55 )
timestamp = WIMOD_RTC_MAKE_DATETIME_U32(55, 12, 16, 1, 10, 2016);
// set information to WiMOD
wimod.SetRtc(timestamp);
...
Here is the call graph for this function:

◆ SetRtcAlarm()

bool WiMODLoRaWAN::SetRtcAlarm ( const TWiMODLR_DevMgmt_RtcAlarm rtcAlarm,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Sets and enables the RTC alarm feature of the WiMOD.

See also
TWiMODLRResultCodes for interpretation of the values
Parameters
rtcAlarmPointer to a structure containing the RTC alarm related information
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
msc_inline_mscgraph_46
// create a local variable
// setup RTC Alarm
rtcAlarm.Options = RTC_Alarm_Single; // single, non repeated alarm
rtcAlarm.Hour = 13; // alarm at 13:45:20
rtcAlarm.Minutes = 32;
rtcAlarm.Seconds = 20;
// set information of WiMOD
wimod.SetRtcAlarm(&rtcAlarm);
...
// wait for alarm to occur
Here is the call graph for this function:

◆ SetTxPowerLimitConfig()

bool WiMODLoRaWAN::SetTxPowerLimitConfig ( TWiMODLORAWAN_TxPwrLimitConfig txPwrLimitCfg,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Set a single TX limit for a single sub-band.

Parameters
txPwrLimitCfgreference to read the data from
hciResultResult of the local command transmission to module This is an optional parameter.
rspStatusStatus byte contained in the local response of the module This is an optional parameter.
Return values
trueif everything is ok
falseif something went wrong; see hciResult & rspStatus for details
Here is the call graph for this function:

Member Data Documentation

◆ SapDevMgmt

WiMOD_SAP_DevMgmt_Lorawan WiMODLoRaWAN::SapDevMgmt
protected

Service Access Point for 'DeviceManagement'

◆ SapGeneric

WiMOD_SAP_Generic WiMODLoRaWAN::SapGeneric
protected

dumy SAP for generic HCI command

◆ SapLoRaWan

WiMOD_SAP_LoRaWAN WiMODLoRaWAN::SapLoRaWan
protected

Service Access Point for 'LoRaWAN'


The documentation for this class was generated from the following files:
WIMOD_RTC_GET_MONTHS
#define WIMOD_RTC_GET_MONTHS(t)
Definition: WiMOD_SAP_DEVMGMT_IDs.h:547
LORAWAN_STK_OPTION_DEV_CLASS_C
#define LORAWAN_STK_OPTION_DEV_CLASS_C
Definition: WiMOD_SAP_LORAWAN_IDs.h:270
TWiMODLORAWAN_RX_JoinedNwkData
Structure containing data of the joined network indication.
Definition: WiMOD_SAP_LORAWAN_IDs.h:551
TWiMODLORAWAN_RX_Data
Structure containing RX (user) payload data.
Definition: WiMOD_SAP_LORAWAN_IDs.h:514
WiMODLR_RESULT_SLIP_ENCODER_ERROR
@ WiMODLR_RESULT_SLIP_ENCODER_ERROR
Definition: WiMODLRHCI.h:155
LoRaWAN_Status_Length_Error
@ LoRaWAN_Status_Length_Error
Definition: WiMOD_SAP_LORAWAN_IDs.h:114
TWiMODLORAWAN_ActivateDeviceData::AppSKey
UINT8 AppSKey[WiMODLORAWAN_APP_SESSION_KEY_LEN]
Definition: WiMOD_SAP_LORAWAN_IDs.h:443
WIMOD_RTC_GET_MINUTES
#define WIMOD_RTC_GET_MINUTES(t)
Definition: WiMOD_SAP_DEVMGMT_IDs.h:545
TWiMODLR_DevMgmt_RtcAlarm::AlarmStatus
TWiMOD_RtcAlarmStatus AlarmStatus
Definition: WiMOD_SAP_DEVMGMT_IDs.h:487
TWiMODLORAWAN_TxIndData
Activation data structure for LoRa network activation.
Definition: WiMOD_SAP_LORAWAN_IDs.h:472
TWiMODLR_DevMgmt_HciConfig::BaudrateID
TWiMOD_HCI_Baudrate BaudrateID
Definition: WiMOD_SAP_DEVMGMT_IDs.h:525
WiMODLR_RESULT_TRANMIT_ERROR
@ WiMODLR_RESULT_TRANMIT_ERROR
Definition: WiMODLRHCI.h:154
TWiMODLR_DevMgmt_FwInfo
Basic information about the current firmware of the WiMOD.
Definition: WiMOD_SAP_DEVMGMT_IDs.h:220
WiMODLoRaWAN
Main class representing the interface to the WiMOD running the firmware LoRaWAN EndNode Modem.
Definition: WiMODLoRaWAN.h:90
WiMODLoRaWAN.h
TWiMODLR_HCIMessage
basic low level HCI message structure used for all serial messages to/from WiMOD
Definition: WiMODLRHCI.h:120
TWiMODLORAWAN_JoinParams::AppKey
UINT8 AppKey[WiMODLORAWAN_APP_KEY_LEN]
Definition: WiMOD_SAP_LORAWAN_IDs.h:453
LoRaWAN_Status_Channel_Blocked
@ LoRaWAN_Status_Channel_Blocked
Definition: WiMOD_SAP_LORAWAN_IDs.h:116
LoRaWAN_Status_Error
@ LoRaWAN_Status_Error
Definition: WiMOD_SAP_LORAWAN_IDs.h:107
WiMODLR_RESULT_OK
@ WiMODLR_RESULT_OK
Definition: WiMODLRHCI.h:151
TWiMODLORAWAN_TxIndData::NumTxPackets
UINT8 NumTxPackets
Definition: WiMOD_SAP_LORAWAN_IDs.h:482
TWiMODLR_DevMgmt_DevInfo::DevAdr
UINT16 DevAdr
Definition: WiMOD_SAP_DEVMGMT_IDs.h:176
TWiMODLR_DevMgmt_RtcAlarm
Structure containing the RTC Alarm config parameters of the WiMOD.
Definition: WiMOD_SAP_DEVMGMT_IDs.h:484
TWiMODLR_DevMgmt_SystemStatus::SysTickCounter
UINT32 SysTickCounter
Definition: WiMOD_SAP_DEVMGMT_IDs.h:238
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
RTC_Alarm_Single
@ RTC_Alarm_Single
Definition: WiMOD_SAP_DEVMGMT_IDs.h:477
WIMOD_RTC_GET_YEARS
#define WIMOD_RTC_GET_YEARS(t)
Definition: WiMOD_SAP_DEVMGMT_IDs.h:553
TWiMODLR_DevMgmt_RtcAlarm::Hour
UINT8 Hour
Definition: WiMOD_SAP_DEVMGMT_IDs.h:490
TWiMODLORAWAN_JoinParams
JOIN data structure for LoRa network activation.
Definition: WiMOD_SAP_LORAWAN_IDs.h:450
WIMOD_RTC_MAKE_DATETIME_U32
#define WIMOD_RTC_MAKE_DATETIME_U32(s, m, h, dd, mm, yy)
Definition: WiMOD_SAP_DEVMGMT_IDs.h:556
LoRaWAN_Status_Channel_Not_Available
@ LoRaWAN_Status_Channel_Not_Available
Definition: WiMOD_SAP_LORAWAN_IDs.h:117
WimodHciBaudrate_57600
@ WimodHciBaudrate_57600
Definition: WiMOD_SAP_DEVMGMT_IDs.h:506
TWiMODLORAWAN_JoinParams::JoinEUI
UINT8 JoinEUI[WiMODLORAWAN_JOIN_EUI_LEN]
Definition: WiMOD_SAP_LORAWAN_IDs.h:452
TWiMODLORAWAN_RX_ACK_Data
Data structure for received Acknowledgment data.
Definition: WiMOD_SAP_LORAWAN_IDs.h:602
LORAWAN_STK_OPTION_ADR
#define LORAWAN_STK_OPTION_ADR
Definition: WiMOD_SAP_LORAWAN_IDs.h:268
TWiMODLR_DevMgmt_FwInfo::FirmwareMinorVersion
UINT8 FirmwareMinorVersion
Definition: WiMOD_SAP_DEVMGMT_IDs.h:223
WIMOD_RTC_GET_SECONDS
#define WIMOD_RTC_GET_SECONDS(t)
Definition: WiMOD_SAP_DEVMGMT_IDs.h:543
TWiMODLR_DevMgmt_DevInfo::ModuleType
UINT8 ModuleType
Definition: WiMOD_SAP_DEVMGMT_IDs.h:175
TWiMODLR_DevMgmt_RtcAlarm::Seconds
UINT8 Seconds
Definition: WiMOD_SAP_DEVMGMT_IDs.h:492
WIMOD_RTC_GET_HOURS
#define WIMOD_RTC_GET_HOURS(t)
Definition: WiMOD_SAP_DEVMGMT_IDs.h:549
LoRaWAN_Status_Device_Not_Activated
@ LoRaWAN_Status_Device_Not_Activated
Definition: WiMOD_SAP_LORAWAN_IDs.h:111
TWiMODLR_DevMgmt_FwInfo::FirmwareName
UINT8 FirmwareName[WIMOD_DEVMGMT_MAX_FIRMWARE_NAME_LEN]
Definition: WiMOD_SAP_DEVMGMT_IDs.h:227
TWiMODLR_DevMgmt_RtcAlarm::Minutes
UINT8 Minutes
Definition: WiMOD_SAP_DEVMGMT_IDs.h:491
WIMOD_RTC_GET_DAYS
#define WIMOD_RTC_GET_DAYS(t)
Definition: WiMOD_SAP_DEVMGMT_IDs.h:551
LoRaWAN_Status_Cmd_Not_Supported
@ LoRaWAN_Status_Cmd_Not_Supported
Definition: WiMOD_SAP_LORAWAN_IDs.h:108
TWiMODLR_DevMgmt_SystemStatus::BatteryStatus
UINT16 BatteryStatus
Definition: WiMOD_SAP_DEVMGMT_IDs.h:241
TWiMODLR_DevMgmt_DevInfo
Structure containing basic information about the WiMOD device.
Definition: WiMOD_SAP_DEVMGMT_IDs.h:172
WiMODLR_RESULT_PAYLOAD_PTR_ERROR
@ WiMODLR_RESULT_PAYLOAD_PTR_ERROR
Definition: WiMODLRHCI.h:153
LoRaWAN_DataRate_EU868_LoRa_SF9_125kHz
@ LoRaWAN_DataRate_EU868_LoRa_SF9_125kHz
Definition: WiMOD_SAP_LORAWAN_IDs_EU868.h:102
LoRaWAN_Status_Ok
@ LoRaWAN_Status_Ok
Definition: WiMOD_SAP_LORAWAN_IDs.h:106
LORAWAN_STK_OPTION_EXT_PKT_FORMAT
#define LORAWAN_STK_OPTION_EXT_PKT_FORMAT
Definition: WiMOD_SAP_LORAWAN_IDs.h:273
TWiMODLORAWAN_RX_MacCmdData
Structure containing a received MAC command.
Definition: WiMOD_SAP_LORAWAN_IDs.h:534
TWiMODLRResultCodes
TWiMODLRResultCodes
Result codes for the local serial communication itself.
Definition: WiMODLRHCI.h:149
TWiMODLR_DevMgmt_FwInfo::FirmwareMayorVersion
UINT8 FirmwareMayorVersion
Definition: WiMOD_SAP_DEVMGMT_IDs.h:224
LoRaWAN_Status_Device_Busy
@ LoRaWAN_Status_Device_Busy
Definition: WiMOD_SAP_LORAWAN_IDs.h:112
WiMODLR_RESULT_NO_RESPONSE
@ WiMODLR_RESULT_NO_RESPONSE
Definition: WiMODLRHCI.h:156
TWiMODLORAWAN_ActivateDeviceData
Activation data structure for LoRa network activation.
Definition: WiMOD_SAP_LORAWAN_IDs.h:439
LoRaWAN_Status_No_Factory_Settings
@ LoRaWAN_Status_No_Factory_Settings
Definition: WiMOD_SAP_LORAWAN_IDs.h:115
TWiMODLR_DevMgmt_HciConfig
HCI Configuration Parameters.
Definition: WiMOD_SAP_DEVMGMT_IDs.h:519
TWiMODLR_DevMgmt_HciConfig::NumWakeUpChars
UINT16 NumWakeUpChars
Definition: WiMOD_SAP_DEVMGMT_IDs.h:526
TWiMODLORAWAN_ActivateDeviceData::DeviceAddress
UINT32 DeviceAddress
Definition: WiMOD_SAP_LORAWAN_IDs.h:441
LoRaWAN_Status_Wrong_parameter
@ LoRaWAN_Status_Wrong_parameter
Definition: WiMOD_SAP_LORAWAN_IDs.h:109
LoRaWAN_Status_Wrong_DeviceMode
@ LoRaWAN_Status_Wrong_DeviceMode
Definition: WiMOD_SAP_LORAWAN_IDs.h:110
TWiMODLORAWAN_ActivateDeviceData::NwkSKey
UINT8 NwkSKey[WiMODLORAWAN_NWK_SESSION_KEY_LEN]
Definition: WiMOD_SAP_LORAWAN_IDs.h:442
TWiMODLR_DevMgmt_SystemStatus
Basic information about system status of the WiMOD.
Definition: WiMOD_SAP_DEVMGMT_IDs.h:234
RTC_Alarm_Alarm_Set
@ RTC_Alarm_Alarm_Set
Definition: WiMOD_SAP_DEVMGMT_IDs.h:462
LoRaWAN_Status_Queue_Full
@ LoRaWAN_Status_Queue_Full
Definition: WiMOD_SAP_LORAWAN_IDs.h:113
OperationMode_Application
@ OperationMode_Application
Definition: WiMOD_SAP_DEVMGMT_IDs.h:442
TWiMODLR_DevMgmt_RtcAlarm::Options
TWiMOD_RtcAlarmType Options
Definition: WiMOD_SAP_DEVMGMT_IDs.h:489
WiMODLR_RESULT_PAYLOAD_LENGTH_ERROR
@ WiMODLR_RESULT_PAYLOAD_LENGTH_ERROR
Definition: WiMODLRHCI.h:152