![]() |
Xbee Arduino
Arduino Driver for Xbee
|
Header file for the XBee LR (LoRaWAN) subclass. More...
#include "xbee.h"
Go to the source code of this file.
Classes | |
struct | XBeeLRPacket_s |
struct | XBeeLR |
Macros | |
#define | CONNECTION_TIMEOUT_MS 6000 |
#define | SEND_DATA_TIMEOUT_MS 10000 |
Typedefs | |
typedef struct XBeeLRPacket_s | XBeeLRPacket_t |
Functions | |
XBeeLR * | XBeeLRCreate (const XBeeCTable *cTable, const XBeeHTable *hTable) |
Constructor for creating an XBeeLR instance. More... | |
bool | XBeeLRGetDevEUI (XBee *self, uint8_t *responseBuffer, uint8_t buffer_size) |
Sends the AT_DE command to read the LoRaWAN DevEUI from the XBee LR module. More... | |
bool | XBeeLRSetAppEUI (XBee *self, const char *value) |
Sends the AT_AE command to set the LoRaWAN AppEUI on the XBee LR module. More... | |
bool | XBeeLRSetAppKey (XBee *self, const char *value) |
Sends the AT_AK command to set the LoRaWAN AppKey on the XBee LR module. More... | |
bool | XBeeLRSetNwkKey (XBee *self, const char *value) |
Sends the AT_NK command to set the LoRaWAN NwkKey on the XBee LR module. More... | |
bool | XBeeLRSetClass (XBee *self, const char value) |
Sends the AT_LC command to set the LoRaWAN Class on the XBee LR module. More... | |
bool | XBeeLRSetActivationMode (XBee *self, const uint8_t value) |
Sends the AT_AM command to set the LoRaWAN Activation Mode on the XBee LR module. More... | |
bool | XBeeLRSetADR (XBee *self, const uint8_t value) |
Sends the AT_AD command to set the LoRaWAN ADR on the XBee LR module. More... | |
bool | XBeeLRSetDataRate (XBee *self, const uint8_t value) |
Sends the AT_DR command to set the LoRaWAN DataRate on the XBee LR module. More... | |
bool | XBeeLRSetRegion (XBee *self, const uint8_t value) |
Sends the AT_LR command to set the LoRaWAN Region on the XBee LR module. More... | |
bool | XBeeLRSetDutyCycle (XBee *self, const uint8_t value) |
Sends the AT_DC command to set the LoRaWAN Duty Cycle on the XBee LR module. More... | |
bool | XBeeLRGetSpecVersion (XBee *self, char *responseBuffer, uint8_t buffer_size) |
bool | XBeeLRSetJoinRX1Delay (XBee *self, const uint32_t value) |
Sends the AT_J1 command to set the LoRaWAN Join RX1 Delay on the XBee LR module. More... | |
bool | XBeeLRSetJoinRX2Delay (XBee *self, const uint32_t value) |
Sends the AT_J2 command to set the LoRaWAN Join RX2 Delay on the XBee LR module. More... | |
bool | XBeeLRSetRX1Delay (XBee *self, const uint32_t value) |
Sends the AT_D1 command to set the LoRaWAN RX1 Delay on the XBee LR module. More... | |
bool | XBeeLRSetRX2Delay (XBee *self, const uint32_t value) |
Sends the AT_D2 command to set the LoRaWAN RX2 Delay on the XBee LR module. More... | |
bool | XBeeLRSetRX2DataRate (XBee *self, const uint8_t value) |
Sends the AT_XD command to set the LoRaWAN RX2 Data Rate on the XBee LR module. More... | |
bool | XBeeLRSetRX2Frequency (XBee *self, const uint32_t value) |
Sends the AT_XF command to set the LoRaWAN RX2 Frequency on the XBee LR module. More... | |
bool | XBeeLRSetTransmitPower (XBee *self, const uint8_t value) |
Sends the AT_PO command to set the LoRaWAN Transmit Power on the XBee LR module. More... | |
bool | XBeeLRSetChannelsMask (XBee *self, const char *value) |
Sends the AT_CM command to set the LoRaWAN Channels Mask on the XBee LR module. More... | |
Header file for the XBee LR (LoRaWAN) subclass.
This file defines the interface for the XBee LR subclass, which extends the functionality of the base XBee class to support LoRaWAN communication features specific to XBee LR modules. It includes prototypes for initialization, connection handling, and other LR-specific operations.
@license MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define CONNECTION_TIMEOUT_MS 6000 |
#define SEND_DATA_TIMEOUT_MS 10000 |
typedef struct XBeeLRPacket_s XBeeLRPacket_t |
XBeeLR * XBeeLRCreate | ( | const XBeeCTable * | cTable, |
const XBeeHTable * | hTable | ||
) |
Constructor for creating an XBeeLR instance.
This function allocates memory for a new XBeeLR instance and initializes it with the provided callback table (cTable
) and handler table (hTable
). The function sets up the virtual table (vtable
) for XBee LR-specific operations and assigns the callback and handler tables to the instance. The newly created instance is then returned to the caller.
[in] | cTable | Pointer to the callback table containing function pointers for handling XBee events. |
[in] | hTable | Pointer to the handler table containing platform-specific function implementations. |
bool XBeeLRGetDevEUI | ( | XBee * | self, |
uint8_t * | responseBuffer, | ||
uint8_t | buffer_size | ||
) |
Sends the AT_DE command to read the LoRaWAN DevEUI from the XBee LR module.
This function retrieves the LoRaWAN DevEUI (Device Extended Unique Identifier) from the XBee LR module by sending the AT command AT_DE
. The function is blocking, meaning it waits for a response from the module or until a timeout occurs. If the command fails to send or the module does not respond, a debug message is printed. The DevEUI is stored in the provided response buffer.
[in] | self | Pointer to the XBee instance. |
[out] | responseBuffer | Buffer to store the retrieved DevEUI. |
[in] | buffer_size | Size of the response buffer (should be at least 17 bytes). |
bool XBeeLRGetSpecVersion | ( | XBee * | self, |
char * | responseBuffer, | ||
uint8_t | buffer_size | ||
) |
bool XBeeLRSetActivationMode | ( | XBee * | self, |
const uint8_t | value | ||
) |
bool XBeeLRSetADR | ( | XBee * | self, |
const uint8_t | value | ||
) |
bool XBeeLRSetAppEUI | ( | XBee * | self, |
const char * | value | ||
) |
Sends the AT_AE command to set the LoRaWAN AppEUI on the XBee LR module.
This function configures the LoRaWAN AppEUI (Application Identifier) on the XBee LR module by sending the AT command AT_AE
with the specified AppEUI value. The function is blocking, meaning it waits for a response from the module or until a timeout occurs. If the command fails to send or the module does not respond, a debug message is printed.
[in] | self | Pointer to the XBee instance. |
[in] | value | The AppEUI to be set, provided as a string. |
bool XBeeLRSetAppKey | ( | XBee * | self, |
const char * | value | ||
) |
Sends the AT_AK command to set the LoRaWAN AppKey on the XBee LR module.
This function configures the LoRaWAN AppKey (Application Key) on the XBee LR module by sending the AT command AT_AK
with the specified AppKey value. The function is blocking, meaning it waits for a response from the module or until a timeout occurs. If the command fails to send or the module does not respond, a debug message is printed.
[in] | self | Pointer to the XBee instance. |
[in] | value | The AppKey to be set, provided as a string. |
bool XBeeLRSetChannelsMask | ( | XBee * | self, |
const char * | value | ||
) |
Sends the AT_CM command to set the LoRaWAN Channels Mask on the XBee LR module.
This function configures the Channels Mask for the LoRaWAN network on the XBee LR module by sending the AT_CM command. The Channels Mask specifies the sub-bands that are enabled for communication. The function checks the command response to verify if the mask was successfully set.
[in] | self | Pointer to the XBee instance. |
[in] | value | Pointer to a null-terminated string representing the Channels Mask in hexadecimal format. |
bool XBeeLRSetClass | ( | XBee * | self, |
const char | value | ||
) |
Sends the AT_LC command to set the LoRaWAN Class on the XBee LR module.
This function configures the LoRaWAN Class on the XBee LR module by sending the AT command AT_LC
with the specified Class value. The function is blocking, meaning it waits for a response from the module or until a timeout occurs. If the command fails to send or the module does not respond, a debug message is printed.
[in] | self | Pointer to the XBee instance. |
[in] | value | The Class to be set, provided as a char. 'A','B','C' |
bool XBeeLRSetDataRate | ( | XBee * | self, |
const uint8_t | value | ||
) |
bool XBeeLRSetDutyCycle | ( | XBee * | self, |
const uint8_t | value | ||
) |
bool XBeeLRSetJoinRX1Delay | ( | XBee * | self, |
const uint32_t | value | ||
) |
bool XBeeLRSetJoinRX2Delay | ( | XBee * | self, |
const uint32_t | value | ||
) |
bool XBeeLRSetNwkKey | ( | XBee * | self, |
const char * | value | ||
) |
Sends the AT_NK command to set the LoRaWAN NwkKey on the XBee LR module.
This function configures the LoRaWAN NwkKey (Network Key) on the XBee LR module by sending the AT command AT_NK
with the specified NwkKey value. The function is blocking, meaning it waits for a response from the module or until a timeout occurs. If the command fails to send or the module does not respond, a debug message is printed.
[in] | self | Pointer to the XBee instance. |
[in] | value | The NwkKey to be set, provided as a string. |
bool XBeeLRSetRegion | ( | XBee * | self, |
const uint8_t | value | ||
) |
bool XBeeLRSetRX1Delay | ( | XBee * | self, |
const uint32_t | value | ||
) |
bool XBeeLRSetRX2DataRate | ( | XBee * | self, |
const uint8_t | value | ||
) |
bool XBeeLRSetRX2Delay | ( | XBee * | self, |
const uint32_t | value | ||
) |
bool XBeeLRSetRX2Frequency | ( | XBee * | self, |
const uint32_t | value | ||
) |
bool XBeeLRSetTransmitPower | ( | XBee * | self, |
const uint8_t | value | ||
) |