rename + soime explaination

This commit is contained in:
Simon Hailes 2021-01-27 10:16:30 +00:00
parent a2f99f24aa
commit 60094eb0ee
4 changed files with 30 additions and 27 deletions

View File

@ -45,34 +45,26 @@
connect/read/awaitnotify from a MAC/Service/Characteristic/NotifyCharacteristic connect/read/awaitnotify from a MAC/Service/Characteristic/NotifyCharacteristic
Cmnds: Cmnds:
BLEOp0 - requests status of operations BLEPeriod
BLEOp1 MAC - create an operation in preparation, and populate it's MAC address BLEAdv
BLEOp2 Service - add a serviceUUID to the operation in preparation BLEOp
BLEOp3 Characteristic - add a CharacteristicUUID to the operation in preparation for read/write BLEMode
BLEOp4 writedata - optional:add data to write to the operation in preparation - hex string BLEDetails
BLEOp5 - optional:signify that a read should be done BLEScan
BLEOp6 NotifyCharacteristic - optional:add a NotifyCharacteristicUUID to the operation in preparation to wait for a notify BLEAlias
BLEOp9 - publish the 'operation in preparation' to MQTT. BLEName
BLEOp10 - add the 'operation in preparation' to the queue of operations to perform. BLEDebug
BLEDevices
BLEMaxAge
BLEAddrFilter
Other drivers can add callbacks to receive advertisements Other drivers can add callbacks to receive advertisements
Other drivers can add 'operations' to be performed and receive callbacks from the operation's success or failure Other drivers can add 'operations' to be performed and receive callbacks from the operation's success or failure
Example: Example BLEOp:
Write and request next notify: Write and request next notify:
backlog BLEOp1 001A22092EE0; BLEOp2 3e135142-654f-9090-134a-a6ff5bb77046; BLEOp3 3fa4585a-ce4a-3bad-db4b-b8df8179ea09; BLEOp4 03; BLEOp6 d0e8434d-cd29-0996-af41-6c90f4e0eb2a; BLEOp M:4C65A8DAF43A s:00001530-1212-efde-1523-785feabcd123 n:00001531-1212-efde-1523-785feabcd123 c:00001531-1212-efde-1523-785feabcd123 w:00 go
BLEOp10 -> 12:45:12 MQT: tele/tasmota_esp32/BLE = {"BLEOperation":{"opid":"11","stat":"7","state":"DONENOTIFIED","MAC":"4C65A8DAF43A","svc":"00001530-1212-efde-1523-785feabcd123","char":"00001531-1212-efde-1523-785feabcd123","notifychar":"00001531-1212-efde-1523-785feabcd123","write":"00","notify":"100003"}}
19:25:08 RSL: tele/tasmota_E89E98/SENSOR = {"BLEOperation":{"opid":"3,"state":"1,"MAC":"001A22092EE0","svc":"3e135142-654f-9090-134a-a6ff5bb77046","char":"3fa4585a-ce4a-3bad-db4b-b8df8179ea09","wrote":"03}}
19:25:08 queued 0 sent {"BLEOperation":{"opid":"3,"state":"1,"MAC":"001A22092EE0","svc":"3e135142-654f-9090-134a-a6ff5bb77046","char":"3fa4585a-ce4a-3bad-db4b-b8df8179ea09","wrote":"03}}
19:25:08 RSL: stat/tasmota_E89E98/RESULT = {"BLEOp":"Done"}
.....
19:25:11 RSL: tele/tasmota_E89E98/SENSOR = {"BLEOperation":{"opid":"3,"state":"11,"MAC":"001A22092EE0","svc":"3e135142-654f-9090-134a-a6ff5bb77046","char":"3fa4585a-ce4a-3bad-db4b-b8df8179ea09","wrote":"03","notify":"020109000428}}
state: 1 -> starting,
7 -> read complete
8 -> write complete
11 -> notify complete
-ve + -> failure (see GEN_STATE_FAILED_XXXX constants below.)
The driver can also be used by other drivers, using the functions: The driver can also be used by other drivers, using the functions:

View File

@ -1,5 +1,9 @@
/* /*
xsns_52_ibeacon.ino - Support for HM17 BLE Module + ibeacon reader on Tasmota xsns_52_esp32_ibeacon_ble.ino
if (!USE_IBEACON_ESP32 && USE_BLE_ESP32)
- Support for HM17 BLE Module + ibeacon reader on Tasmota (untested?)
if (USE_IBEACON_ESP32 && USE_BLE_ESP32)
- Support for BLE_ESP32 ibeacon reader on Tasmota
Copyright (C) 2020 Gerhard Mutz and Theo Arends Copyright (C) 2020 Gerhard Mutz and Theo Arends

View File

@ -1,5 +1,7 @@
/* /*
xsns_62_MI_ESP32.ino - MI-BLE-sensors via ESP32 support for Tasmota xsns_62_esp32_mi.ino - MI-BLE-sensors via ESP32 support for Tasmota
enabled by ESP32 && !USE_BLE_ESP32
if (ESP32 && USE_BLE_ESP32) then xsns_62_esp32_mi_ble.ino is used
Copyright (C) 2021 Christian Baars and Theo Arends Copyright (C) 2021 Christian Baars and Theo Arends

View File

@ -1,5 +1,8 @@
/* /*
xsns_62_MI_ESP32.ino - MI-BLE-sensors via ESP32 support for Tasmota xsns_62_esp32_mi_ble.ino - MI-BLE-sensors via ESP32 support for Tasmota
enabled by ESP32 && USE_BLE_ESP32
if (ESP32 && !USE_BLE_ESP32) then xsns_62_esp32_mi.ino is used - the older driver
Copyright (C) 2020 Christian Baars and Theo Arends Copyright (C) 2020 Christian Baars and Theo Arends
@ -20,6 +23,8 @@
-------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------
Version yyyymmdd Action Description Version yyyymmdd Action Description
-------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------
0.9.2.0 20210127 changed - Officially includes as the mi driver when using USE_BLE_ESP32.
-------
0.9.1.9 20201226 changed - All change now. 0.9.1.9 20201226 changed - All change now.
------- -------
0.9.1.7 20201116 changed - small bugfixes, add BLOCK and OPTION command, send BLE scan via MQTT 0.9.1.7 20201116 changed - small bugfixes, add BLOCK and OPTION command, send BLE scan via MQTT
@ -2233,7 +2238,7 @@ void CmndMi32Keys(void){
* Presentation * Presentation
\*********************************************************************************************/ \*********************************************************************************************/
const char HTTP_MI32[] PROGMEM = "{s}MI ESP32 v0918{m}%u%s / %u{e}"; const char HTTP_MI32[] PROGMEM = "{s}MI ESP32 v0920{m}%u%s / %u{e}";
const char HTTP_MI32_ALIAS[] PROGMEM = "{s}%s Alias {m}%s{e}"; const char HTTP_MI32_ALIAS[] PROGMEM = "{s}%s Alias {m}%s{e}";
const char HTTP_MI32_MAC[] PROGMEM = "{s}%s %s{m}%s{e}"; const char HTTP_MI32_MAC[] PROGMEM = "{s}%s %s{m}%s{e}";
const char HTTP_RSSI[] PROGMEM = "{s}%s " D_RSSI "{m}%d dBm{e}"; const char HTTP_RSSI[] PROGMEM = "{s}%s " D_RSSI "{m}%d dBm{e}";