Add "mac_type" parameter to BLE connection commands. (#1146)

This allows for connecting to devices that do not use the MAC address type 0.
This also adds the logging of the "mac_type" so it is visible to users trying to connect to broadcasting devices.

Additionally this will allow for future connectable devices using a MAC address type other than 0 to be automatically connected to
when support is added for them, similar to LYWSD03MMC etc..
This commit is contained in:
h2zero authored and GitHub committed 2022-01-25 06:19:50 -06:00
1 parent e838d3cee0
commit f8b4b3ca21
3 files changed
+23 -8

No files matched your search

+2
View File
@@ -153,6 +153,7 @@ enum ble_val_type {
struct BLEAction {
std::string value;
char addr[18];
int addr_type;
NimBLEUUID service;
NimBLEUUID characteristic;
bool write;
@@ -164,6 +165,7 @@ struct BLEAction {
struct BLEdevice {
char macAdr[18];
int macType;
bool isDisc;
bool isWhtL;
bool isBlkL;