OpenMQTTGateway icon indicating copy to clipboard operation
OpenMQTTGateway copied to clipboard

Add secure option for BLE connections.

Open h2zero opened this issue 3 years ago • 1 comments

Description:

This will allow for connecting to devices that require pairing/bonding before permitting read/write operations.

To use this simply add {"secure": true} and optionally {"passkey":123456} (substitute with correct key) to the BLE read/write command.

Example:

 home/OpenMQTTGateway_ESP32_BLE/commands/MQTTtoBT/config {
   "ble_read_address":"AA:BB:CC:DD:EE:FF",
   "mac_type": 1,
   "ble_read_service":"932c32bd-0000-47a2-835a-a8d455b859dd",
   "ble_read_char":"932c32bd-0002-47a2-835a-a8d455b859dd",
   "value_type":"HEX",
   "ttl":4,
   "immediate":true,
   "secure":true,
   "passkey":123456 }

Checklist:

  • [x] The pull request is done against the latest development branch
  • [x] Only one feature/fix was added per PR and the code change compiles without warnings
  • [x] I accept the DCO.

h2zero avatar Aug 07 '22 15:08 h2zero

For testing at the moment

h2zero avatar Aug 07 '22 15:08 h2zero