Skip to content

Instantly share code, notes, and snippets.

@emcniece
Last active November 1, 2022 05:03
Show Gist options
  • Save emcniece/ab97744b3a0649ed7f1c7a927f7e4286 to your computer and use it in GitHub Desktop.
Save emcniece/ab97744b3a0649ed7f1c7a927f7e4286 to your computer and use it in GitHub Desktop.
Ultraloq BLE service inspection via ESPHome
esphome:
name: test-ble
platform: ESP32
board: mhetesp32minikit
esp32_ble_tracker:
ble_client:
- mac_address: F0:5E:CD:BB:21:07
id: potting_shed_ble_client
on_connect:
then:
- lambda: |-
ESP_LOGD("ble_client_lambda", "Connected to BLE device");
on_disconnect:
then:
- lambda: |-
ESP_LOGD("ble_client_lambda", "Disconnected from BLE device");
# Descriptors pulled from https://www.bluetooth.com/specifications/assigned-numbers/
Attempting BLE connection to f0:5e:cd:bb:21:07
Service UUID: 0x1800 # Generic Access service
start_handle: 0x1 end_handle: 0x7
characteristic 0x2A00, handle 0x3, properties 0xc # Device Name
characteristic 0x2A01, handle 0x5, properties 0xc # Appearance
characteristic 0x2A04, handle 0x7, properties 0x2 # Peripheral Preferred Connection Parameters
Service UUID: 0x1801 # Generic Attribute service
start_handle: 0x8 end_handle: 0x8
Service UUID: 0x180A # Device Information service
start_handle: 0x9 end_handle: 0x1b
characteristic 0x2A23, handle 0xb, properties 0x2 # System ID
characteristic 0x2A24, handle 0xd, properties 0x2 # Model Number String
characteristic 0x2A25, handle 0xf, properties 0x2 # Serial Number String
characteristic 0x2A26, handle 0x11, properties 0x2 # Firmware Revision String
characteristic 0x2A27, handle 0x13, properties 0x2 # Hardware Revision String
characteristic 0x2A28, handle 0x15, properties 0x2 # Software Revision String
characteristic 0x2A29, handle 0x17, properties 0x2 # Manufacturer Name String
characteristic 0x2A2A, handle 0x19, properties 0x2 # IEEE 11073-20601 Regulatory Certification Data List
characteristic 0x2A50, handle 0x1b, properties 0x2 # PnP ID
Service UUID: 0x7200
start_handle: 0x1c end_handle: 0x24
characteristic 0x7201, handle 0x1e, properties 0x1a
characteristic 0x7221, handle 0x22, properties 0x1a
Service UUID: F000FFC0-0451-4000-B000-000000000000
start_handle: 0x25 end_handle: 0xffff
characteristic F000FFC1-0451-4000-B000-000000000000, handle 0x27, properties 0x1c
characteristic F000FFC2-0451-4000-B000-000000000000, handle 0x2b, properties 0x1c
characteristic F000FFC5-0451-4000-B000-000000000000, handle 0x2f, properties 0x14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment