xled / xled-docs

📖 Unofficial documentation of API reference, protocol details and hardware of Twinkly - Smart Decoration LED lights for Christmas.

Home Page:https://xled-docs.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Document Bluetooth protocol

scrool opened this issue · comments

Generation II devices have Bluetooth interface to configure WiFi connection: https://www.twinkly.com/knowledge/configure-twinkly-generation-ii-for-the-first-time/

It might be good idea to document it as an alternative approach to RESTful API.

I'll use this issue to track my findings. So far I have found following:

Device advertises same name as Device ID.

Following profiles exists:

	UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
	UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
	UUID: Vendor specific           (68cac066-1f6e-0f96-1146-da9d00fa7b1b)

Services:

Primary Service (Handle 0xff01)
	/org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0001
	00001801-0000-1000-8000-00805f9b34fb
	Generic Attribute Profile
Characteristic (Handle 0x7bab)
	/org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0001/char0002
	00002a05-0000-1000-8000-00805f9b34fb
	Service Changed
Primary Service (Handle 0xff01)
	/org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0028
	68cac066-1f6e-0f96-1146-da9d00fa7b1b
	Vendor specific
Characteristic (Handle 0x7bab)
	/org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0028/char0029
	68cac066-1f6e-0f96-1146-da9d01fa7b1b
	Vendor specific
Characteristic (Handle 0x7bab)
	/org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0028/char002b
	68cac066-1f6e-0f96-1146-da9d02fa7b1b
	Vendor specific
Descriptor (Handle 0x3cc0)
	/org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/service0028/char002b/desc002d
	00002902-0000-1000-8000-00805f9b34fb
	Client Characteristic Configuration

It seems to require authentication for connection.

Just a note: Twinkly states directly in their documentation that Bluetooth is only used for the initial pairing, and all subsequent communication must be done over WiFi. So while it can certainly be fun to reverse engineer, once you have done your pairing using the official app, there's probably little use of Bluetooth.