|
BresserWeatherSensorLW
Bresser 868 MHz Weather Sensor Radio Receiver based on ESP32/RP2040 and SX1262/SX1276/LR1121 - sends data to a LoRaWAN Network
|
LoRaWAN node application layer - BLE sensors. More...
#include <PayloadBLE.h>

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. | |
LoRaWAN node application layer - BLE sensors.
Encodes data from Bluetooth Low Energy sensors as LoRaWAN payload
| 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!

| void PayloadBLE::encodeBLE | ( | uint8_t * | appPayloadCfg, |
| uint8_t * | appStatus, | ||
| LoraEncoder & | encoder ) |
Encode BLE temperature/humidity sensor values for LoRaWAN transmission.
| appPayloadCfg | LoRaWAN payload configuration bitmaps |
| appStatus | Application layer status (i.e. sensor battery status bits) |
| encoder | LoRaWAN payload encoder object |
| uint8_t PayloadBLE::getBleAddr | ( | uint8_t * | bytes | ) |
Get BLE addresses from Preferences
| bytes | buffer for addresses |
| std::vector< std::string > PayloadBLE::getBleAddr | ( | void | ) |
Get BLE addresses from Preferences
| void PayloadBLE::setBleAddr | ( | uint8_t * | bytes, |
| uint8_t | size ) |
Set BLE addresses in Preferences and bleSensors object
| bytes | MAC addresses (6 bytes per address) |
| size | size in bytes |