![]() |
Demo HCI Implementation for WiMOD-LR Devices
V2.0.3
|
Main class representing the interface to the WiMOD running the firmware LoRaWAN EndNode Modem. More...
#include <WiMODLoRaWAN.h>


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

| void WiMODLoRaWAN::begin | ( | TLoRaWANregion | region = LoRaWAN_Region_EU868 | ) |
This function must be called once before any other service can be used.

| bool WiMODLoRaWAN::ClearRtcAlarm | ( | TWiMODLRResultCodes * | hciResult = NULL, |
| UINT8 * | rspStatus = NULL |
||
| ) |
Clears pending RTC Alarms of the WiMOD.
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| void WiMODLoRaWAN::ConnectViaOTAA | ( | const uint8_t * | appEUI = NULL, |
| const uint8_t * | appKey = NULL |
||
| ) |
do a jump start and use OTAA to connect to a Nwk server
| appEUI | pointer to an array containing the AppEUI/JoinEUI data to use |
| appKey | pointer to an array containing the AppKey data to use |

| bool WiMODLoRaWAN::convert | ( | TWiMODLR_HCIMessage & | RxMsg, |
| TWiMODLORAWAN_NoData_Data * | info | ||
| ) |
Convert a received low level HCI-Msg to a high-level NoData structure.
This function should be used by the NoData Indication Callback function prior processing the received data message.
| RxMsg | Reference to low-level HCI message. |
| info | Pointer to the buffer where to store the received information |
| true | if the conversion was successful |

| bool WiMODLoRaWAN::convert | ( | TWiMODLR_HCIMessage & | RxMsg, |
| TWiMODLORAWAN_RX_ACK_Data * | ackData | ||
| ) |
Convert a received low level HCI-Msg to a high-level AckData structure.
This function should be used by the Rx Ack Indication Callback function prior processing the received data message.
| RxMsg | Reference to low-level HCI message. |
| ackData | Pointer to the buffer where to store the received data |
| true | if the conversion was successful |

| bool WiMODLoRaWAN::convert | ( | TWiMODLR_HCIMessage & | RxMsg, |
| TWiMODLORAWAN_RX_Data * | loraWanRxData | ||
| ) |
Convert a received low level HCI-Msg to a high-level Rx Data structure.
This function should be used by the Rx Data Indication Callback functions prior processing the received data message.
| RxMsg | Reference to low-level HCI message. |
| loraWanRxData | Pointer to the buffer where to store the received data |
| true | if the conversion was successful |

| bool WiMODLoRaWAN::convert | ( | TWiMODLR_HCIMessage & | RxMsg, |
| TWiMODLORAWAN_RX_JoinedNwkData * | joinedNwkData | ||
| ) |
Convert a received low level HCI-Msg to a high-level NwkJoined structure.
This function should be used by the JoinedNwk Indication Callback function prior processing the received data message.
| RxMsg | Reference to low-level HCI message. |
| joinedNwkData | Pointer to the buffer where to store the received data |
| true | if the conversion was successful |

| bool WiMODLoRaWAN::convert | ( | TWiMODLR_HCIMessage & | RxMsg, |
| TWiMODLORAWAN_RX_MacCmdData * | loraWanMacCmdData | ||
| ) |
Convert a received low level HCI-Msg to a high-level MAC-Cmd structure.
This function should be used by the Rx Mac Cmd Indication Callback function prior processing the received data message.
| RxMsg | Reference to low-level HCI message. |
| loraWanMacCmdData | Pointer to the buffer where to store the received data |
| true | if the conversion was successful |

| bool WiMODLoRaWAN::convert | ( | TWiMODLR_HCIMessage & | RxMsg, |
| TWiMODLORAWAN_TxIndData * | sendIndData | ||
| ) |
Convert a received low level HCI-Msg to a high-level tx ind structure.
This function should be used by the Tx Data Indication Callback functions prior processing the received data message.
| RxMsg | Reference to low-level HCI message. |
| sendIndData | Pointer to the buffer where to store the received data |
| true | if the conversion was successful |

| void WiMODLoRaWAN::ConvertAppEuiStrToArray | ( | char * | appEuiStr, |
| uint8_t * | appEuiArray | ||
| ) |
Converts a string containing an App EUI string into a given byte array.
This convinience funtion offers the user the possibilty to use a string containing the AppEUI as text (e.g. "0x12 34 45 78 9A BC DE f0"). The string will be decoded to an byte array for further usage. The string can is interpreted as hex digits with or without a "0x" prefix. Each digit pair must be separated by a space char.
| appEuiStr | String containing the hex coded appEUI |
| appEuiArray | array that should store the converted byte values |

| void WiMODLoRaWAN::ConvertAppKeyStrToArray | ( | char * | appKeyStr, |
| uint8_t * | appKeyArray | ||
| ) |
Converts a string containing an App Key string into a given byte array.
This convinience funtion offers the user the possibilty to use a string containing the AppKey as text (e.g. "0x12 34 45 78 9A BC DE f0 10 20 30 40 50 60 70 80"). The string will be decoded to an byte array for further usage. The string can is interpreted as hex digits with or without a "0x" prefix. Each digit pair must be separated by a space char.
| appKeyStr | String containing the hex coded appKey |
| appKeyArray | array that should store the converted byte values |

| void WiMODLoRaWAN::ConvertAppSKeyStrToArray | ( | char * | appSKeyStr, |
| uint8_t * | appSKeyArray | ||
| ) |
Converts a string containing an AppSKey string into a given byte array.
This convinience funtion offers the user the possibilty to use a string containing the AppSKey as text (e.g. "0x12 34 45 78 9A BC DE f0 10 20 30 40 50 60 70 80"). The string will be decoded to an byte array for further usage. The string can is interpreted as hex digits with or without a "0x" prefix. Each digit pair must be separated by a space char.
| appSKeyStr | String containing the hex coded appKey |
| appSKeyArray | array that should store the converted byte values |

| void WiMODLoRaWAN::ConvertNwkSKeyStrToArray | ( | char * | nwkSKeyStr, |
| uint8_t * | nwkSKeyArray | ||
| ) |
Converts a string containing an NwkSKey string into a given byte array.
This convinience funtion offers the user the possibilty to use a string containing the NwkSKey as text (e.g. "0x12 34 45 78 9A BC DE f0 10 20 30 40 50 60 70 80"). The string will be decoded to an byte array for further usage. The string can is interpreted as hex digits with or without a "0x" prefix. Each digit pair must be separated by a space char.
| nwkSKeyStr | String containing the hex coded appKey |
| nwkSKeyArray | array that should store the converted byte values |

| bool WiMODLoRaWAN::DeactivateDevice | ( | TWiMODLRResultCodes * | hciResult = NULL, |
| UINT8 * | rspStatus = NULL |
||
| ) |
Deactivate the device (logical disconnect from lora network)
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::ExecuteGenericCmd | ( | TWiMODLR_Generic_CmdInfo * | info, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Generic Execution Function for HCI commands that are currently not implemented.
This funtion enables the user to execute various HCI commands that are currently not implemented as commands within this API class.
The user has to know the HCI Command IDs and has to decode the response data on his own.
| info | pointer to a structure containing the HCI commands to execute |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::FactoryReset | ( | TWiMODLRResultCodes * | hciResult = NULL, |
| UINT8 * | rspStatus = NULL |
||
| ) |
Reset all internal settings to default values (incl. DevEUI !!!)
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::GetCustomConfig | ( | INT8 * | rfGain, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Get the current offet for tx power level; expert level only.
| rfGain | pointer to store the offset value for tx power settings |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::GetDeviceEUI | ( | UINT8 * | deviceEUI, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Gets the DeviceEUI (aka. IEEE-Address) of the WiMOD.
| deviceEUI | pointer for storing the received 64bit address |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::GetDeviceInfo | ( | TWiMODLR_DevMgmt_DevInfoLoRaWan * | info, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
GetDeviceInfo Cmd - Gets the basic device information of the WiMOD.
| info | pointer for storing the requested information (structure) |
| hciResult | pointer for storing the the local HCI transfer result. This is an optional parameter. |
| rspStatus | pointer to store the response code of the WiMOD This is an optional parameter. |
| true | if everything was successful |

| bool WiMODLoRaWAN::GetFirmwareInfo | ( | TWiMODLR_DevMgmt_FwInfo * | info, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
GetFirmwareInfo Cmd - Gets the basic information about the firmware of the WiMOD.
| info | pointer for storing the requested information (structure) |
| hciResult | pointer for storing the the local HCI transfer result. This is an optional parameter. |
| rspStatus | pointer to store the response code of the WiMOD This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::GetHciConfig | ( | TWiMODLR_DevMgmt_HciConfig * | hciConfig, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Gets the current HCI configuration of the WiMOD.
| hciConfig | Pointer to a structure where to store the HCI config related information |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| TWiMODLRResultCodes WiMODLoRaWAN::GetLastHciResult | ( | void | ) |
Gets the last HCI result code from the last executed command.
If you missed setting the HciResult parameter while executing the last command, this method can recall the last value of that parameter.
| UINT8 WiMODLoRaWAN::GetLastResponseStatus | ( | void | ) |
Gets the last response code of the WiMOD of the last executed command.
If you missed setting the rspStatus parameter while executing the last command, this method can recall the last value of that parameter.
| bool WiMODLoRaWAN::GetNwkStatus | ( | TWiMODLORAWAN_NwkStatus_Data * | nwkStatus, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Gets the current status of the network "connection".
| nwkStatus | pointer for storing the requested information |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::GetOperationMode | ( | TWiMOD_OperationMode * | opMode, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Gets the current operation mode of the WiMOD module.
| opMode | Pointer where to store the information |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::GetRadioStackConfig | ( | TWiMODLORAWAN_RadioStackConfig * | data, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Gets the current radio config parameter set of the WiMOD.
| data | pointer to data structure for storing the requested information |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::GetRtc | ( | UINT32 * | rtcTime, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Gets the current RTC data info from WiMOD module.
| rtcTime | Pointer where to store the RTC information |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::GetRtcAlarm | ( | TWiMODLR_DevMgmt_RtcAlarm * | rtcAlarm, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Gets information about the RTC alarm feature of the WiMOD.
| rtcAlarm | Pointer to a structure where to store the RTC alarm related information |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::GetSupportedBands | ( | TWiMODLORAWAN_SupportedBands * | supportedBands, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Get the supported bands of this firmware.
| supportedBands | pointer to store area for result |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::GetSystemStatus | ( | TWiMODLR_DevMgmt_SystemStatusLorawan * | info, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
GetSystemStatus Cmd - Gets the basic information about the system status of the WiMOD.
| info | pointer for storing the requested information (structure) |
| hciResult | pointer for storing the the local HCI transfer result. This is an optional parameter. |
| rspStatus | pointer to store the response code of the WiMOD This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::GetTxPowerLimitConfig | ( | TWiMODLORAWAN_TxPwrLimitConfig * | txPwrLimitCfg, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Get the configured TX limits for all sub-bands.
| txPwrLimitCfg | pointer to store area for result |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::JoinNetwork | ( | TWiMODLRResultCodes * | hciResult = NULL, |
| UINT8 * | rspStatus = NULL |
||
| ) |
Start joining the network via the OTAA procedure. Asynchronous process.
This functions starts an asynchronous process of joining to a network. It will take a time until a (final) result is ready. Therefore the callback interface (e.g. RegisterJoinedNwkIndicationClient) should be used.
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::Ping | ( | TWiMODLRResultCodes * | hciResult = NULL, |
| UINT8 * | rspStatus = NULL |
||
| ) |
Ping Cmd - Checks the serial connection to the WiMOD module.
| hciResult | pointer for storing the the local HCI transfer result. This is an optional parameter. |
| rspStatus | pointer to store the response code of the WiMOD This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
OR:
OR:

| bool WiMODLoRaWAN::ReactivateDevice | ( | UINT32 * | devAdr, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Re-Activates the device via the ABP procedure.
In case the device has been previously activated (e.g. during manufacturing) the user does not know the security keys. In this case a re-activation procedure must be used in order to use the stored values. (For ABP ONLY!)
| devAdr | pointer where the store the "received" device address |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| void WiMODLoRaWAN::RegisterJoinedNwkIndicationClient | ( | TJoinedNwkIndicationCallback | cb | ) |
Register a callback function for the event "Joined Nwk Indication".
This registered callback is called when the specified event is called by the WiMOD stack.
| cb | pointer to a callback function that should be called if the event occurs.
|

| void WiMODLoRaWAN::RegisterJoinTxIndicationClient | ( | TJoinTxIndicationCallback | cb | ) |
Register a callback function for the event "TX Join Indication".
This registered callback is called when the specified event is called by the WiMOD stack.
| cb | pointer to a callback function that should be called if the event occurs. |

| void WiMODLoRaWAN::RegisterNoDataIndicationClient | ( | TNoDataIndicationCallback | cb | ) |
Register a callback function for the event "TX Join Indication".
This registered callback is called when the specified event is called by the WiMOD stack.
| cb | pointer to a callback function that should be called if the event occurs. |

| void WiMODLoRaWAN::RegisterPowerUpIndicationClient | ( | TDevMgmtPowerUpCallback | cb | ) |
Register a callback function for the PowerUp Indication - optional -.
| cb | Pointer a callback function |

| void WiMODLoRaWAN::RegisterRtcAlarmIndicationClient | ( | TDevMgmtRtcAlarmCallback | cb | ) |
Register a callback function for the RTC Alarm Indication - optional -.
| cb | Pointer a callback function |

| void WiMODLoRaWAN::RegisterRxAckIndicationClient | ( | TRxAckIndicationCallback | cb | ) |
Register a callback function for the event "RX ACK (data) Indication".
This registered callback is called when the specified event is called by the WiMOD stack.
| cb | pointer to a callback function that should be called if the event occurs.
|

| void WiMODLoRaWAN::RegisterRxCDataIndicationClient | ( | TRxCDataIndicationCallback | cb | ) |
Register a callback function for the event "RX C-Data Indication".
This registered callback is called when the specified event is called by the WiMOD stack.
| cb | pointer to a callback function that should be called if the event occurs.
|

| void WiMODLoRaWAN::RegisterRxMacCmdIndicationClient | ( | TRxMacCmdIndicationCallback | cb | ) |
Register a callback function for the event "RX MAC Cmd Indication".
This registered callback is called when the specified event is called by the WiMOD stack.
| cb | pointer to a callback function that should be called if the event occurs.
|

| void WiMODLoRaWAN::RegisterRxUDataIndicationClient | ( | TRxUDataIndicationCallback | cb | ) |
Register a callback function for the event "RX U-Data Indication".
This registered callback is called when the specified event is called by the WiMOD stack.
| cb | pointer to a callback function that should be called if the event occurs.
|

| void WiMODLoRaWAN::RegisterTxCDataIndicationClient | ( | TTxCDataIndicationCallback | cb | ) |
Register a callback function for the event "TX C-Data Indication".
This registered callback is called when the specified event is called by the WiMOD stack.
| cb | pointer to a callback function that should be called if the event occurs.
|

| void WiMODLoRaWAN::RegisterTxUDataIndicationClient | ( | TTxUDataIndicationCallback | cb | ) |
Register a callback function for the event "TX U Data Indication".
This registered callback is called when the specified event is called by the WiMOD stack.
| cb | pointer to a callback function that should be called if the event occurs. |

| bool WiMODLoRaWAN::Reset | ( | TWiMODLRResultCodes * | hciResult = NULL, |
| UINT8 * | rspStatus = NULL |
||
| ) |
Reset Cmd - Reboots the WiMOD module.
| hciResult | pointer for storing the the local HCI transfer result. This is an optional parameter. |
| rspStatus | pointer to store the response code of the WiMOD This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::SendCData | ( | const TWiMODLORAWAN_TX_Data * | data, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Tries to send transmit C-Data to network server via RF link.
| data | pointer to data structure containing the TX-data and options. |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::SendMacCmd | ( | const TWiMODLORAWAN_MacCmd * | cmd, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Send a MAC command to the server; expert level only.
| cmd | pointer containing the MAC command and parameters |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::SendUData | ( | const TWiMODLORAWAN_TX_Data * | data, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Tries to send transmit U-Data to network server via RF link.
| data | pointer to data structure containing the TX-data and options. |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::SetBatteryLevelStatus | ( | UINT8 | battStatus, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Set the Battery Level Status.
**
**
| battStatus | Status value; 0 : mains power, 1-254 : batt level; 255: undefiend |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::SetCustomConfig | ( | const INT8 | rfGain, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Setup a custom config for tx power settings; expert level only.
| rfGain | new rfGain value for tx power settings; see HCI Spec. |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::SetDeviceEUI | ( | const UINT8 * | deviceEUI, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Sets a new DeviceEUI (aka. IEEE-Address) to the WiMOD.
Note: Setting a new DeviceEUI is requires to switch to customer operation mode. In "normal" application mode, this command is locked.
| deviceEUI | pointer to data structure containing the new parameters (Must be an pointer of a 64bit address) |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::SetHciConfig | ( | TWiMODLR_DevMgmt_HciConfig & | hciConfig, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Sets a new HCI configuration of the WiMOD.
| hciConfig | Pointer to a structure where to store the HCI config related information |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::SetJoinParameter | ( | TWiMODLORAWAN_JoinParams & | joinParams, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Sets the parameters used for the OTAA activation procedure.
| joinParams | structure holding the necessary parameters |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::SetOperationMode | ( | const TWiMOD_OperationMode | opMode, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Sets the current operation mode of the WiMOD module.
| opMode | The new operation mode to set |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::SetRadioStackConfig | ( | TWiMODLORAWAN_RadioStackConfig * | data, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Sets a new radio config parameter set of the WiMOD.
| data | pointer to data structure containing the new parameters |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::SetRtc | ( | const UINT32 | rtcTime, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Sets the current RTC values to WiMOD module.
| rtcTime | RTC information to setup |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::SetRtcAlarm | ( | const TWiMODLR_DevMgmt_RtcAlarm * | rtcAlarm, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Sets and enables the RTC alarm feature of the WiMOD.
| rtcAlarm | Pointer to a structure containing the RTC alarm related information |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

| bool WiMODLoRaWAN::SetTxPowerLimitConfig | ( | TWiMODLORAWAN_TxPwrLimitConfig & | txPwrLimitCfg, |
| TWiMODLRResultCodes * | hciResult = NULL, |
||
| UINT8 * | rspStatus = NULL |
||
| ) |
Set a single TX limit for a single sub-band.
| txPwrLimitCfg | reference to read the data from |
| hciResult | Result of the local command transmission to module This is an optional parameter. |
| rspStatus | Status byte contained in the local response of the module This is an optional parameter. |
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |

|
protected |
Service Access Point for 'DeviceManagement'
|
protected |
dumy SAP for generic HCI command
|
protected |
Service Access Point for 'LoRaWAN'