BresserWeatherSensorLW
Bresser 868 MHz Weather Sensor Radio Receiver based on ESP32/RP2040 and SX1262/SX1276/LR1121 - sends data to a LoRaWAN Network
Loading...
Searching...
No Matches
PayloadBLE Class Reference

LoRaWAN node application layer - BLE sensors. More...

#include <PayloadBLE.h>

Inheritance diagram for PayloadBLE:

Public Member Functions

 PayloadBLE ()
 Constructor.
void begin (void)
 BLE startup code.
void setBleAddr (uint8_t *bytes, uint8_t size)
uint8_t getBleAddr (uint8_t *bytes)
std::vector< std::string > getBleAddr (void)
void bleAddrInit (void)
 Initialize list of known BLE addresses from defaults or Preferences.
void encodeBLE (uint8_t *appPayloadCfg, uint8_t *appStatus, LoraEncoder &encoder)
 Encode BLE temperature/humidity sensor values for LoRaWAN transmission.

Public Attributes

std::vector< std::string > knownBLEAddresses
 Actual BLE MAC addresses; either from Preferences or from defaults.

Detailed Description

LoRaWAN node application layer - BLE sensors.

Encodes data from Bluetooth Low Energy sensors as LoRaWAN payload

Member Function Documentation

◆ bleAddrInit()

void PayloadBLE::bleAddrInit ( void )

Initialize list of known BLE addresses from defaults or Preferences.

If available, addresses from Preferences are used, otherwise defaults from BresserWeatherSensorLWCfg.h.

BleSensors() requires Preferences, which uses the Flash FS, which is not available before the sketches' begin() is called - thus the following cannot be handled by the constructor!

Here is the call graph for this function:

◆ encodeBLE()

void PayloadBLE::encodeBLE ( uint8_t * appPayloadCfg,
uint8_t * appStatus,
LoraEncoder & encoder )

Encode BLE temperature/humidity sensor values for LoRaWAN transmission.

Parameters
appPayloadCfgLoRaWAN payload configuration bitmaps
appStatusApplication layer status (i.e. sensor battery status bits)
encoderLoRaWAN payload encoder object

◆ getBleAddr() [1/2]

uint8_t PayloadBLE::getBleAddr ( uint8_t * bytes)

Get BLE addresses from Preferences

Parameters
bytesbuffer for addresses
Returns
number of bytes copied into buffer

◆ getBleAddr() [2/2]

std::vector< std::string > PayloadBLE::getBleAddr ( void )

Get BLE addresses from Preferences

Returns
BLE addresses

◆ setBleAddr()

void PayloadBLE::setBleAddr ( uint8_t * bytes,
uint8_t size )

Set BLE addresses in Preferences and bleSensors object

Parameters
bytesMAC addresses (6 bytes per address)
sizesize in bytes

The documentation for this class was generated from the following files: