XDK API  3.6.0
Documentation
Files | Data Structures | Typedefs | Enumerations | Functions
LoRaDrivers

This file defines the Application programming interface for a LoRa. More...

Files

file  BCDS_LoRaDevice.h
 
file  BCDS_LoRaSimplified.h
 

Data Structures

struct  LoRa_NetworkConfig_S
 
struct  LoRaMacEventInfo_S
 

Typedefs

typedef void(* LoRa_AppCallback_T )(void *unused, LoRa_NetworkEvent_T event)
 This data type represents a function pointer which would be executed when any event (error/status/...) is to be notified. More...
 
typedef void(* LoRa_callbackFunction_T )(void *, LoRaMacEventInfo_T *)
 
typedef void(* Lora_DataReceivedCallBack )(uint8_t *rxBuffer, uint8_t rxDataLength)
 Callback function signature to be called on data reception. More...
 
typedef struct LoRa_NetworkConfig_S LoRa_NetworkConfig_T
 
typedef enum LoRa_NetworkEvent_E LoRa_NetworkEvent_T
 
typedef enum LoRaDeviceBand_E LoRaDeviceBand_T
 
typedef enum LoRaDeviceJoin_E LoRaDeviceJoin_T
 
typedef enum LoRaDeviceTxPower_E LoRaDeviceTxPower_T
 
typedef struct LoRaMacEventInfo_S LoRaMacEventInfo_T
 

Enumerations

enum  BCDS_LORA_ModuleID_E
 BCDS_MODULE_ID for each LoRa C module usage: #undef BCDS_MODULE_ID #define BCDS_MODULE_ID BCDS_LORA_MODULE_ID_xxx. More...
 
enum  LoRa_NetworkEvent_E
 Network events for the supported drivers. More...
 
enum  LoRa_Retcode_E
 return value for the supported lora drivers More...
 
enum  LoRaDeviceBand_E
 
enum  LoRaDeviceJoin_E
 
enum  LoRaDeviceReset_E
 
enum  LoRaDeviceTxPower_E
 

Functions

 BCDS_DEPRECATED (Retcode_T LoRa_Initialize(LoRa_NetworkConfig_T *config))
 LoRa initialization entry will initialize the CommBuffer, the PalState, the Scheduler and LoRa itself. More...
 
 BCDS_DEPRECATED (Retcode_T LoRa_Deinitialize(void))
 LoRa Deinitialization entry will deinitialize the CommBuffer, the PalState, the Scheduler and LoRa itself. More...
 
 BCDS_DEPRECATED (Retcode_T LoRa_TransmitData(uint8_t loraPort, void *dataBuffer, uint16_t dataBufferSize))
 function to transmit data through LoRa communication More...
 
Retcode_T LoRaDevice_Deinit (void)
 Switches off the module and deinitializes the driver. More...
 
Retcode_T LoRaDevice_GetADR (bool *adr)
 Returns the status of the Adaptive data Rate. More...
 
Retcode_T LoRaDevice_GetAppEUI (uint64_t *appEUI)
 Returns the device unique identifier used during the join procedure. More...
 
Retcode_T LoRaDevice_GetAutomaticReply (bool *autoReply)
 Returns the status of the automatic reply: ON or OFF. More...
 
Retcode_T LoRaDevice_GetBand (LoRaDeviceBand_T *band)
 Returns the frequency band in which the LoRa module is currently operating. More...
 
Retcode_T LoRaDevice_GetChannelDataRateRange (uint8_t chId, uint8_t *minRange, uint8_t *maxRange)
 Gets a channel's Data Rate range. More...
 
Retcode_T LoRaDevice_GetChannelDutyCycle (uint8_t chId, uint16_t *dutyCycle)
 Gets a channels duty cycle. More...
 
Retcode_T LoRaDevice_GetChannelFreq (uint8_t chId, uint32_t *freq_Hz)
 Gets the channel frequency. More...
 
Retcode_T LoRaDevice_GetChannelStatus (uint8_t chId, bool *status)
 Gets a channels Status. More...
 
Retcode_T LoRaDevice_GetDataRate (uint8_t *dataRate)
 Gets the Data Rate used for transmission. More...
 
uint32_t LoRaDevice_GetDemodulationMargin (void *)
 Gets the demodulation margin as received in the last Link_Check_Answer frame. More...
 
Retcode_T LoRaDevice_GetDevAddr (uint32_t *devAddr)
 returns the device address assigned by the network server to the module after successful join or preprogrammed in the device for ABP type join More...
 
Retcode_T LoRaDevice_GetDevEUI (uint64_t *devEUI)
 Returns the device unique identifier used during the join procedure. More...
 
uint32_t LoRaDevice_GetDutycyclePrescaler (void *)
 Gets the duty cycle prescaler which can only be configured by the network server. More...
 
Retcode_T LoRaDevice_GetFCntDown (uint32_t *dnctr)
 Gets the value of the current downlink frame counter. More...
 
Retcode_T LoRaDevice_GetFCntUp (uint32_t *upctr)
 Gets the value of the current uplink frame counter. More...
 
Retcode_T LoRaDevice_GetFrequencyDeviation (uint32_t *freqdev)
 Gets the frequency deviation configured for the device. More...
 
uint8_t LoRaDevice_GetGatewayNumber (void *)
 This command will return the number of gateways that successfully received the last Link_Check_Request frame command, as received in the last Link_Check_Answer. More...
 
Retcode_T LoRaDevice_GetHwEUI (uint64_t *hwEUI)
 Returns the globally unique identifier of the LoRa module (if existing) More...
 
Retcode_T LoRaDevice_GetIQInversion (bool *iqi)
 Gets the IQ inversion status. More...
 
Retcode_T LoRaDevice_GetRadioBandwidth (uint16_t *bandWidth_kHz)
 Get the value used for the radio bandwidth. More...
 
Retcode_T LoRaDevice_GetRadioCodingRate (char *codingRate)
 Get the coding rate used by the radio. More...
 
Retcode_T LoRaDevice_GetRadioCRC (bool *crc)
 Gets the Status of CRC use. More...
 
Retcode_T LoRaDevice_GetRadioFrequency (uint32_t *frequency_Hz)
 Gets the Frequency used for by the radio transceiver. More...
 
Retcode_T LoRaDevice_GetRadioPreambleLength (uint16_t *preamble)
 Gets the length of the preamble used by the radio transceiver. More...
 
Retcode_T LoRaDevice_GetRadioSNR (int8_t *snr)
 Get the signal noise ratio (SNR) of the last received packet. More...
 
Retcode_T LoRaDevice_GetRadioSpreadingFactor (uint8_t *sf)
 Gets the Spreading Factor currently configured for radio transmission. More...
 
Retcode_T LoRaDevice_GetRadioTxPower (int8_t *pwrout)
 returns the currently configured Radio transmission power More...
 
Retcode_T LoRaDevice_GetRetransmissions (uint8_t *retx)
 Gets the number of retransmissions used for an uplink confirmed packet. More...
 
Retcode_T LoRaDevice_GetRxDelay (uint32_t *rxDelay_ms)
 Gets the delay between the transmission and the first receive window. More...
 
Retcode_T LoRaDevice_GetRxWindow2 (uint8_t *dataRate, uint32_t *frequency_Hz, uint16_t band)
 Gets the data rate and frequency used for the second Receive window at the specified frequency band. More...
 
Retcode_T LoRaDevice_GetStatus (uint32_t *status)
 Gets the current status of the module. More...
 
Retcode_T LoRaDevice_GetSyncWord (uint8_t *sync)
 Gets the synchronization word for the LoRaWAN communication. More...
 
Retcode_T LoRaDevice_GetTxPower (LoRaDeviceTxPower_T *pwr)
 Gets the Radio transmit power. More...
 
Retcode_T LoRaDevice_Init (LoRa_callbackFunction_T EventCallback, uint32_t frequency)
 Switches ON the module and initializes the driver. More...
 
Retcode_T LoRaDevice_Join (LoRaDeviceJoin_T joinType)
 performs a join request if the device has not joined a network yet More...
 
Retcode_T LoRaDevice_LoRaWANPause (uint32_t *pauseWAN)
 Pauses the LoRaWAN stack functionality to allow transceiver (radio) configuration. More...
 
Retcode_T LoRaDevice_LoRaWANResume (void)
 This command resumes LoRaWAN stack functionality, in order to continue normal functionality after being paused. More...
 
Retcode_T LoRaDevice_RadioListen (uint16_t rxWindowSize_ms)
 Puts the Radio device into listening mode for a specified period of time. More...
 
Retcode_T LoRaDevice_RadioTransmit (uint8_t *dataBuffer, uint16_t dataBufferSize)
 Transmits a simple data frame over the radio transceiver of the LoRa device FSK or LoRa modulation can be used. More...
 
Retcode_T LoRaDevice_Reset (enum LoRaDeviceReset_E resetType)
 Performs Reset operation to the LoRa device. More...
 
Retcode_T LoRaDevice_ResetMac (uint16_t frequency)
 Performs Reset of the MAC layer of the LoRa module to a specific frequency band. More...
 
Retcode_T LoRaDevice_SaveConfig (void)
 Saves the device configuration to permanent storage. More...
 
Retcode_T LoRaDevice_SendConfirmed (uint8_t LoRaPort, uint8_t *dataBuffer, uint16_t dataBufferSize)
 Sends confirmed data over LoRa. More...
 
Retcode_T LoRaDevice_SendUnconfirmed (uint8_t LoRaPort, uint8_t *dataBuffer, uint16_t dataBufferSize)
 Sends unconfirmed data frame over LoRa. More...
 
Retcode_T LoRaDevice_SetADR (bool adr)
 Sets the Adaptive Data Rate option to ON/OFF. More...
 
Retcode_T LoRaDevice_SetAppEUI (uint64_t AppEui)
 Sets the Application unique identifier attributed by the device operator. More...
 
Retcode_T LoRaDevice_SetAppKey (uint8_t *appKey)
 Sets the Application key which is used to encrypt the join request messages. More...
 
Retcode_T LoRaDevice_SetAppSKey (uint8_t *appSKey)
 Sets The application session key used for the encryption of frames to the application server. More...
 
Retcode_T LoRaDevice_SetAutomaticReply (bool autoReply)
 Sets Automatic reply on or off. More...
 
Retcode_T LoRaDevice_SetBatteryLevel (uint8_t bat)
 Sets the battery level for Device Status Answer frame command response. More...
 
Retcode_T LoRaDevice_SetChannelDataRateRange (uint8_t chId, uint8_t minRange, uint8_t maxRange)
 Sets a channel's Data Rate range. More...
 
Retcode_T LoRaDevice_SetChannelDutyCycle (uint8_t chId, uint16_t dutyCycle)
 Sets a channel's duty cycle. More...
 
Retcode_T LoRaDevice_SetChannelFreq (uint8_t chId, uint32_t freq_Hz)
 Sets a channel's frequency. More...
 
Retcode_T LoRaDevice_SetChannelStatus (uint8_t chId, bool status)
 Sets a channels Status to ON or OFF. More...
 
Retcode_T LoRaDevice_SetDataRate (uint8_t dataRate)
 Sets the Data Rate used for the transmission. More...
 
Retcode_T LoRaDevice_SetDevAddr (uint32_t devAddr)
 Programs the device address to the LoRa module. More...
 
Retcode_T LoRaDevice_SetDevEUI (uint64_t DevEui)
 Sets the device unique identifier attributed by the device owner. More...
 
Retcode_T LoRaDevice_SetDutyCycle (bool enable)
 Sets the Duty cyle ON/OFF. More...
 
Retcode_T LoRaDevice_SetFCntDown (uint32_t dnctr)
 Sets the value of the downlink frame counter that will be used for the next uplink transmission. More...
 
Retcode_T LoRaDevice_SetFCntUp (uint32_t upctr)
 Sets the value of the uplink frame counter that will be used for the next uplink transmission. More...
 
Retcode_T LoRaDevice_SetFrequencyDeviation (uint32_t freqdev)
 Set the frequency deviation allowed by the end device. More...
 
Retcode_T LoRaDevice_SetIQInversion (bool iqi)
 Sets the IQ inversion to ON/OFF. More...
 
Retcode_T LoRaDevice_SetJoinAcceptDelay (uint32_t JoinAcceptDelay1, uint32_t JoinAcceptDelay2)
 Sets the delay between the Lora Join and JoinAccept reception window's. More...
 
Retcode_T LoRaDevice_SetLinkCheckPeriod (uint16_t linkchk)
 
Retcode_T LoRaDevice_SetNwSKey (uint8_t *nwSKey)
 sets the network session key for encryption of frames to the network server. More...
 
Retcode_T LoRaDevice_SetRadioBandwidth (uint16_t bandWidth_kHz)
 Set the value used for the radio bandwidth. More...
 
Retcode_T LoRaDevice_SetRadioCodingRate (char *codingRate)
 Set the coding rate used by the radio. More...
 
Retcode_T LoRaDevice_SetRadioCRC (bool crc)
 Enables or disables the use of CRC header. More...
 
Retcode_T LoRaDevice_SetRadioFrequency (uint32_t frequency_Hz)
 Sets the Frequency used for transmission by the radio transceiver. More...
 
Retcode_T LoRaDevice_SetRadioPreambleLength (uint16_t preamble)
 Sets the length of the preamble used for the radio transceiver. More...
 
Retcode_T LoRaDevice_SetRadioSpreadingFactor (uint8_t sf)
 Sets the spreading factor to be used for the next radio transmission. More...
 
Retcode_T LoRaDevice_SetRadioTxPower (int8_t pwrout)
 Sets the radio Transmission power used for transmitting packets in FSK modulation mode. More...
 
Retcode_T LoRaDevice_SetRetransmissions (uint8_t retx)
 Sets the number of retransmissions to be used for an uplink confirmed packet. More...
 
Retcode_T LoRaDevice_SetRxDelay (uint16_t rxDelay_ms)
 Sets the delay between the transmission and the first reception window. More...
 
Retcode_T LoRaDevice_SetRxWindow2 (uint32_t dataRate, uint32_t frequency_Hz)
 Sets the data rate and frequency used for the second Receive window. More...
 
Retcode_T LoRaDevice_SetRxWindowDelay (uint32_t rxDelay1, uint32_t rxDelay2)
 Sets the delay between the transmission and reception window's. More...
 
Retcode_T LoRaDevice_SetSyncWord (uint8_t sync)
 Sets the synchronization word for the LoRaWAN™ communication. More...
 
Retcode_T LoRaDevice_SetTxPower (LoRaDeviceTxPower_T pwr)
 Sets the Radio transmit power. More...
 
Retcode_T LoRaDevice_Sleep (uint32_t duration_ms)
 Puts the LoRa module in sleep mode. More...
 
Retcode_T LoRaDevice_SwitchOFF (void)
 Switches OFF the LoRa module. More...
 
Retcode_T LoRaDevice_SwitchON (void)
 Switches ON the LoRa module. More...
 
Retcode_T LoRaDevice_Wakeup (void)
 Wake up the module from sleep. More...
 

Detailed Description

Interface header for the LoRa file.

This file defines the Application programming interface for a LoRa module The current API follows the LoRaWAN Specification V1.0.1

The functions specified herein should be implemented for each new module (if possible).

The user of this API has to check if the functions have been implemented for the intended hardware

The interface header exports the following features:


Data Structure Documentation

struct LoRa_NetworkConfig_S

Data Fields

LoRa_AppCallback_T appCallback
 
uint64_t AppEui
 
uint8_t * AppKey
 
uint8_t * AppSKey
 
Lora_DataReceivedCallBack callBackOnDataRead
 
bool Confirmed
 
uint32_t DevAddr
 
uint64_t DevEui
 
uint32_t frequency
 
uint32_t JoinAcceptDelay1
 
uint32_t JoinAcceptDelay2
 
uint8_t * NwkSKey
 
uint32_t ReceiveDelay1
 
uint32_t ReceiveDelay2
 
uint32_t rx2DataRate
 
uint32_t rx2frequency
 

Field Documentation

LoRa_AppCallback_T appCallback
uint64_t AppEui
uint8_t* AppKey
uint8_t* AppSKey
Lora_DataReceivedCallBack callBackOnDataRead
bool Confirmed
uint32_t DevAddr
uint64_t DevEui
uint32_t frequency
uint32_t JoinAcceptDelay1
uint32_t JoinAcceptDelay2
uint8_t* NwkSKey
uint32_t ReceiveDelay1
uint32_t ReceiveDelay2
uint32_t rx2DataRate
uint32_t rx2frequency
struct LoRaMacEventInfo_S

LoRaMAC event information

Data Fields

LoRa_NetworkEvent_T event
 
uint8_t * RxBuffer
 
uint8_t RxBufferSize
 
uint8_t RxPort
 
bool TxAckReceived
 
uint8_t TxDatarate
 
uint8_t TxNbRetries
 

Field Documentation

uint8_t* RxBuffer
uint8_t RxBufferSize
uint8_t RxPort
bool TxAckReceived
uint8_t TxDatarate
uint8_t TxNbRetries

Typedef Documentation

typedef void(* LoRa_AppCallback_T)(void *unused, LoRa_NetworkEvent_T event)
Parameters
[in]event: The argument containing relevant event information.
typedef void(* LoRa_callbackFunction_T)(void *, LoRaMacEventInfo_T *)

Callback function for the LoRa MAC notification

typedef void(* Lora_DataReceivedCallBack)(uint8_t *rxBuffer, uint8_t rxDataLength)
Parameters
[in]rxBuffer: Buffer in which received data to be stored.
[in]rxDataLength: Length of received data.

enumeration representing supported frequency bands as in LoRaWAN specification V1.0.1

Enumeration representing supported join procedures as in LoRaWAN specification V1.0.1

Enumeration representing possible Tx-power indexes as in LoRaWAN specification V1.0.1.

refer to the utilized frequency band in chapter 7 from LoRaWAN specification

LoRaMAC event information

Enumeration Type Documentation

Enumerator
BCDS_LORA_MODULE_ID_LORA 
BCDS_LORA_MODULE_ID_LORADEVICE 
BCDS_LORA_MODULE_ID_RN2483_PARSER 
BCDS_LORA_MODULE_ID_UARTTRANSCEIVER 
Enumerator
LORA_NETWORK_JOIN_SUCCESS 
LORA_NETWORK_JOIN_TIMEOUT 
LORA_NETWORK_JOIN_FAILURE 
LORA_NETWORK_RECEIVED_PACKET 
LORA_NETWORK_SEND_FAILED 
LORA_NETWORK_RECEIVE_FAILED 
Enumerator
LORA_RETCODE_CALLBACK_NOT_POSSIBLE 
LORA_RETCODE_MAC_BUSY 
LORA_RETCODE_INVALID_PARAM 
LORA_RETCODE_INVALID_DATA_LEN 
LORA_RETCODE_KEYS_NOT_INIT 
LORA_RETCODE_SILENT 
LORA_RETCODE_MAC_PAUSED 
LORA_RETCODE_MAC_NO_CHANNEL 
LORA_RETCODE_NOT_JOINED 
LORA_RETCODE_MAC_ERROR 
LORA_RETCODE_MAC_FRAME_COUNTER_ERROR 
LORA_RETCODE_JOIN_FAILURE 
LORA_RETCODE_INVALID_EXPECTED_INFORMATION 
RETCODE_SEMAPHORE_CREATE_ERROR 
RETCODE_SEMAPHORE_LOCK_ERROR 
RETCODE_SEMAPHORE_UNLOCK_ERROR 
RETCODE_UART_MODULE_INIT_NOT_DONE 
RETCODE_UART_INVALID_REQUEST 
RETCODE_UART_SEND_ERROR 
RETCODE_UART_RECEIVE_ERROR 
RETCODE_LORA_DEVICE_BUSY 

enumeration representing supported frequency bands as in LoRaWAN specification V1.0.1

Enumerator
LORA_BAND_EU_863_870 

LORA_BAND_EU_863_870.

LORA_BAND_US_902_928 

LORA_BAND_US_902_928.

LORA_BAND_CN779_787 

LORA_BAND_CN779_787.

LORA_BAND_EU433 

LORA_BAND_EU433.

Enumeration representing supported join procedures as in LoRaWAN specification V1.0.1

Enumerator
LORA_JOIN_OTAA 
LORA_JOIN_ABP 

Enumeration representing different possible reset types for a LoRa device.

Enumerator
LORA_RESET_HARD 

LORA_RESET_HARD.

LORA_RESET_SOFT 

LORA_RESET_SOFT.

LORA_RESET_FACTORY 

LORA_RESET_FACTORY.

LORA_RESET_MAC_CONFIG 

LORA_RESET_MAC_CONFIG.

Enumeration representing possible Tx-power indexes as in LoRaWAN specification V1.0.1.

refer to the utilized frequency band in chapter 7 from LoRaWAN specification

Enumerator
LORA_POWER_0 

LORA_POWER_0.

LORA_POWER_1 

LORA_POWER_1.

LORA_POWER_2 

LORA_POWER_2.

LORA_POWER_3 

LORA_POWER_3.

LORA_POWER_4 

LORA_POWER_4.

LORA_POWER_5 

LORA_POWER_5.

Function Documentation

BCDS_DEPRECATED ( Retcode_T   LoRa_InitializeLoRa_NetworkConfig_T *config)
Deprecated:
since version vxx.xx.xx
Parameters
[in]configa lora Network configuration

RETCODE_OK: success, RECCODE_FAILURE: on error

BCDS_DEPRECATED ( Retcode_T   LoRa_Deinitializevoid)

starts a LoRa join process

Deprecated:
since version vxx.xx.xx

RETCODE_OK: success, RECCODE_FAILURE: on error

Deprecated:
since version vxx.xx.xx

RETCODE_OK: join procedure successfully started RECODE_FAILURE: join error

BCDS_DEPRECATED ( Retcode_T   LoRa_TransmitDatauint8_t loraPort, void *dataBuffer, uint16_t dataBufferSize)
Deprecated:
since version vxx.xx.xx
Parameters
[in]loraPortMAC payload port (must be > 0)
[in]dataBufferMAC data buffer to be sent
[in]dataBufferSizeMAC data buffer size

uint8_t 0: OK 1: Busy 2: No network joined 3: Length or port error 4: Unknown MAC command 5: Unable to find a free channel

Retcode_T LoRaDevice_Deinit ( void  )
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_GetADR ( bool *  adr)
Parameters
outADR
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_GetAppEUI ( uint64_t *  appEUI)
Parameters
[out]appEUIapplication Extended Unique Identifier used by the MAC layer of the LoRa module.
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_GetAutomaticReply ( bool *  autoReply)
Parameters
outautoReply status true if ON false if OFF
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_GetBand ( LoRaDeviceBand_T band)
Parameters
[out]bandenumeration value representing the frequency band among the supported bands by specification V1.0.1.
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetChannelDataRateRange ( uint8_t  chId,
uint8_t *  minRange,
uint8_t *  maxRange 
)
Parameters
chIdchannel id
minRangepointer to minimum data rate value to be returned
maxRangepointer to maximum data rate value to be returned
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetChannelDutyCycle ( uint8_t  chId,
uint16_t *  dutyCycle 
)
Parameters
chIdchannel id
[out]dutyCycleduty cycle output value
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetChannelFreq ( uint8_t  chId,
uint32_t *  freq_Hz 
)
Parameters
chIdchannel id
[out]freq_Hzfrequency
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetChannelStatus ( uint8_t  chId,
bool *  status 
)
Parameters
chIdchannel id
[out]statuschannel status ON or OFF (respectively true or false)
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetDataRate ( uint8_t *  dataRate)
Parameters
[out]dataRate
Returns
RETCODE_OK in case of success error code otherwise.
uint32_t LoRaDevice_GetDemodulationMargin ( void *  )
Parameters
return RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetDevAddr ( uint32_t *  devAddr)
Parameters
[out]devAddr
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_GetDevEUI ( uint64_t *  devEUI)
Parameters
[out]devEUIused by the MAC layer of the LoRa module
Returns
RETCODE_OK in case of success error code otherwise.
uint32_t LoRaDevice_GetDutycyclePrescaler ( void *  )
Parameters
return RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetFCntDown ( uint32_t *  dnctr)
Parameters
[out]downlinkframe counter value
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetFCntUp ( uint32_t *  upctr)
Parameters
[out]Uplinkframe counter value
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetFrequencyDeviation ( uint32_t *  freqdev)
Parameters
freqdevcurrent frequency deviation value
Returns
RETCODE_OK in case of success error code otherwise
uint8_t LoRaDevice_GetGatewayNumber ( void *  )
Parameters
return RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetHwEUI ( uint64_t *  hwEUI)
Parameters
[out]ExtendedUnique Identifier of the module
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetIQInversion ( bool *  iqi)
Parameters
iqiset to true if IQ inversion is to be enabled, to false otherwise.
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_GetRadioBandwidth ( uint16_t *  bandWidth_kHz)
Parameters
[out]return RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetRadioCodingRate ( char *  codingRate)
Parameters
[out]codingrate currently in use.
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetRadioCRC ( bool *  crc)
Parameters
crcis true if CRC is currently enabled, is false otherwise
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetRadioFrequency ( uint32_t *  frequency_Hz)
Parameters
[out]frequency_Hzcurrently used frequency
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetRadioPreambleLength ( uint16_t *  preamble)
Parameters
[out]preambleCurrent preamble length value
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetRadioSNR ( int8_t *  snr)
Parameters
[out]snrsigned value in dBm of the signal to noise Ratio from -127 to +128
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetRadioSpreadingFactor ( uint8_t *  sf)
Parameters
[out]sfspreading factor value
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetRadioTxPower ( int8_t *  pwrout)
Parameters
[out]pwrouttransceiver output power
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetRetransmissions ( uint8_t *  retx)
Parameters
[out]retxnumber of retransmissions before returning error
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetRxDelay ( uint32_t *  rxDelay_ms)
Parameters
[out]receivewindow 1 delay value
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetRxWindow2 ( uint8_t *  dataRate,
uint32_t *  frequency_Hz,
uint16_t  band 
)
Parameters
[out]dataRatedata rate value
[out]frequency_Hzfrequency value in Hz
bandfrequency band value.
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetStatus ( uint32_t *  status)
Parameters
[out]status
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetSyncWord ( uint8_t *  sync)
Parameters
[out]syncpointer to sync word
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_GetTxPower ( LoRaDeviceTxPower_T pwr)
Parameters
[out]TXpower used for sending radio signals
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_Init ( LoRa_callbackFunction_T  EventCallback,
uint32_t  frequency 
)
Parameters
EventCallbackfunction that should process the events generated by the LoRa module driver
frequencyfrequency band that will be used for the radio communication
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_Join ( LoRaDeviceJoin_T  joinType)
Parameters
joinTypeOTAA (ON The Air Activation) or ABP(Activation By Personalization).
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_LoRaWANPause ( uint32_t *  pauseWAN)
Parameters
outpauseWAN: time interval in milliseconds that the transceiver can be used without affecting the LoRaWAN functionality.
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_LoRaWANResume ( void  )
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_RadioListen ( uint16_t  rxWindowSize_ms)
Parameters
rxWindowSize_msTime in ms during which the module will have its receiver listening if 0 the module will listen indefinitely.
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_RadioTransmit ( uint8_t *  dataBuffer,
uint16_t  dataBufferSize 
)
Parameters
dataBufferPointer to the frame to be sent
dataBufferSizelength of the frame to be sent
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_Reset ( enum LoRaDeviceReset_E  resetType)
Parameters
resetTypeenumeration value of which reset to perform (Factory, Hard, Soft ...)
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_ResetMac ( uint16_t  frequency)
Parameters
frequencyFrequency band to operate within.
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_SaveConfig ( void  )
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SendConfirmed ( uint8_t  LoRaPort,
uint8_t *  dataBuffer,
uint16_t  dataBufferSize 
)
Parameters
LoRaPortThe LoraWan Port that will be used for sending
dataBufferPointer to the data frame that will be sent
dataBufferSizeLength of the frame to send
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SendUnconfirmed ( uint8_t  LoRaPort,
uint8_t *  dataBuffer,
uint16_t  dataBufferSize 
)
Parameters
LoRaPortThe LoraWan Port that will be used for sending
dataBufferPointer to the data frame that will be sent
dataBufferSizeLength of the frame to send
Returns
RETCODE_OK in case of success error code otherwise. This function returns if an ACK has been received from the Network Server or if an error or a timeout occurred
Retcode_T LoRaDevice_SetADR ( bool  adr)
Parameters
adrset to true if ADR is to be enabled, set to false otherwise.
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_SetAppEUI ( uint64_t  AppEui)
Parameters
Valueof the App EUI
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_SetAppKey ( uint8_t *  appKey)
Parameters
pointerto 16-byte application key
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_SetAppSKey ( uint8_t *  appSKey)
Parameters
pointerto 128bit application session key
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_SetAutomaticReply ( bool  autoReply)

By enabling the automatic reply,the module will transmit a packet without a payload immediately after a confirmed downlink is received, or when the frame Pending bit has been set by the server. If set to OFF, no automatic reply will be transmitted.

Parameters
autoReplyset to true if autmatic reply is to be enabled, set to false otherwise
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetBatteryLevel ( uint8_t  bat)
Parameters
batbattery level from 0 to 255 representing a scale from 0 to 100%
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetChannelDataRateRange ( uint8_t  chId,
uint8_t  minRange,
uint8_t  maxRange 
)
Parameters
chIdchannel id
minRangeminimum data rate value
maxRangemaximum data rate value
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetChannelDutyCycle ( uint8_t  chId,
uint16_t  dutyCycle 
)
Parameters
chIdchannel id
dutycycle value
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetChannelFreq ( uint8_t  chId,
uint32_t  freq_Hz 
)
Parameters
chIdChannel id
freq_Hzfrequency value in Hz
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetChannelStatus ( uint8_t  chId,
bool  status 
)
Parameters
chIdchannel id
statusset to true if channel is to be enabled, set to false otherwise
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetDataRate ( uint8_t  dataRate)
Parameters
dataRateto be used according to LoRaWAN spec
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_SetDevAddr ( uint32_t  devAddr)
Parameters
deviceaddress to be used for the LoRaWAN communication
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_SetDevEUI ( uint64_t  DevEui)
Parameters
Valueof the device EUI
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_SetDutyCycle ( bool  enable)
Parameters
adrset to true if Dcycle is to be enabled, set to false otherwise.
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_SetFCntDown ( uint32_t  dnctr)
Parameters
dnctrvalue of the Downlink frame counter
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetFCntUp ( uint32_t  upctr)
Parameters
upctrvalue of the Uplink frame counter
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetFrequencyDeviation ( uint32_t  freqdev)
Parameters
freqdevdecimal number representing the frequency deviation from 0 to 200000
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetIQInversion ( bool  iqi)
Parameters
iqiset to true if IQ inversion is to be enabled, to false otherwise.
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_SetJoinAcceptDelay ( uint32_t  JoinAcceptDelay1,
uint32_t  JoinAcceptDelay2 
)
Parameters
JoinAcceptDelay1delay value in µs
JoinAcceptDelay2delay value in µs
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetLinkCheckPeriod ( uint16_t  linkchk)

Sets the time interval for the link check process to be triggered.

Parameters
linkchktime period in ms
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetNwSKey ( uint8_t *  nwSKey)
Parameters
pointerto 128bit network session key
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_SetRadioBandwidth ( uint16_t  bandWidth_kHz)
Parameters
bandWidthRadio transmission bandwidth value in kHz e.g 125, 250, 500.
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetRadioCodingRate ( char *  codingRate)
Parameters
codingRatepointer to the string representing the coding rate to be set
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetRadioCRC ( bool  crc)
Parameters
crcSet to true if CRC is to be enabled, set to false otherwise
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetRadioFrequency ( uint32_t  frequency_Hz)
Parameters
frequency_Hzfrequency to be used
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetRadioPreambleLength ( uint16_t  preamble)
Parameters
preamblePreamble length from 0 to 65535.
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetRadioSpreadingFactor ( uint8_t  sf)
Parameters
sfspreading factor value e.g. for sf9 the input parameter is 9
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetRadioTxPower ( int8_t  pwrout)
Parameters
pwroutsigned decimal number representing the transceiver output power from -3 to 15.
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetRetransmissions ( uint8_t  retx)
Parameters
retxnumber of retransmissions before returning error
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetRxDelay ( uint16_t  rxDelay_ms)
Parameters
rxDelaydelay value in ms
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetRxWindow2 ( uint32_t  dataRate,
uint32_t  frequency_Hz 
)
Parameters
dataRatedata rate value according to loraWAN spec
frequency_Hzfrequency value in Hz
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetRxWindowDelay ( uint32_t  rxDelay1,
uint32_t  rxDelay2 
)
Parameters
rxDelay1delay value in µs
rxDelay2delay value in µs
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetSyncWord ( uint8_t  sync)
Parameters
syncone byte long hexadecimal number representing the synchronization word for the LoRaWAN communication
Returns
RETCODE_OK in case of success error code otherwise
Retcode_T LoRaDevice_SetTxPower ( LoRaDeviceTxPower_T  pwr)
Parameters
TXpower to be used for sending radio signals
Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_Sleep ( uint32_t  duration_ms)

the command puts the module in sleep mode for the specified time duration and will return after the module has been waken up or if there has been an error

Parameters
duration_msTime duration to sleep in ms
Returns
RETCODE_OK if the module is waken up error code othrewise
Retcode_T LoRaDevice_SwitchOFF ( void  )

This function performs the low level operations in order to power OFF * the module and release the physical link (SPI, UART, I2C,...) to the main CPU.

Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_SwitchON ( void  )

This function performs the low level operations in order to power ON the module and establish the physical link (SPI, UART, I2C,...) between the main CPU and the LoRa device.

Returns
RETCODE_OK in case of success error code otherwise.
Retcode_T LoRaDevice_Wakeup ( void  )

if the module is in sleep mode a call to this function will wake it up.

Note
In order to wake up the module this function has to be called from within the context of a task other than the one that called LoRaDevice_Sleep().
Returns
RETCODE_OK in case of success error code otherwise.

All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:53 by doxygen 1.8.8