Skip to content

Instantly share code, notes, and snippets.

@Ell
Created May 1, 2016 06:40
Show Gist options
  • Save Ell/67300559a2068128c05730529a749064 to your computer and use it in GitHub Desktop.
Save Ell/67300559a2068128c05730529a749064 to your computer and use it in GitHub Desktop.

BTLE Protocol

Notes

  • All command values end with 0xff
  • All commands use the same handle address of 0x0025
  • Different commands are signified by the first 2 bytes

Keepalive

  • Value: aa:02:ff

Output Amount Control

DescValue
Minaa:29:01:ff
Softaa:29:02:ff
Normalaa:29:03:ff
Hardaa:29:04:ff
Maxaa:29:05:ff

Temp Control

  • Value: aa:07:XX:XX:00:00:00:ff where XX:XX is temp in little endian
  • Notes:
    • Examples:
      TempValue
      450Faa:07:c2:01:00:00:00:ff
      350Faa:07:5e:01:00:00:00:ff
      550Faa:07:26:02:00:00:00:ff

VM Mode

Activate VM Mode

  • Value: aa:14:3c:3c:3c:3c:3c:3c:3c:3c:3c:3c:3c:3c:ff

Max Power

  • TODO

TC Mode

Activate TC Mode

  • Value: aa:02:ff
  • Notes:
    • Sends Temp Control command with set temp before sending this command

LED Control

LED Toggle (ON/OFF)

  • Value: aa:08:01:ff

Set LED Color

  • Value: aa:25:RR:GG:BB:ff
  • Notes:
    • Examples:
      ColorValue
      Redaa:25:fe:00:00:ff
      Greenaa:25:00:fe:00:ff
      Blueaa:25:00:00:fe:ff

Set LED to 7 Color Mode

  • Value: aa:25:01:ff

Set LED to Random Mode

  • Value: aa:26:02:ff

Notifications

Notes

  • Sends two “Handle Value Notification” (0x1b)
  • Second handle value notification is proceeded by a write request
  • Value notifications have the handle 0x002e
  • Example:
    • On vape:
      TypeValue
      Handle Value Notificationab:01:00:00:00:98:4f:00:18:10:05:01:01:11:1c:4d:00:ff
      Handle Value Notificationab:01:04:97:1a:77:4f:01:18:10:05:01:01:11:1d:1f:01:ff
      Write Requestaa:18:e0:05:01:01:11:1d:ff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment