Advanced LoRaWAN functions. These functions you will not normally need, it will normally be enough to use the simple functions.
More...
Advanced LoRaWAN functions. These functions you will not normally need, it will normally be enough to use the simple functions.
◆ lora_driver_flushBuffers()
void lora_driver_flushBuffers |
( |
void |
| ) |
|
Flush the internal buffers in the driver.
◆ lora_driver_getAdaptiveDataRate()
◆ lora_driver_getAutomaticReply()
Get automatic reply setting for down link messages.
see also lora_driver_setAutomaticReply.
- Parameters
-
[out] | ar | current state of automatic response. |
- Returns
- lora_driver_returnCode
◆ lora_driver_getDataRate()
◆ lora_driver_getLinkCheckResult()
Get the results of the latest received Link Check.
- See also
- lora_driver_setLinkCheckInterval
This function will return the no of gwy's that was seeing the device at latest upload command, and also the demodulation margin (Margin) in the range of 0..254 indicating the link margin in dB of the last successfully received LinkCheckReq command. A value of '0' means that the frame was received at the demodulation floor (0 dB or no margin) while a value of '20', for example, means that the frame reached the gateway 20 dB above the demodulation floor.
- Parameters
-
[out] | no_gwys | that successfully received over last upload message. |
[out] | margin | the demodulation margin [dB] |
- Returns
- lora_driver_returnCode
◆ lora_driver_pauseMac()
Pause the MAC layer in the RN2483 module.
This must be done before any commands are send to the radio layer.
- Returns
- lora_driver_returnCode
◆ lora_driver_resetRn2483()
void lora_driver_resetRn2483 |
( |
uint8_t |
state | ) |
|
Controls the reset pin on the RN2483 Module.
- Parameters
-
[in] | state | 1: reset is active, 0: reset is released. |
◆ lora_driver_resumeMac()
Resume the MAC layer in the RN2483 module.
This must be done after a pause is finished.
- Returns
- lora_driver_returnCode
◆ lora_driver_setAdaptiveDataRate()
Set adaptive data rate (ADR).
If ADR is ON the server will optimize the data rate and transmission power based on the last received up-link message.
- Parameters
-
[in] | state | the wanted ADR state. |
- Returns
- lora_driver_returnCode
◆ lora_driver_setApplicationIdentifier()
Set the Application EUI.
- Note
- This is normally done by using lora_driver_setOtaaIdentity.
-
Only needed when OTAA is used.
- Parameters
-
[in] | appEUI | 16 byte hexadecimal string. |
- Returns
- lora_driver_returnCode
◆ lora_driver_setApplicationKey()
Set the Application Key.
- Note
- This is normally done by using lora_driver_setOtaaIdentity.
-
Only needed when OTAA is used.
- Parameters
-
[in] | appKey | 32 byte hexadecimal string. |
- Returns
- lora_driver_returnCode
◆ lora_driver_setApplicationSessionKey()
Set the Application Session Key.
- Note
- This is normally done by using lora_driver_setAbpIdentity.
-
Only needed when ABP is used.
- Parameters
-
[in] | appSKey | 32 byte hexadecimal string. |
- Returns
- lora_driver_returnCode
◆ lora_driver_setAutomaticReply()
Set automatic reply on down link messages.
By enabling the automatic reply, the module will transmit a packet without a payload immediately after a confirmed downlink message 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
-
[in] | ar | new state of automatic response. |
- Returns
- lora_driver_returnCode
◆ lora_driver_setDataRate()
Set data rate.
The data rate determines the spreading factor and bit rate on the LoRaWAN. For more information see LoRaWA Regional Parameters v1.1rB
- Parameters
-
[in] | dr | [0..7] data rate to be used for next transmissions. |
- Returns
- lora_driver_returnCode
◆ lora_driver_setDeviceAddress()
Set the Device address.
- Note
- This is normally done by using lora_driver_setAbpIdentity.
-
Only needed when ABP is used.
- Parameters
-
[in] | devAddr | 8 byte hexadecimal string. |
- Returns
- lora_driver_returnCode
◆ lora_driver_setDeviceIdentifier()
Set the device EUI.
- Note
- This is normally done by using lora_driver_setOtaaIdentity.
-
Only needed when OTAA is used.
- Parameters
-
[in] | devEUI | 16 byte hexadecimal string. |
- Returns
- lora_driver_returnCode
◆ lora_driver_setLinkCheckInterval()
Set the delay each link check is performed.
This command sets the time interval for the link check process to be triggered periodically. A value of '0' will disable the link check process. When the time interval expires, the next upload message that will be sent to the server will include also a link check MAC command.
- Parameters
-
[in] | sec | time between link check is performed [s]. 0: turn off link check. |
- Returns
- lora_driver_returnCode
◆ lora_driver_setNetworkSessionKey()
Set the Network Session Key.
- Note
- This is normally done by using lora_driver_setAbpIdentity.
-
Only needed when ABP is used.
- Parameters
-
[in] | nwkSKey | 32 byte hexadecimal string. |
- Returns
- lora_driver_returnCode
◆ lora_driver_setReceiveDelay()
Set the delay between a transmission and the first receiver window.
This command will set the delay between the transmission and the first Reception window to
in milliseconds. The delay between the transmission and the second Reception window is calculated in software as the delay between the transmission and the first Reception window + 1000 ms.
- Parameters
-
[in] | rxDelay1 | the delay in ms - default is 1000. |
- Returns
- lora_driver_returnCode
◆ lora_driver_setSpreadingFactor()
Set the spreading factor for the communication.
The spreading factor (SF) ....
- Todo:
- spreading factor (SF) needs more explanation!
- Parameters
-
[in] | sf | spreading factor to be used. |
- Returns
- lora_driver_returnCode
◆ lora_driver_sleep()
Set the RN2384 module in sleep mode for a given periode.
This command puts the system to Sleep for the specified number of milliseconds. The module can be forced to exit from Sleep by sending a break condition followed by a 0x55 character at the new baud rate. Note that the break condition needs to be long enough not to be interpreted as a valid character at the current baud rate.
- Todo:
- Implement lora_driver_sleep function.
- Note
- If the module is in sleep mode it will save battery power.
- Parameters
-
[in] | ms | The number of milliseconds to sleep [100-4294967296]. |