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

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

#include <WiMODProLink.h>

Inheritance diagram for WiMODProLink:
Collaboration diagram for WiMODProLink:

Public Member Functions

 WiMODProLink (Stream &s)
 Constructor. More...
 
 ~WiMODProLink (void)
 Desctructor.
 
void begin (TProLinkLoRaWANregion region=ProLink_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 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 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...
 
bool GetOperationMode (TWiMOD_OperationMode *opMode, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 
bool SetOperationMode (const TWiMOD_OperationMode opMode, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 
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 GetRadioStack (TRadioStack_Mode *stackMode, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Gets the active Radio Stack Mode of the WiMOD (only ProLink firmware) More...
 
bool SetRadioStack (const TRadioStack_Mode &stackMode, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Sets the active Radio Stack Mode of the WiMOD (only ProLink firmware) More...
 
bool SetDeviceConfig (const TProLinkDeviceConfig &config, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Sets the common Device config features of the WiMOD (only ProLink firmware) More...
 
bool GetDeviceConfig (TProLinkDeviceConfig *config, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Gets the common Device config of the WiMOD (only ProLink firmware) More...
 
bool ResetDeviceConfig (TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Resets the settings about the common stack features of the WiMOD module (ProLink firmware) More...
 
bool GetDeviceStatus (TProLinkDeviceStatus *devStatus, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 GetDeviceStatus Cmd - Gets the basic information about the device status 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 (TWiMODProLinkLORAWAN_TX_Data *data, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Tries to send transmit U-Data to network server via RF link. More...
 
bool SendCData (TWiMODProLinkLORAWAN_TX_Data *data, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Tries to send transmit C-Data to network server via RF link. More...
 
bool SetRadioStackConfig (TWiMODProLinkLORAWAN_RadioStackConfig *data, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Sets a new radio config parameter set of the WiMOD. More...
 
bool GetRadioStackConfig (TWiMODProLinkLORAWAN_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 SetDeviceNonce (const UINT16 devNonce, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Set the Device Nonce / DevNonce for the next Join OTAA procedure. More...
 
bool GetDeviceNonce (UINT16 *devNonce, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Get the Device Nonce / DevNonce that will be used for next Join OTAA procedure. More...
 
bool SetMulticastConfig (TWiMODLORAWAN_McastConfig &mcastCfg, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Set a (new) Configuration for Multicast Mode. More...
 
bool GetMulticastConfig (TWiMODLORAWAN_McastConfig *mcastCfg, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Get a single Multicase configuration from module. More...
 
bool RemoveMulticastConfig (const UINT8 mcastIndex, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Remove a single Multicast configuration from module. More...
 
void RegisterResetDevNonceIndicationClient (TResetDevNonceIndicationCallback cb)
 Register a callback function for the event "Reset DevNonce Indication". More...
 
bool SetJoinNonce (const UINT16 joinNonce, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Set the Join Nonce for the next Join OTAA procedure. More...
 
bool GetJoinNonce (UINT16 *joinNonce, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Get the Join Nonce that will be used for next Join OTAA procedure. More...
 
void RegisterLinkDiconnectIndicationClient (TLinkDisconnectIndicationCallback cb)
 Register a callback function for the event "Link Disconnect Indication". More...
 
bool SendNwkTimeRequest (TWiMODLORAWAN_DevTimeReqInfo *devTimeInfo, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Send a Network Time Request /DevTimeRequest via MAC Cmd to LNS. More...
 
void RegisterNwkTimeAnsIndicationClient (TNwkDeviceTimeAnsIndicationCallback cb)
 Register a callback function for the event "DeviceTimeAnser Indication". More...
 
void RegisterMulticastDataIndicationClient (TMCastDataIndicationCallback cb)
 Register a callback function for the event "MultiCast Data (Rx) Indication". More...
 
void RegisterMulticastInvalidDataIndicationClient (TMCastInvalidDataIndicationCallback cb)
 Register a callback function for the event "Invalid MultiCast Data (RX) Indication". More...
 
bool convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLORAWAN_DevTimeAnsInfo *info)
 Convert a received low level HCI-Msg to a high-level NkwDeviceTimeAnswer structure. More...
 
bool convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLORAWAN_McastData *mcastData)
 Convert a received low level HCI-Msg to a high-level Multicast Data structure. More...
 
bool convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLORAWAN_McastNoData *mcastErrData)
 Convert a received low level HCI-Msg to a high-level Multicast Data structure. More...
 
bool GetRadioLinkRadioConfig (TWiMODLR_ProLinkRadioLink_RadioConfig *radioCfg, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Get the current RadioConfig used for the proprietary LoRa communication feature. More...
 
bool SetRadioLinkRadioConfig (const TWiMODLR_ProLinkRadioLink_RadioConfig *radioCfg, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Set a new RadioConfig to be used for the proprietary LoRa communication feature. More...
 
bool ResetRadioLinkRadioConfig (TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Reset the RadioConfig for the proprietary LoRa communication feature to defaults. More...
 
bool SetRadioLinkAesKey (const UINT8 *key, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Sets an AES encryption key for the proprietary LoRa communication feature. More...
 
bool GetRadioLinkAesKey (UINT8 *key, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Gets the current AES encryption of the proprietary LoRa communication feature. More...
 
bool SendRadioLinkUData (const TWiMODLR_RadioLink_Msg *data, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL)
 Tries to send transmit U-Data to a peer using proprietary LoRa mode. More...
 
void RegisterRadioLinkRxUDataIndicationClient (TRadioLinkUDataRxIndicationCallback cb)
 Register a callback function for the event "RX U-Data Indication". More...
 
void RegisterRadioLinkTxUDataIndicationClient (TRadioLinkUDataTxIndicationCallback cb)
 Register a callback function for the TX U-Data Indication - optional -. More...
 
void calcFreqToRegister (uint32_t freq, uint8_t *msb, uint8_t *mid, uint8_t *lsb)
 Convert a frequency in Hz to the corresponding low level register values. More...
 
uint32_t calcRegisterToFreq (uint8_t msb, uint8_t mid, uint8_t lsb)
 Convert a frequency registers to frequency in Hz. More...
 
bool convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLR_RadioLink_Msg *radioLinkMsg)
 Convert a received low level HCI-Msg to a high-level RadioLink-Msg. More...
 
bool convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLR_RadioLink_UdataInd *uDataTxInfo)
 Convert a received low level HCI-Msg to a high-level UDataTx Info. 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)
 
bool copyProLinkRadioLinkResultInfos (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_ProLink SapDevMgmt
 
WiMOD_SAP_LoRaWAN_ProLink SapLoRaWan
 
WiMOD_SAP_RadioLink_ProLink SapRadioLink
 
WiMOD_SAP_Generic SapGeneric
 

Detailed Description

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

This class is the only API class a user should use for interacting with a WiMOD module that runs the IMST ProLink LoRaWAN Modem firmware.

Constructor & Destructor Documentation

◆ WiMODProLink()

WiMODProLink::WiMODProLink ( Stream &  s)

Constructor.

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

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

Member Function Documentation

◆ ActivateDevice()

bool WiMODProLink::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_92
// 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 WiMODProLink::begin ( TProLinkLoRaWANregion  region = ProLink_LoRaWAN_Region_EU868)

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

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

◆ calcFreqToRegister()

void WiMODProLink::calcFreqToRegister ( uint32_t  freq,
uint8_t *  msb,
uint8_t *  mid,
uint8_t *  lsb 
)

Convert a frequency in Hz to the corresponding low level register values.

Parameters
freqTarget frequencey in Hz
msbPointer to register value for MSB-Part
midPointer to register value for MID-Part
lsbPointer to register value for LSB-Part
Here is the call graph for this function:

◆ calcRegisterToFreq()

uint32_t WiMODProLink::calcRegisterToFreq ( uint8_t  msb,
uint8_t  mid,
uint8_t  lsb 
)

Convert a frequency registers to frequency in Hz.

Parameters
msbregister value for MSB-Part
midregister value for MID-Part
lsbregister value for LSB-Part

return Frequency in Hz

Here is the call graph for this function:

◆ ClearRtcAlarm()

bool WiMODProLink::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 WiMODProLink::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/11]

bool WiMODProLink::convert ( TWiMODLR_HCIMessage RxMsg,
TWiMODLORAWAN_DevTimeAnsInfo info 
)

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

This function should be used by the NwkTimeAnswer 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_93
Here is the call graph for this function:

◆ convert() [2/11]

bool WiMODProLink::convert ( TWiMODLR_HCIMessage RxMsg,
TWiMODLORAWAN_McastData mcastData 
)

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

This function should be used by the MultiCast RX Data 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_94
Here is the call graph for this function:

◆ convert() [3/11]

bool WiMODProLink::convert ( TWiMODLR_HCIMessage RxMsg,
TWiMODLORAWAN_McastNoData mcastErrData 
)

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

This function should be used by the MultiCast RX Data 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_95
Here is the call graph for this function:

◆ convert() [4/11]

bool WiMODProLink::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_96
Here is the call graph for this function:

◆ convert() [5/11]

bool WiMODProLink::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_97
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() [6/11]

bool WiMODProLink::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_98
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() [7/11]

bool WiMODProLink::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_99
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() [8/11]

bool WiMODProLink::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_100
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() [9/11]

bool WiMODProLink::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_101
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:

◆ convert() [10/11]

bool WiMODProLink::convert ( TWiMODLR_HCIMessage RxMsg,
TWiMODLR_RadioLink_Msg radioLinkMsg 
)

Convert a received low level HCI-Msg to a high-level RadioLink-Msg.

This function should be used by the RxUData / RxCData callback functions prior processing the received data message.

Parameters
RxMsgReference to low-level HCI message.
Warning
DO NOT MANIPULATE THESE VALUES !!!
Parameters
radioLinkMsgPointer to the buffer where to store the received data
Return values
trueif the conversion was successful
msc_inline_mscgraph_102
// global buffer for incoming messages
void myRxDataInd(TWiMODLR_HCIMessage& rxMsg) {
// convert/copy the raw message to RX radio buffer
if (wimod.convert(rxMsg, &radioRxMsg)) {
// access the radioRxMsg fields
// radioRxMsg.Length
// radioRxMsg.Payload
...
}
}
...
void setup() {
...
// init the communication stack
wimod.begin();
// register callbacks for incoming RF messages
wimod.RegisterUDataRxClient(myRxDataInd);
...
}
Here is the call graph for this function:

◆ convert() [11/11]

bool WiMODProLink::convert ( TWiMODLR_HCIMessage RxMsg,
TWiMODLR_RadioLink_UdataInd uDataTxInfo 
)

Convert a received low level HCI-Msg to a high-level UDataTx Info.

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

Parameters
RxMsgReference to low-level HCI message.
Warning
DO NOT MANIPULATE THESE VALUES !!!
Parameters
uDataTxInfoPointer to the buffer where to store the received data
Return values
trueif the conversion was successful
msc_inline_mscgraph_103
// global buffer for indication that UData has been send
void myTxUDataInd(TWiMODLR_HCIMessage& rxMsg) {
// convert/copy the raw message to RX radio buffer
if (wimod.convert(rxMsg, &txDataMsg)) {
// access the fields folding information about the transmission
// txDataMsg.TxEventCounter
...
}
}
...
void setup() {
...
// init the communication stack
wimod.begin();
// register callback
wimod.RegisterRadioLinkTxUDataIndicationClient(myTxUDataInd);
...
}
Here is the call graph for this function:

◆ ConvertAppEuiStrToArray()

void WiMODProLink::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 / JoinEUI 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 / joinEUI
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 WiMODProLink::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 WiMODProLink::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 WiMODProLink::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 WiMODProLink::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 WiMODProLink::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 WiMODProLink::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 WiMODProLink::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:

◆ GetDeviceConfig()

bool WiMODProLink::GetDeviceConfig ( TProLinkDeviceConfig config,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Gets the common Device config of the WiMOD (only ProLink firmware)

See also
HCI documentation and feature specification for details
Parameters
configThe common config options used by all stacks of the WiMOD
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
...
// reqeust the information of WiMOD
wimod.GetDeviceConfig(&config);
// check the enabled features
if (config.PowerSavingMode == 1) {
// automatic power saving mode is on
// a SLIP wakeup sequence is needed for serial communication
....
}
if (mode.MiscOptions & PROLINK_DEVICE_CFG_MISC_HCI_PWR_UP_IND_ENABLED) {
// the WiMOD will generate a PowerUp indication on PowerUp
....
}
...

◆ GetDeviceEUI()

bool WiMODProLink::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 WiMODProLink::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:

◆ GetDeviceNonce()

bool WiMODProLink::GetDeviceNonce ( UINT16 *  devNonce,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Get the Device Nonce / DevNonce that will be used for next Join OTAA procedure.

Parameters
devNoncepointer to 16 bit value where to store the requested value
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:

◆ GetDeviceStatus()

bool WiMODProLink::GetDeviceStatus ( TProLinkDeviceStatus devStatus,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

GetDeviceStatus Cmd - Gets the basic information about the device 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.GetDeviceStatus(&devStatus);
//access fields of structure
printf("Sys-SysTicks: %d:", sysStatus.SysTickCounter);
printf("LoRaWAN UData packets: %d:", sysStatus.LoRaWAN_TxUDataPackets);
printf("LRBASE Tx packets: %d:", sysStatus.LRBASE_TxPackets);
...

◆ GetFirmwareInfo()

bool WiMODProLink::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 WiMODProLink::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:

◆ GetJoinNonce()

bool WiMODProLink::GetJoinNonce ( UINT16 *  joinNonce,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Get the Join Nonce that will be used for next Join OTAA procedure.

Parameters
joinNoncepointer to 16 bit value where to store the requested value
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:

◆ GetLastHciResult()

TWiMODLRResultCodes WiMODProLink::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_104
...
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 WiMODProLink::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

◆ GetMulticastConfig()

bool WiMODProLink::GetMulticastConfig ( TWiMODLORAWAN_McastConfig mcastCfg,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Get a single Multicase configuration from module.

Parameters
mcastCfgpointer to a multicast configuration structure The MultiCase index has be be setup prior calling this function. The resulting information will be put into this pointer
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

◆ GetNwkStatus()

bool WiMODProLink::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:

◆ GetRadioLinkAesKey()

bool WiMODProLink::GetRadioLinkAesKey ( UINT8 *  key,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Gets the current AES encryption of the proprietary LoRa communication feature.

This function tries to get the current AES encryption key that can be used in the proprietary LoRa communication feature (LR-BASE) of the ProLink firmware.

Hint: If the encryption key is actually used it defined by the MiscOptions-field in the RadioConfig settings structure.

Parameters
keya pointer where to store the retrieved key (128bit)
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:

◆ GetRadioLinkRadioConfig()

bool WiMODProLink::GetRadioLinkRadioConfig ( TWiMODLR_ProLinkRadioLink_RadioConfig radioCfg,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Get the current RadioConfig used for the proprietary LoRa communication feature.

This function tries to get the current configuration parameters that are used in the proprietary LoRa communication feature (LR-BASE) of the ProLink firmware.

Parameters
radioCfgpointer to a structure where to store the retrieved information of the radio module.
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:

◆ GetRadioStack()

bool WiMODProLink::GetRadioStack ( TRadioStack_Mode stackMode,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Gets the active Radio Stack Mode of the WiMOD (only ProLink firmware)

See also
HCI documentation and feature specification for details
Parameters
stackModepointer where to store the current stack mode 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
...
// reqeust the information of WiMOD
wimod.GetRadioStack(&mode);
if (mode == RadioStack_LoRaWAN) {
// the modem is in LoRaWAN mode
...
} else {
// the modem is in proprietary mode
...
}
...

◆ GetRadioStackConfig()

bool WiMODProLink::GetRadioStackConfig ( TWiMODProLinkLORAWAN_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 WiMODProLink::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 WiMODProLink::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 WiMODProLink::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:

◆ GetTxPowerLimitConfig()

bool WiMODProLink::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 WiMODProLink::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_105
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 WiMODProLink::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 WiMODProLink::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_106
// 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 WiMODProLink::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_107
Here is the call graph for this function:

◆ RegisterJoinTxIndicationClient()

void WiMODProLink::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:

◆ RegisterLinkDiconnectIndicationClient()

void WiMODProLink::RegisterLinkDiconnectIndicationClient ( TLinkDisconnectIndicationCallback  cb)

Register a callback function for the event "Link Disconnect 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_108
Here is the call graph for this function:

◆ RegisterMulticastDataIndicationClient()

void WiMODProLink::RegisterMulticastDataIndicationClient ( TMCastDataIndicationCallback  cb)

Register a callback function for the event "MultiCast Data (Rx) 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_109
Here is the call graph for this function:

◆ RegisterMulticastInvalidDataIndicationClient()

void WiMODProLink::RegisterMulticastInvalidDataIndicationClient ( TMCastInvalidDataIndicationCallback  cb)

Register a callback function for the event "Invalid MultiCast Data (RX) 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_110
Here is the call graph for this function:

◆ RegisterNoDataIndicationClient()

void WiMODProLink::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_111
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:

◆ RegisterNwkTimeAnsIndicationClient()

void WiMODProLink::RegisterNwkTimeAnsIndicationClient ( TNwkDeviceTimeAnsIndicationCallback  cb)

Register a callback function for the event "DeviceTimeAnser 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_112
Here is the call graph for this function:

◆ RegisterPowerUpIndicationClient()

void WiMODProLink::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_113
// 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:

◆ RegisterRadioLinkRxUDataIndicationClient()

void WiMODProLink::RegisterRadioLinkRxUDataIndicationClient ( TRadioLinkUDataRxIndicationCallback  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 running in proprietary LR-BASE mode.

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

◆ RegisterRadioLinkTxUDataIndicationClient()

void WiMODProLink::RegisterRadioLinkTxUDataIndicationClient ( TRadioLinkUDataTxIndicationCallback  cb)

Register a callback function for the TX U-Data Indication - optional -.

See also
TWiMODLRResultCodes for interpretation of the values
Parameters
cbPointer a callback function
See also
TRadioLinkUDataTxIndicationCallback for details
msc_inline_mscgraph_115
// callback for U data Tx indication
void myUDataTxInd() {
...
}
void setup() {
...
// setup the callback
wimod.RegisterRadioLinkTxUDataIndicationClient(myUDataTxInd);
...
}
...
Here is the call graph for this function:

◆ RegisterResetDevNonceIndicationClient()

void WiMODProLink::RegisterResetDevNonceIndicationClient ( TResetDevNonceIndicationCallback  cb)

Register a callback function for the event "Reset DevNonce 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_116
Here is the call graph for this function:

◆ RegisterRtcAlarmIndicationClient()

void WiMODProLink::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_117
// 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 WiMODProLink::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_118
Here is the call graph for this function:

◆ RegisterRxCDataIndicationClient()

void WiMODProLink::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_119
Here is the call graph for this function:

◆ RegisterRxMacCmdIndicationClient()

void WiMODProLink::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_120
Here is the call graph for this function:

◆ RegisterRxUDataIndicationClient()

void WiMODProLink::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_121
Here is the call graph for this function:

◆ RegisterTxCDataIndicationClient()

void WiMODProLink::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_122
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 WiMODProLink::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_123
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:

◆ RemoveMulticastConfig()

bool WiMODProLink::RemoveMulticastConfig ( const UINT8  mcastIndex,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Remove a single Multicast configuration from module.

Parameters
mcastIndexthe index of the configuration block to be removed.
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

◆ Reset()

bool WiMODProLink::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:

◆ ResetDeviceConfig()

bool WiMODProLink::ResetDeviceConfig ( TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Resets the settings about the common stack features of the WiMOD module (ProLink firmware)

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

◆ ResetRadioLinkRadioConfig()

bool WiMODProLink::ResetRadioLinkRadioConfig ( TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Reset the RadioConfig for the proprietary LoRa communication feature to defaults.

This function tries to reset the configuration parameter set used in the proprietary LoRa communication feature (LR-BASE) of the ProLink firmware to the build-in factory defaults.

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
Here is the call graph for this function:

◆ SendCData()

bool WiMODProLink::SendCData ( TWiMODProLinkLORAWAN_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_124
...
// local variable
TWiMODProLinkLORAWAN_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 WiMODProLink::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:

◆ SendNwkTimeRequest()

bool WiMODProLink::SendNwkTimeRequest ( TWiMODLORAWAN_DevTimeReqInfo devTimeInfo,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Send a Network Time Request /DevTimeRequest via MAC Cmd to LNS.

Parameters
devTimeInfopointer to store initial response data
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:

◆ SendRadioLinkUData()

bool WiMODProLink::SendRadioLinkUData ( const TWiMODLR_RadioLink_Msg data,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Tries to send transmit U-Data to a peer using proprietary LoRa mode.

See also
TWiMODLRResultCodes for interpretation of the values
Parameters
dataData structure containing the TX-data and options.
See also
TWiMODLR_RadioLink_Msg 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_125
...
// local variable
TWiMODLR_RadioLink_Msg txData;
// setup tx packet
txData.DestinationGroupAddress = 0x10;
txData.DestinationDeviceAddress = 0x1234;
txData.Length = strlen("Hello World!");
strncpy(txData.Payload, "Hello World!", WiMODLORAWAN_APP_PAYLOAD_LEN);
// send data
wimod.SendRadioLinkUData(&txData);
...
Here is the call graph for this function:

◆ SendUData()

bool WiMODProLink::SendUData ( TWiMODProLinkLORAWAN_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_126
...
// local variable
TWiMODProLinkLORAWAN_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
if (!wimod.SendUData(&txData)= {
// error transmitting data
// DutyCycle problem? check channel block time
if (data.ChannelBlockTime >0) {
// wait until blocking time is over
}
}
...
Here is the call graph for this function:

◆ SetBatteryLevelStatus()

bool WiMODProLink::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 WiMODProLink::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:

◆ SetDeviceConfig()

bool WiMODProLink::SetDeviceConfig ( const TProLinkDeviceConfig config,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Sets the common Device config features of the WiMOD (only ProLink firmware)

See also
HCI documentation and feature specification for details
Parameters
configThe common config options used by all stacks of the WiMOD
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
...
// configure wanted features
config.PowerSaving = 1;
config.MiscOptions |= PROLINK_DEVICE_CFG_MISC_HCI_PWR_UP_IND_ENABLED
// setup the common settings for all stacks of the WiMOD
wimod.SetDeviceConfig(config);
...

◆ SetDeviceEUI()

bool WiMODProLink::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:

◆ SetDeviceNonce()

bool WiMODProLink::SetDeviceNonce ( const UINT16  devNonce,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Set the Device Nonce / DevNonce for the next Join OTAA procedure.

Parameters
devNonce16 bit value ( Number used only once)
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:

◆ SetHciConfig()

bool WiMODProLink::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:

◆ SetJoinNonce()

bool WiMODProLink::SetJoinNonce ( const UINT16  joinNonce,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Set the Join Nonce for the next Join OTAA procedure.

Parameters
joinNonce16 bit value ( Number used only once)
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:

◆ SetJoinParameter()

bool WiMODProLink::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:

◆ SetMulticastConfig()

bool WiMODProLink::SetMulticastConfig ( TWiMODLORAWAN_McastConfig mcastCfg,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Set a (new) Configuration for Multicast Mode.

Parameters
mcastCfgpointer to a multicast configuration structure
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

◆ SetRadioLinkAesKey()

bool WiMODProLink::SetRadioLinkAesKey ( const UINT8 *  key,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Sets an AES encryption key for the proprietary LoRa communication feature.

This function tries to set an AES encryption key that can be used in the proprietary LoRa communication feature (LR-BASE) of the ProLink firmware.

Hint: In order to activate / use encrypted communication this feature has to be activated in the MiscOptions-field of the RadioConfig settings.

Parameters
keya pointer to the AES key to use (128bit)
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
// generate a secure AES key
uint8_t aesKey[16] = {0x00, 0x01, 0x02, ... 0x10};
// setup AES Key
wimod.SetAesKey_ProLink(key);
//enable encrypted communication for proprietary mode
wimod.GetRadioLinkRadioConfig(&radioCfg);
radioConfig.MiscOptions |= PROLINK_RADIOLINK_RADIO_CFG_MISC_HCI_ENCTRYPTION_ENABLED;
wimod.SetRadioLinkRadioConfig(&radioCfg);
...
// send an encrypted message
TWiMODLR_RadioLink_Msg radioMsg;
radioMsg.DestinationGroupAddress = 0x10;
radioMsg.DestinationDeviceAddress = 0x1234;
radioMsg.Length = strlen("Hello World!");
strncpy(radioMsg.Payload, "Hello World!", WiMODLORAWAN_APP_PAYLOAD_LEN);
wimod.SendRadioLinkUData(&radioMsg);
Here is the call graph for this function:

◆ SetRadioLinkRadioConfig()

bool WiMODProLink::SetRadioLinkRadioConfig ( const TWiMODLR_ProLinkRadioLink_RadioConfig radioCfg,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Set a new RadioConfig to be used for the proprietary LoRa communication feature.

This function tries to set a new configuration parameter set that should be used in the proprietary LoRa communication feature (LR-BASE) of the ProLink firmware.

Parameters
radioCfgpointer to a structure where to store the retrieved information of the radio module.
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:

◆ SetRadioStack()

bool WiMODProLink::SetRadioStack ( const TRadioStack_Mode stackMode,
TWiMODLRResultCodes hciResult = NULL,
UINT8 *  rspStatus = NULL 
)

Sets the active Radio Stack Mode of the WiMOD (only ProLink firmware)

See also
HCI documentation and feature specification for details
Parameters
stackModethe new stack mode to be used by the WiMOD
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
...
// switch to LoRaWAN mode
wimod.SetRadioStack(RadioStack_LoRaWAN);
...

◆ SetRadioStackConfig()

bool WiMODProLink::SetRadioStackConfig ( TWiMODProLinkLORAWAN_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 WiMODProLink::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 WiMODProLink::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_127
// 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 WiMODProLink::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_ProLink WiMODProLink::SapDevMgmt
protected

Service Access Point for 'DeviceManagement'

◆ SapGeneric

WiMOD_SAP_Generic WiMODProLink::SapGeneric
protected

dumy SAP for generic HCI command

◆ SapLoRaWan

WiMOD_SAP_LoRaWAN_ProLink WiMODProLink::SapLoRaWan
protected

Service Access Point for 'LoRaWAN'

◆ SapRadioLink

WiMOD_SAP_RadioLink_ProLink WiMODProLink::SapRadioLink
protected

Service Access Point for 'RadioLink (proprietary mode)'


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
TWiMODLR_DevMgmt_RadioConfigPlus::MiscOptions
UINT8 MiscOptions
Definition: WiMOD_SAP_DEVMGMT_PLUS_IDs.h:320
TWiMODLR_DevMgmt_SystemStatusPlus::SysTickCounter
UINT32 SysTickCounter
Definition: WiMOD_SAP_DEVMGMT_PLUS_IDs.h:335
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
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
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_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
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
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