 |
Demo HCI Implementation for WiMOD-LR Devices
V2.0.3
|
Main class representing the interface to the WiMOD running the firmware WiMODLR-BASE_PLUS.
More...
#include <WiMODLR_BASE_PLUS.h>
|
| | WiMODLRBASE_PLUS (Stream &s) |
| | Constructor. More...
|
| |
|
| ~WiMODLRBASE_PLUS (void) |
| | Destructor.
|
| |
| void | begin (void) |
| | Setup internal things. More...
|
| |
| void | end (void) |
| | De-Setup internal things. More...
|
| |
| bool | Ping (TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | Ping Cmd - Checks serial connetion to WiMOD module. More...
|
| |
| bool | Reset (TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | Reset Cmd - Do a local reboot of the WiMOD module. More...
|
| |
| bool | GetDeviceInfo (TWiMODLR_DevMgmt_DevInfo *info, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | Gets the basic DeviceInfo from WiMOD module. More...
|
| |
| bool | GetFirmwareInfo (TWiMODLR_DevMgmt_FwInfo *info, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | Gets the basic FirmwareInfo from WiMOD module. More...
|
| |
| bool | GetSystemStatus (TWiMODLR_DevMgmt_SystemStatusPlus *info, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | Gets the bas SystemStatus info from WiMOD module. 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 | GetRadioConfig (TWiMODLR_DevMgmt_RadioConfigPlus *radioCfg, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | Gets the current configuration of the radio of the WiMOD module. More...
|
| |
| bool | SetRadioConfig (const TWiMODLR_DevMgmt_RadioConfigPlus *radioCfg, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | Sets the current configuration for the radio of the WiMOD module. More...
|
| |
| bool | ResetRadioConfig (TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | Resets the current configuration to defaults. 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 | SetRadioMode (const TRadioCfg_RadioMode radioMode, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | SetRadioMode - Set the current radio mode of the WiMOD. More...
|
| |
| bool | SetAesKey (const UINT8 *key, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | Sets the security 128bit AES key to use for RF communication. More...
|
| |
| bool | GetAesKey (UINT8 *key, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | Gets the used security 128bit AES key. 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 | SendUData (const TWiMODLR_RadioLink_Msg *txMsg, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | Tries to send transmit U-Data to peer module via RF link. More...
|
| |
| bool | SendCData (const TWiMODLR_RadioLink_Msg *txMsg, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | Tries to send transmit C-Data to peer module via RF link. More...
|
| |
| bool | SetAckData (const TWiMODLR_RadioLink_Msg *txMsg, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | Sets additional user payload for the next ack frame to send. 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_CdataInd *cDataTxInfo) |
| | Convert a received low level HCI-Msg to a high-level CDataTx Info. More...
|
| |
| bool | convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLR_RadioLink_UdataInd *cDataTxInfo) |
| | Convert a received low level HCI-Msg to a high-level UDataTx Info. More...
|
| |
| bool | convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLR_AckTxInd_Msg *txAckIndInfo) |
| | Convert a received low level HCI-Msg to a high-level AckTxInd Info. More...
|
| |
| void | RegisterUDataRxClient (TRadioLinkUDataRxIndicationCallback cb) |
| | Register a callback function for the RX U-Data Indication - optional -. More...
|
| |
| void | RegisterUDataTxClient (TRadioLinkUDataTxIndicationCallback cb) |
| | Register a callback function for the TX U-Data Indication - optional -. More...
|
| |
|
void | RegisterRawDataRxClient (TRadioLinkRawDataRxIndicationCallback cb) |
| |
| void | RegisterCDataRxClient (TRadioLinkCDataRxIndicationCallback cb) |
| | Register a callback function for the RX C-Data Indication - optional -. More...
|
| |
| void | RegisterCDataTxClient (TRadioLinkCDataTxIndicationCallback cb) |
| | Register a callback function for the TX C-Data Indication - optional -. More...
|
| |
| void | RegisterAckRxClient (TRadioLinkAckRxIndicationCallback cb) |
| | Register a callback function for the RX Ack (+data) Indication - optional -. More...
|
| |
| void | RegisterAckRxTimeoutClient (TRadioLinkAckRxTimeoutIndicationCallback cb) |
| | Register a callback function for the Ack Timeout Indication - optional -. More...
|
| |
| void | RegisterAckTxCallback (TRadioLinkAckTxIndicationCallback cb) |
| | Register a callback function for the TX Ack Indication - optional -. 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...
|
| |
| bool | StartRadioLinkTest (const TWiMODLR_RLT_Parameter *params, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | Tries to start the integrated Radio Link Test feature of the WiMOD. More...
|
| |
| bool | StopRadioLinkTest (TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | Tries to stop a running Radio Link Test. More...
|
| |
| void | RegisterRltStatusClient (TRltStatusIndicationCallback cb) |
| | Register a callback function for RLT updates. More...
|
| |
| bool | convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLR_RLT_Status *statusData) |
| | Convert a received low level HCI-Msg to a high-level RLT Status Info. More...
|
| |
| bool | SetSensorAppConfig (const TWiMODLR_SensorApp_Config *config, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | Tries to configure the integrated Sensor App feature of the WiMOD. More...
|
| |
| bool | GetSensorAppConfig (TWiMODLR_SensorApp_Config *config, TWiMODLRResultCodes *hciResult=NULL, UINT8 *rspStatus=NULL) |
| | Tries to get the current config of the integrated Sensor App feature of the WiMOD. More...
|
| |
| void | RegisterSensorAppAckIndClient (TSensorAppAckIndicationCallback cb) |
| | Register a callback function for the SensorAppAckData Indication - optional -. More...
|
| |
| void | RegisterSensorAppDataIndClient (TSensorAppSensorDataIndicationCallback cb) |
| | Register a callback function for the SensorAppData Indication. More...
|
| |
| bool | convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLR_SensorApp_SensorData *sensorData) |
| | Convert a received low level HCI-Msg to a high-level SensorData Info. More...
|
| |
| bool | convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLR_SensorApp_AckSensorData *sensorAckData) |
| | Convert a received low level HCI-Msg to a high-level SensorData Info. More...
|
| |
| void | RegisterBtnPressedClient (TRemoteCtrlBtnPressedIndicationCallback cb) |
| | Register a callback function for the RemoteCtrl Btn Pressed Indication. More...
|
| |
| bool | convert (TWiMODLR_HCIMessage &RxMsg, TWiMODLR_RemoteCtrl_BtnPressed *btnInfo) |
| | Convert a received low level HCI-Msg to a high-level RemoteCtrl Btn Info. 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...
|
| |
| TWiMODLRResultCodes | GetLastHciResult (void) |
| | Gets the value of the last local HCI TX status. More...
|
| |
| UINT8 | GetLastResponseStatus (void) |
| | Gets the value of the last status response value of the WiMOD. More...
|
| |
| | TWiMODLRHCI (Stream &s) |
| | Constructor. More...
|
| |
|
| ~TWiMODLRHCI (void) |
| | Destructor.
|
| |
| 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) |
| |
|
|
bool | copyResultInfos (TWiMODLRResultCodes *hciResult, UINT8 *rspStatus, UINT8 successValue) |
| |
|
virtual void | ProcessUnexpectedRxMessage (TWiMODLR_HCIMessage &rxMsg) |
| |
|
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) |
| |
Main class representing the interface to the WiMOD running the firmware WiMODLR-BASE_PLUS.
This class is the only API class a user should use for interacting with a WiMOD module that runs the IMST WiMODLR-Base_PLUS firmware.
◆ WiMODLRBASE_PLUS()
| WiMODLRBASE_PLUS::WiMODLRBASE_PLUS |
( |
Stream & |
s | ) |
|
Constructor.
- Parameters
-
| s | Reference to the serial interace to be used for communication. The serial interface must be initialized outside of this class prior calling the first command in runtime. |
void setup() {
wimod.begin();
...
}
◆ begin()
| void WiMODLRBASE_PLUS::begin |
( |
void |
| ) |
|
|
virtual |
Setup internal things.
This function must be executed at startup before any other service can be used.
void setup() {
wimod.begin();
...
}
Reimplemented from TWiMODLRHCI.
◆ calcFreqToRegister()
| void WiMODLRBASE_PLUS::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
-
| freq | Target frequencey in Hz |
| msb | Pointer to register value for MSB-Part |
| mid | Pointer to register value for MID-Part |
| lsb | Pointer to register value for LSB-Part |
◆ calcRegisterToFreq()
| uint32_t WiMODLRBASE_PLUS::calcRegisterToFreq |
( |
uint8_t |
msb, |
|
|
uint8_t |
mid, |
|
|
uint8_t |
lsb |
|
) |
| |
Convert a frequency registers to frequency in Hz.
- Parameters
-
| msb | register value for MSB-Part |
| mid | register value for MID-Part |
| lsb | register value for LSB-Part |
return Frequency in Hz
◆ ClearRtcAlarm()
| bool WiMODLRBASE_PLUS::ClearRtcAlarm |
( |
TWiMODLRResultCodes * |
hciResult = NULL, |
|
|
UINT8 * |
rspStatus = NULL |
|
) |
| |
Clears pending RTC Alarms of the WiMOD.
- See also
- TWiMODLRResultCodes for interpretation of the values
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
wimod.ClearRtcAlarm();
...
◆ convert() [1/8]
Convert a received low level HCI-Msg to a high-level AckTxInd Info.
This function should be used by the AckTx Indication Callback functions prior processing the received data message.
- Parameters
-
| RxMsg | Reference to low-level HCI message. |
- Warning
- DO NOT MANIPULATE THESE VALUES !!!
- Parameters
-
| txAckIndInfo | Pointer to the buffer where to store the received data |
- Return values
-
| true | if the conversion was successful |
if (wimod.convert(rxMsg, &txAckData)) {
...
}
}
...
void setup() {
...
wimod.begin();
wimod.RegisterAckTxCallback(myTxAckInd);
...
}
◆ convert() [2/8]
Convert a received low level HCI-Msg to a high-level CDataTx Info.
This function should be used by the Tx-C-Data Indication Callback functions prior processing the received data message.
- Parameters
-
| RxMsg | Reference to low-level HCI message. |
- Warning
- DO NOT MANIPULATE THESE VALUES !!!
- Parameters
-
| cDataTxInfo | Pointer to the buffer where to store the received data |
- Return values
-
| true | if the conversion was successful |
if (wimod.convert(rxMsg, &txDataMsg)) {
...
}
}
...
void setup() {
...
wimod.begin();
wimod.RegisterCDataTxClient(myTxCDataInd);
...
}
◆ convert() [3/8]
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
-
| RxMsg | Reference to low-level HCI message. |
- Warning
- DO NOT MANIPULATE THESE VALUES !!!
- Parameters
-
| radioLinkMsg | Pointer to the buffer where to store the received data |
- Return values
-
| true | if the conversion was successful |
if (wimod.convert(rxMsg, &radioRxMsg)) {
...
}
}
...
void setup() {
...
wimod.begin();
wimod.RegisterUDataRxClient(myRxDataInd);
wimod.RegisterCDataRxClient(myRxDataInd);
...
}
◆ convert() [4/8]
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
-
| RxMsg | Reference to low-level HCI message. |
- Warning
- DO NOT MANIPULATE THESE VALUES !!!
- Parameters
-
| uDataTxInfo | Pointer to the buffer where to store the received data |
- Return values
-
| true | if the conversion was successful |
if (wimod.convert(rxMsg, &txDataMsg)) {
...
}
}
...
void setup() {
...
wimod.begin();
wimod.RegisterCDataTxClient(myTxCDataInd);
...
}
◆ convert() [5/8]
Convert a received low level HCI-Msg to a high-level RemoteCtrl Btn Info.
This function should be used by the RemoteCtrl Button Pressed Indication Callback functions prior processing the received data message.
- Parameters
-
| RxMsg | Reference to low-level HCI message. |
- Warning
- DO NOT MANIPULATE THESE VALUES !!!
- Parameters
-
| btnInfo | Pointer to the buffer where to store the received data |
- Return values
-
| true | if the conversion was successful |
if (wimod.convert(rxMsg, &btnInfo)) {
...
if (btnInfo.
ButtonBitmap & SENSORAPP_DIGITAL_INPUT_BOTTON1_SET) {...}
...
}
}
...
void setup() {
...
wimod.begin();
wimod.RegisterBtnPressedClient(myBtnPressedInd);
...
}
◆ convert() [6/8]
Convert a received low level HCI-Msg to a high-level RLT Status Info.
This function should be used by the RLT Status Indication Callback functions prior processing the received data message.
- Parameters
-
| RxMsg | Reference to low-level HCI message. |
- Warning
- DO NOT MANIPULATE THESE VALUES !!!
- Parameters
-
| statusData | Pointer to the buffer where to store the received data |
- Return values
-
| true | if the conversion was successful |
if (wimod.convert(rxMsg, &statusData)) {
...
}
}
...
void setup() {
...
wimod.begin();
wimod.RegisterRltStatusClient(myRLTStatusInd);
...
wimod.StartRadioLinkTest(...)
}
◆ convert() [7/8]
Convert a received low level HCI-Msg to a high-level SensorData Info.
This function should be used by the SensorApp Data Indication Callback functions prior processing the received data message.
- Parameters
-
| RxMsg | Reference to low-level HCI message. |
- Warning
- DO NOT MANIPULATE THESE VALUES !!!
- Parameters
-
| sensorAckData | Pointer to the buffer where to store the received data |
- Return values
-
| true | if the conversion was successful |
if (wimod.convert(rxMsg, &sensorAckData)) {
...
if (statusData.DigitalInputs & SENSORAPP_DIGITAL_INPUT_BOTTON1_SET) {...}
...
}
}
...
void setup() {
...
wimod.begin();
wimod.RegisterSensorAppAckIndClient(mySensorAckDataInd);
...
}
◆ convert() [8/8]
Convert a received low level HCI-Msg to a high-level SensorData Info.
This function should be used by the SensorApp Data Indication Callback functions prior processing the received data message.
- Parameters
-
| RxMsg | Reference to low-level HCI message. |
- Warning
- DO NOT MANIPULATE THESE VALUES !!!
- Parameters
-
| sensorData | Pointer to the buffer where to store the received data |
- Return values
-
| true | if the conversion was successful |
if (wimod.convert(rxMsg, &sensorData)) {
...
if (statusData.DigitalInputs & SENSORAPP_DIGITAL_INPUT_BOTTON1_SET) {...}
...
}
}
...
void setup() {
...
wimod.begin();
wimod.RegisterSensorAppDataIndClient(mySensorDataInd);
...
}
◆ end()
| void WiMODLRBASE_PLUS::end |
( |
void |
| ) |
|
|
virtual |
De-Setup internal things.
Reimplemented from TWiMODLRHCI.
◆ ExecuteGenericCmd()
| bool WiMODLRBASE_PLUS::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
-
| 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
...
TWiMODLR_Generic_CmdInfo cmdInfo;
cmdInfo.SapID = 0x01;
cmdInfo.MsgReqID = 0x01;
cmdInfo.MsgRspID = 0x02;
cmdInfo.CmdPayloadLength = 0
cmdInfo.CmdPayload[0] = 0xab;
...
if (wimod.ExecuteGenericCmd(&cmdInfo)) {
if (cmdInfo.CmdPayloadLength > 0) {
rspData =cmdInfo.CmdPayload[0]
...
...
}
}
◆ GetAesKey()
| bool WiMODLRBASE_PLUS::GetAesKey |
( |
UINT8 * |
key, |
|
|
TWiMODLRResultCodes * |
hciResult = NULL, |
|
|
UINT8 * |
rspStatus = NULL |
|
) |
| |
Gets the used security 128bit AES key.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| key | Pointer to the 128bit AES key that is 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
const uint8_t AesKey[16];
if (wimod.GetAesKey(AesKey)) {
}
...
◆ GetDeviceInfo()
Gets the basic DeviceInfo from WiMOD module.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| info | Pointer where to store the retrieved information |
- See also
- TWiMODLR_DevMgmt_DevInfo for details
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
if (wimod.GetDeviceInfo(&devInfo)) {
...
}
...
◆ GetFirmwareInfo()
Gets the basic FirmwareInfo from WiMOD module.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| info | Pointer where to store the retrieved information |
- See also
- TWiMODLR_DevMgmt_FwInfo for details
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
if (wimod.GetFirmwareInfo(&fwInfo)) {
}
...
◆ GetHciConfig()
Gets the current HCI configuration of the WiMOD.
- See also
- HCI documentation and feature specification for details
- Parameters
-
| 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
wimod.GetHciConfig(&hciConfig);
...
...
}
...
◆ GetLastHciResult()
Gets the value of the last local HCI TX status.
If the optional parameters have been left out (for the normal commands), the user can get the last value back by using this function
- Return values
-
| the | last value of the last command issued |
...
if (wimod.Ping() == false) {
hciResult = wimod.GetLastHciResult();
switch (hciResult):
...
}
...
◆ GetLastResponseStatus()
| UINT8 WiMODLRBASE_PLUS::GetLastResponseStatus |
( |
void |
| ) |
|
Gets the value of the last status response value of the WiMOD.
If the optional parameters have been left out (for the normal commands), the user can get the last value back by using this function
- Return values
-
| the | last value of the last command issued |
...
if (wimod.Ping() == false) {
uint8_t rsp;
rsp = wimod.GetLastResponseStatus();
switch (rsp):
...
}
...
◆ GetOperationMode()
Gets the current operation mode of the WiMOD module.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| opMode | Pointer where to store the information |
- See also
- TWiMOD_OperationMode for details
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
if (wimod.GetOperationMode(&opMode)) {
}
}
...
◆ GetRadioConfig()
Gets the current configuration of the radio of the WiMOD module.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| radioCfg | Pointer where to store the information |
- See also
- TWiMODLR_DevMgmt_RadioConfig for details
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
if (wimod.GetRadioConfig(&radioCfg)) {
}
...
}
...
◆ GetRtc()
| bool WiMODLRBASE_PLUS::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
-
| rtcTime | Pointer where to store the RTC information |
- See also
- WIMOD_RTC_GET_* Macros for conversation of this value
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
uint32_t timestamp;
wimod.GetRtc(×tamp);
...
◆ GetRtcAlarm()
Gets information about the RTC alarm feature of the WiMOD.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
wimod.GetRtcAlarm(&rtcAlarm);
...
printf("Alarm is active");
...
}
...
◆ GetSensorAppConfig()
Tries to get the current config of the integrated Sensor App feature of the WiMOD.
The firmware has got a feature called "SensorApp". This feauture can be used to transfer several "sensor" values from the DemoBoard to remote peer WiMOD device. The transferable sensor values are:
- states of the push buttons (of the DemoBoard)
- state of the DIP switch (of the DemoBoard)
- current voltage reading of the supply voltage
- current ADC value / position of the potentio meter (of the DemoBoard)
- current temperature reading of the WiMOD
Please note that the SensorApp may interrupt the normal operation of the WiMOD. So it is recommended to use this feature only in isolated szenarios.
Two devices are required: One that akts as "Transmitter" while the other one acts a "Receiver".
For detailed infos please refer to the feature specificaton document(s).
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| config | Data structure containing the setup data for the SensorApp |
| 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
...
TWiMODLR_SensorApp_Config config;
if wimod.GetSensorAppConfig(&config)) {
...
}
...
◆ GetSystemStatus()
Gets the bas SystemStatus info from WiMOD module.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| info | Pointer where to store the retrieved information |
- See also
- TWiMODLR_DevMgmt_SystemStatus for details
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
if (wimod.GetSystemStatus(&sysStatus)) {
}
...
◆ Ping()
| bool WiMODLRBASE_PLUS::Ping |
( |
TWiMODLRResultCodes * |
hciResult = NULL, |
|
|
UINT8 * |
rspStatus = NULL |
|
) |
| |
Ping Cmd - Checks serial connetion to WiMOD module.
- See also
- TWiMODLRResultCodes for interpretation of the values
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
if (wimod.Ping()) {
} else {
}
OR:
if (!wimod.Ping(&hciResult)) {
}
OR:
uint8 rspCode;
if (!wimod.Ping(&hciResult, &rspCode)) {
if (rspCode == DEVMGMT_STATUS_ERROR) {
}
...
}
...
}
◆ RegisterAckRxClient()
Register a callback function for the RX Ack (+data) Indication - optional -.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| cb | Pointer a callback function |
- See also
- TRadioLinkAckRxIndicationCallback for details
- Note
- The callback function should call the corresponding convert in order to decode the message properly
...
}
void setup() {
...
wimod.RegisterAckRxClient(myAckRxInd);
...
}
...
◆ RegisterAckRxTimeoutClient()
Register a callback function for the Ack Timeout Indication - optional -.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| cb | Pointer a callback function |
- See also
- TRadioLinkAckRxTimeoutIndicationCallback for details
void myAckRxTimemoutInd() {
...
}
void setup() {
...
wimod.RegisterAckRxTimeoutClient(myAckRxTimemoutInd);
...
}
...
◆ RegisterAckTxCallback()
Register a callback function for the TX Ack Indication - optional -.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| cb | Pointer a callback function |
- See also
- TRadioLinkAckTxIndicationCallback for details
void myAckTxInd() {
...
}
void setup() {
...
wimod.RegisterAckTxCallback(myAckTxInd);
...
}
...
◆ RegisterBtnPressedClient()
Register a callback function for the RemoteCtrl Btn Pressed Indication.
Please see the feature specification document for details.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| cb | Pointer a callback function |
- Note
- The callback function should call the corresponding convert in order to decode the message properly
...
}
void setup() {
...
wimod.RegisterBtnPressedClient(myBtnPressedInd);
...
}
...
◆ RegisterCDataRxClient()
Register a callback function for the RX C-Data Indication - optional -.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| cb | Pointer a callback function |
- See also
- TRadioLinkCDataRxIndicationCallback for details
- Note
- The callback function should call the corresponding convert in order to decode the message properly
...
}
void setup() {
...
wimod.RegisterCDataRxClient(myCDataRxInd);
...
}
...
◆ RegisterCDataTxClient()
Register a callback function for the TX C-Data Indication - optional -.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| cb | Pointer a callback function |
- See also
- TRadioLinkCDataTxIndicationCallback for details
- Note
- The callback function should call the corresponding convert in order to decode the message properly
...
}
void setup() {
...
wimod.RegisterCDataTxClient(myCDataTxInd);
...
}
...
◆ RegisterPowerUpIndicationClient()
Register a callback function for the PowerUp Indication - optional -.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| cb | Pointer a callback function |
- See also
- TDevMgmtPowerUpCallback for details
void myPowerUpCallback(void) {
...
}
void setup() {
...
wimod.RegisterPowerUpIndicationClient(myPowerUpCallback);
...
}
◆ RegisterRltStatusClient()
Register a callback function for RLT updates.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| cb | Pointer a callback function |
- See also
- TRltStatusIndicationCallback for details
- Note
- The callback function should call the corresponding convert in order to decode the message properly
...
}
void setup() {
...
wimod.RegisterRltStatusClient(myRltUpdateInd);
...
}
...
◆ RegisterRtcAlarmIndicationClient()
Register a callback function for the RTC Alarm Indication - optional -.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| cb | Pointer a callback function |
- See also
- TDevMgmtRtcAlarmCallback for details
void myRtcAlarmCallback(void) {
...
}
void setup() {
...
wimod.RegisterRtcAlarmIndicationClient(myRtcAlarmCallback);
...
}
◆ RegisterSensorAppAckIndClient()
Register a callback function for the SensorAppAckData Indication - optional -.
Please see the feature specification document for details.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| cb | Pointer a callback function |
- Note
- The callback function should call the corresponding convert in order to decode the message properly
...
}
void setup() {
...
wimod.RegisterSensorAppAckIndClient(mySensorAppAckInd);
...
}
...
◆ RegisterSensorAppDataIndClient()
Register a callback function for the SensorAppData Indication.
Please see the feature specification document for details.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| cb | Pointer a callback function |
- Note
- The callback function should call the corresponding convert in order to decode the message properly
...
}
void setup() {
...
wimod.RegisterSensorAppDataIndClient(mySensorAppInd);
...
}
...
◆ RegisterUDataRxClient()
Register a callback function for the RX U-Data Indication - optional -.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| cb | Pointer a callback function |
- See also
- TRadioLinkUDataRxIndicationCallback for details
- Note
- The callback function should call the corresponding convert in order to decode the message properly
...
}
void setup() {
...
wimod.RegisterUDataRxClient(myUDataRxInd);
...
}
...
◆ RegisterUDataTxClient()
Register a callback function for the TX U-Data Indication - optional -.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| cb | Pointer a callback function |
- See also
- TRadioLinkUDataTxIndicationCallback for details
void myUDataTxInd() {
...
}
void setup() {
...
wimod.RegisterUDataTxClient(myUDataTxInd);
...
}
...
◆ Reset()
| bool WiMODLRBASE_PLUS::Reset |
( |
TWiMODLRResultCodes * |
hciResult = NULL, |
|
|
UINT8 * |
rspStatus = NULL |
|
) |
| |
Reset Cmd - Do a local reboot of the WiMOD module.
- See also
- TWiMODLRResultCodes for interpretation of the values
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
if (wimod.Reset() {
}
...
◆ ResetRadioConfig()
| bool WiMODLRBASE_PLUS::ResetRadioConfig |
( |
TWiMODLRResultCodes * |
hciResult = NULL, |
|
|
UINT8 * |
rspStatus = NULL |
|
) |
| |
Resets the current configuration to defaults.
- See also
- HCI Documentation for details of default settings
-
TWiMODLRResultCodes for interpretation of the values
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
...
if (wimod.ResetRadioConfig()) {
}
...
◆ SendCData()
Tries to send transmit C-Data to peer module via RF link.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| txMsg | Data structure containing the TX-data and options. |
- See also
- TWiMODLR_RadioLink_Msg for details
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
...
TWiMODLR_RadioLink_Msg txData;
txData.DestinationGroupAddress = 0x10;
txData.DestinationDeviceAddress = 0x1234;
txData.Length = strlen("Hello World!");
strncpy(txData.Payload, "Hello World!", WiMODLORAWAN_APP_PAYLOAD_LEN);
wimod.SendCData(&txData);
...
...
◆ SendUData()
Tries to send transmit U-Data to peer module via RF link.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| txMsg | Data structure containing the TX-data and options. |
- See also
- TWiMODLR_RadioLink_Msg for details
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
...
TWiMODLR_RadioLink_Msg txData;
txData.DestinationGroupAddress = 0x10;
txData.DestinationDeviceAddress = 0x1234;
txData.Length = strlen("Hello World!");
strncpy(txData.Payload, "Hello World!", WiMODLORAWAN_APP_PAYLOAD_LEN);
wimod.SendUData(&txData);
...
◆ SetAckData()
Sets additional user payload for the next ack frame to send.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| txMsg | Pointer to data structure containing the payload data. note: Max ack payload size is 8 byte! |
- See also
- TWiMODLR_RadioLink_Msg for details
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
...
wimod.SetAckData(ackPayloadData);
...
◆ SetAesKey()
| bool WiMODLRBASE_PLUS::SetAesKey |
( |
const UINT8 * |
key, |
|
|
TWiMODLRResultCodes * |
hciResult = NULL, |
|
|
UINT8 * |
rspStatus = NULL |
|
) |
| |
Sets the security 128bit AES key to use for RF communication.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| key | Pointer to the 128bit AES key to by 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
const uint8_t AesKey[] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0C, 0x0D, 0x0E, 0x0F};
if (wimod.SetAesKey(AesKey)) {
}
...
◆ SetHciConfig()
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
-
| 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
...
wimod.GetHciConfig(&hciConfig);
...
◆ SetOperationMode()
Sets the current operation mode of the WiMOD module.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| opMode | The new operation mode to set |
- See also
- TWiMOD_OperationMode for details
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
if (wimod.SetOperationMode(opMode)) {
}
...
◆ SetRadioConfig()
Sets the current configuration for the radio of the WiMOD module.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| radioCfg | Pointer where to read the information |
- See also
- TWiMODLR_DevMgmt_RadioConfig for details
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
...
FreqCalc_calcFreqToRegister(2458300000,
...
if (wimod.SetRadioConfig(&radioCfg)) {
}
...
◆ SetRadioMode()
SetRadioMode - Set the current radio mode of the WiMOD.
- Parameters
-
| radioMode | the new radio 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. |
- Warning
- : This use this command with care!
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
◆ SetRtc()
| bool WiMODLRBASE_PLUS::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
-
| rtcTime | RTC information to setup |
- See also
- WIMOD_RTC_MAKE_DATETIME_U32 Macro for conversation of this value
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
uint32_t timestamp;
wimod.SetRtc(timestamp);
...
◆ SetRtcAlarm()
Sets and enables the RTC alarm feature of the WiMOD.
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
wimod.SetRtcAlarm(&rtcAlarm);
...
◆ SetSensorAppConfig()
Tries to configure the integrated Sensor App feature of the WiMOD.
The firmware has got a feature called "SensorApp". This feauture can be used to transfer several "sensor" values from the DemoBoard to remote peer WiMOD device. The transferable sensor values are:
- states of the push buttons (of the DemoBoard)
- state of the DIP switch (of the DemoBoard)
- current voltage reading of the supply voltage
- current ADC value / position of the potentio meter (of the DemoBoard)
- current temperature reading of the WiMOD
Please note that the SensorApp may interrupt the normal operation of the WiMOD. So it is recommended to use this feature only in isolated szenarios.
Two devices are required: One that akts as "Transmitter" while the other one acts a "Receiver".
For detailed infos please refer to the feature specificaton document(s).
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| config | Data structure containing the setup data for the SensorApp |
| 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
...
TWiMODLR_SensorApp_Config config;
config.SendingPeriod = 1000;
config.LinkTimeout = 2000;
wimod.SetSensorAppConfig(&config);
...
◆ StartRadioLinkTest()
Tries to start the integrated Radio Link Test feature of the WiMOD.
The firmware has got a feature called "Radio Link Test". This feauture can be used to test the radio link between two devices.
Please note that the Radio Link Test may interrupt the normal operation of the WiMOD. So it is recommended to use this feature only in isolated test szenarios.
Two devices are required: One that akts as "Master" that starts the transmission of test packets and a 2nd one that replies the test packets.
For detailed infos please refer to the feature specificaton document(s).
- See also
- TWiMODLRResultCodes for interpretation of the values
- Parameters
-
| params | Data structure containing the setup data for the radio link test.. |
- See also
- TWiMODLR_RLT_Parameter for details
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
...
TWiMODLR_RadioLink_Msg params;
params.DestinationGroupAddress = 0x10;
params.DestDevAddress = 0x1234;
params.PacketSize = 10;
params.NumPackets = 20;
wimod.RegisterRltStatusClient(rltClient);
wimod.StartRadioLinkTest(¶ms);
...
...
◆ StopRadioLinkTest()
| bool WiMODLRBASE_PLUS::StopRadioLinkTest |
( |
TWiMODLRResultCodes * |
hciResult = NULL, |
|
|
UINT8 * |
rspStatus = NULL |
|
) |
| |
Tries to stop a running Radio Link Test.
The firmware has got a feature called "Radio Link Test". This feauture can be used to test the radio link between two devices.
Please note that the Radio Link Test may interrupt the normal operation of the WiMOD. So it is recommended to use this feature only in isolated test szenarios.
Two devices are required: One that akts as "Master" that starts the transmission of test packets and a 2nd one that replies the test packets.
For detailed infos please refer to the feature specificaton document(s).
- See also
- TWiMODLRResultCodes for interpretation of the values
- 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. |
- Return values
-
| true | if everything is ok |
| false | if something went wrong; see hciResult & rspStatus for details |
...
wimod.StopRadioLinkTest();
...
◆ SapDevMgmt
Service Access Point for 'DeviceManagement'
◆ SapGeneric
dumy SAP for generic HCI command
◆ SapRadioLink
Service Access Point for 'RadioLink'
◆ SapRemoteCtrl
Serive AccessPoint for RemoteCtrl feature
◆ SapRLT
Serive AccessPoint for Radio Link Test feature
◆ SapSensor
Serive AccessPoint for SensorApp feature
The documentation for this class was generated from the following files:
#define WIMOD_RTC_GET_MONTHS(t)
Definition: WiMOD_SAP_DEVMGMT_IDs.h:547
TRadioCfg_ModulationPlus Modulation
Definition: WiMOD_SAP_DEVMGMT_PLUS_IDs.h:305
@ WiMODLR_RESULT_SLIP_ENCODER_ERROR
Definition: WiMODLRHCI.h:155
@ LoRaWAN_Status_Length_Error
Definition: WiMOD_SAP_LORAWAN_IDs.h:114
Structure containing the radio (stack) config parameters of the WiMOD (only for LR-BASE)
Definition: WiMOD_SAP_DEVMGMT_PLUS_IDs.h:292
#define WIMOD_RTC_GET_MINUTES(t)
Definition: WiMOD_SAP_DEVMGMT_IDs.h:545
TWiMOD_RtcAlarmStatus AlarmStatus
Definition: WiMOD_SAP_DEVMGMT_IDs.h:487
uint32_t FreqCalc_calcRegisterToFreq(uint8_t msb, uint8_t mid, uint8_t lsb)
Translates given register values to a carrier frequency.
Definition: FreqCalc_SX127x.c:68
UINT8 Payload[WIMOD_RADIOLINK_PAYLOAD_LEN]
Definition: WiMOD_SAP_RadioLink_IDs.h:175
TWiMOD_HCI_Baudrate BaudrateID
Definition: WiMOD_SAP_DEVMGMT_IDs.h:525
UINT16 DestinationDeviceAddress
Definition: WiMOD_SAP_RadioLink_IDs.h:167
Structure containing a general RadioLink HCI message.
Definition: WiMOD_SAP_RadioLink_IDs.h:160
@ WiMODLR_RESULT_TRANMIT_ERROR
Definition: WiMODLRHCI.h:154
Basic information about the current firmware of the WiMOD.
Definition: WiMOD_SAP_DEVMGMT_IDs.h:220
@ RLT_TestMode_Single
Definition: WiMOD_SAP_RLT_IDs.h:95
Structure containing information about an acknowledgment transmission.
Definition: WiMOD_SAP_RadioLink_IDs.h:243
basic low level HCI message structure used for all serial messages to/from WiMOD
Definition: WiMODLRHCI.h:120
@ LoRaWAN_Status_Channel_Blocked
Definition: WiMOD_SAP_LORAWAN_IDs.h:116
@ LoRaWAN_Status_Error
Definition: WiMOD_SAP_LORAWAN_IDs.h:107
@ WiMODLR_RESULT_OK
Definition: WiMODLRHCI.h:151
Structure containing the RTC Alarm config parameters of the WiMOD.
Definition: WiMOD_SAP_DEVMGMT_IDs.h:484
@ LRBASE_PLUS_TxPowerLevel_p10_dBm
Definition: WiMOD_SAP_DEVMGMT_PLUS_IDs.h:247
TWiMOD_OperationMode
This enum describes the possible operation modes of the WiMOD (only for LR-BASE).
Definition: WiMOD_SAP_DEVMGMT_IDs.h:440
@ RTC_Alarm_Single
Definition: WiMOD_SAP_DEVMGMT_IDs.h:477
#define WIMOD_RTC_GET_YEARS(t)
Definition: WiMOD_SAP_DEVMGMT_IDs.h:553
UINT8 Hour
Definition: WiMOD_SAP_DEVMGMT_IDs.h:490
#define WIMOD_RTC_MAKE_DATETIME_U32(s, m, h, dd, mm, yy)
Definition: WiMOD_SAP_DEVMGMT_IDs.h:556
@ LRBASE_PLUS_Modulation_FLRC
Definition: WiMOD_SAP_DEVMGMT_PLUS_IDs.h:104
UINT8 RfFreq_MSB
Definition: WiMOD_SAP_DEVMGMT_PLUS_IDs.h:308
Basic information about system status of the WiMOD.
Definition: WiMOD_SAP_DEVMGMT_PLUS_IDs.h:331
@ LoRaWAN_Status_Channel_Not_Available
Definition: WiMOD_SAP_LORAWAN_IDs.h:117
Structure containing the data of an Ack of the SensorApp.
Definition: WiMOD_SAP_SensorApp_IDs.h:164
Main class representing the interface to the WiMOD running the firmware WiMODLR-BASE.
Definition: WiMODLR_BASE.h:122
Structure containing a general RadioLink HCI message.
Definition: WiMOD_SAP_RLT_IDs.h:114
Structure containing SensorApp Data information.
Definition: WiMOD_SAP_SensorApp_IDs.h:137
@ WimodHciBaudrate_57600
Definition: WiMOD_SAP_DEVMGMT_IDs.h:506
UINT8 StoreNwmFlag
Definition: WiMOD_SAP_DEVMGMT_PLUS_IDs.h:298
UINT8 DestinationGroupAddress
Definition: WiMOD_SAP_RadioLink_IDs.h:166
#define WIMOD_RTC_GET_SECONDS(t)
Definition: WiMOD_SAP_DEVMGMT_IDs.h:543
@ RadioMode_Standard
Definition: WiMOD_SAP_DEVMGMT_IDs.h:257
UINT8 Seconds
Definition: WiMOD_SAP_DEVMGMT_IDs.h:492
#define WIMOD_RTC_GET_HOURS(t)
Definition: WiMOD_SAP_DEVMGMT_IDs.h:549
@ LoRaWAN_Status_Device_Not_Activated
Definition: WiMOD_SAP_LORAWAN_IDs.h:111
UINT8 Minutes
Definition: WiMOD_SAP_DEVMGMT_IDs.h:491
@ SensorApp_Mode_SensorDataTransmitter
Definition: WiMOD_SAP_SensorApp_IDs.h:113
@ LRBASE_PLUS_Modulation_LoRa
Definition: WiMOD_SAP_DEVMGMT_PLUS_IDs.h:103
#define WIMOD_RTC_GET_DAYS(t)
Definition: WiMOD_SAP_DEVMGMT_IDs.h:551
@ LoRaWAN_Status_Cmd_Not_Supported
Definition: WiMOD_SAP_LORAWAN_IDs.h:108
Structure containing basic information about the WiMOD device.
Definition: WiMOD_SAP_DEVMGMT_IDs.h:172
UINT8 Length
Definition: WiMOD_SAP_RadioLink_IDs.h:174
@ WiMODLR_RESULT_PAYLOAD_PTR_ERROR
Definition: WiMODLRHCI.h:153
UINT8 ButtonBitmap
Definition: WiMOD_SAP_RemoteCtrl_IDs.h:97
@ LoRaWAN_Status_Ok
Definition: WiMOD_SAP_LORAWAN_IDs.h:106
Main class representing the interface to the WiMOD running the firmware WiMODLR-BASE_PLUS.
Definition: WiMODLR_BASE_PLUS.h:103
UINT8 RfFreq_LSB
Definition: WiMOD_SAP_DEVMGMT_PLUS_IDs.h:306
UINT8 RfFreq_MID
Definition: WiMOD_SAP_DEVMGMT_PLUS_IDs.h:307
TRadioCfg_RadioModePlus RadioMode
Definition: WiMOD_SAP_DEVMGMT_PLUS_IDs.h:300
TWiMODLRResultCodes
Result codes for the local serial communication itself.
Definition: WiMODLRHCI.h:149
UINT8 FirmwareMayorVersion
Definition: WiMOD_SAP_DEVMGMT_IDs.h:224
@ LoRaWAN_Status_Device_Busy
Definition: WiMOD_SAP_LORAWAN_IDs.h:112
UINT16 BatteryStatus
Definition: WiMOD_SAP_DEVMGMT_PLUS_IDs.h:338
@ WiMODLR_RESULT_NO_RESPONSE
Definition: WiMODLRHCI.h:156
Structure containing a general RadioLink HCI message.
Definition: WiMOD_SAP_RemoteCtrl_IDs.h:86
@ LoRaWAN_Status_No_Factory_Settings
Definition: WiMOD_SAP_LORAWAN_IDs.h:115
TRadioCfg_PowerLevelPlus PowerLevel
Definition: WiMOD_SAP_DEVMGMT_PLUS_IDs.h:315
HCI Configuration Parameters.
Definition: WiMOD_SAP_DEVMGMT_IDs.h:519
UINT16 NumWakeUpChars
Definition: WiMOD_SAP_DEVMGMT_IDs.h:526
Structure containing information about a U-Data indication (TX only)
Definition: WiMOD_SAP_RadioLink_IDs.h:232
#define SENSORAPP_OPTION_PUSH_BUTTON_ONE
Definition: WiMOD_SAP_SensorApp_IDs.h:91
@ LoRaWAN_Status_Wrong_parameter
Definition: WiMOD_SAP_LORAWAN_IDs.h:109
@ LoRaWAN_Status_Wrong_DeviceMode
Definition: WiMOD_SAP_LORAWAN_IDs.h:110
@ RTC_Alarm_Alarm_Set
Definition: WiMOD_SAP_DEVMGMT_IDs.h:462
Structure containing information about a C-Data indication (TX only)
Definition: WiMOD_SAP_RadioLink_IDs.h:221
@ LoRaWAN_Status_Queue_Full
Definition: WiMOD_SAP_LORAWAN_IDs.h:113
@ OperationMode_Application
Definition: WiMOD_SAP_DEVMGMT_IDs.h:442
TWiMOD_RtcAlarmType Options
Definition: WiMOD_SAP_DEVMGMT_IDs.h:489
@ WiMODLR_RESULT_PAYLOAD_LENGTH_ERROR
Definition: WiMODLRHCI.h:152