Skip to content

Instantly share code, notes, and snippets.

@eigenein
Last active August 25, 2020 17:16
Show Gist options
  • Save eigenein/d56027a94a59769645a0fc8fafaf5302 to your computer and use it in GitHub Desktop.
Save eigenein/d56027a94a59769645a0fc8fafaf5302 to your computer and use it in GitHub Desktop.
LYWSD02 BLE
$ sudo stdbuf -oL hcitool lescan | grep LYWSD02
E7:2E:00:F0:20:8A LYWSD02
$ sudo hcitool leinfo E7:2E:00:10:50:A2
Requesting information ...
Handle: 65 (0x0041)
LMP Version: 4.2 (0x8) LMP Subversion: 0x10f
Manufacturer: Dialog Semiconductor B.V. (210)
Features: 0x1f 0x00 0x00 0x00 0x00 0x00 0x00 0x00
# Firmware
$ gatttool -b E7:2E:00:10:50:A2 --char-read -a 0x14
Characteristic value/descriptor: 31 2e 31 2e 32 5f 30 30 34 32
# Date/time
$ gatttool -b E7:2E:00:10:50:A2 --char-read -a 0x3e
Characteristic value/descriptor: 88 6e 07 5f 02
# Temperature/humidity
$ sudo gatttool -b E7:2E:00:F0:20:8A --char-write-req --handle 0x0009 -n 0100 --listen
Characteristic Write Request failed: Internal application error: I/O
@sorz
Copy link

sorz commented Aug 25, 2020

The last one, temperature/humidity, is --handle 0x004c on my device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment