dave-code-ruiz / elkbledom

Home Assistant custom component for LED STRIP NAME ELK BLEDOM
MIT License
77 stars 16 forks source link

Don't connect with uuid 0x0003 uuid: 00001800-0000-1000-8000-00805f9b34fb #8

Closed DrArut closed 1 year ago

DrArut commented 1 year ago

Hello, I'm trying to connect to my bluetooth led lampshade, but it doesn't work. Its native program is ilink. What data do you need to provide in order to add support for my device in your integration? char-desc handle: 0x0001, uuid: 00002800-0000-1000-8000-00805f9b34fb handle: 0x0002, uuid: 00002803-0000-1000-8000-00805f9b34fb handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb handle: 0x0004, uuid: 00002800-0000-1000-8000-00805f9b34fb handle: 0x0005, uuid: 00002803-0000-1000-8000-00805f9b34fb handle: 0x0006, uuid: 00002a05-0000-1000-8000-00805f9b34fb handle: 0x0007, uuid: 00002800-0000-1000-8000-00805f9b34fb handle: 0x0008, uuid: 00002803-0000-1000-8000-00805f9b34fb handle: 0x0009, uuid: 0000a042-0000-1000-8000-00805f9b34fb handle: 0x000a, uuid: 00002902-0000-1000-8000-00805f9b34fb handle: 0x000b, uuid: 00002803-0000-1000-8000-00805f9b34fb handle: 0x000c, uuid: 0000a040-0000-1000-8000-00805f9b34fb handle: 0x000d, uuid: 00002803-0000-1000-8000-00805f9b34fb handle: 0x000e, uuid: 0000a041-0000-1000-8000-00805f9b34fb handle: 0x000f, uuid: 00002803-0000-1000-8000-00805f9b34fb handle: 0x0010, uuid: 0000a043-0000-1000-8000-00805f9b34fb handle: 0x0011, uuid: 00002902-0000-1000-8000-00805f9b34fb

characteristics handle: 0x0002, char properties: 0x02, char value handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb handle: 0x0005, char properties: 0x02, char value handle: 0x0006, uuid: 00002a05-0000-1000-8000-00805f9b34fb handle: 0x0008, char properties: 0x10, char value handle: 0x0009, uuid: 0000a042-0000-1000-8000-00805f9b34fb handle: 0x000b, char properties: 0x08, char value handle: 0x000c, uuid: 0000a040-0000-1000-8000-00805f9b34fb handle: 0x000d, char properties: 0x02, char value handle: 0x000e, uuid: 0000a041-0000-1000-8000-00805f9b34fb handle: 0x000f, char properties: 0x10, char value handle: 0x0010, uuid: 0000a043-0000-1000-8000-00805f9b34fb

primary attr handle: 0x0001, end grp handle: 0x0003 uuid: 00001800-0000-1000-8000-00805f9b34fb attr handle: 0x0004, end grp handle: 0x0006 uuid: 00001801-0000-1000-8000-00805f9b34fb attr handle: 0x0007, end grp handle: 0x0011 uuid: 0000a032-0000-1000-8000-00805f9b34fb

dave-code-ruiz commented 1 year ago

First take your local name, in gatttool put: char-read-uuid 00002a00-0000-1000-8000-00805f9b34fb in my case show: handle: 0x0003 value: 45 4c 4b 2d 42 4c 45 44 4f 4d 20 20 20 this value is hex, find in google "convert hex to ascii" to convert it in my case show: "ELK-BLEDOM "

You need to know read and write handle in my case my write characteristics is: handle: 0x0008, char properties: 0x06, char value handle: 0x0009, uuid: 0000fff3-0000-1000-8000-00805f9b34fb

You now need to know at lest ON and OFF commands, in my case 7e0004f00001ff00ef and 7e0004000000ff00ef

With this commands you can try your strip:

sudo gatttool -b be:59:7a:00:08:xx --char-write-req -a 0x0009 -n 7e0004f00001ff00ef # POWER ON
sudo gatttool -b be:59:7a:00:08:xx --char-write-req -a 0x0009 -n 7e000503ff000000ef # RED
sudo gatttool -b be:59:7a:00:08:xx --char-write-req -a 0x0009 -n 7e0005030000ff00ef # BLUE
sudo gatttool -b be:59:7a:00:08:xx --char-write-req -a 0x0009 -n 7e00050300ff0000ef # GREEN
sudo gatttool -b be:59:7a:00:08:xx --char-write-req -a 0x0009 -n 7e0004000000ff00ef # POWER OFF

I receive response: Characteristic value was written successfully and led strip execute the command correct.

You can try to find in google an API with this information , in my case I use:

https://linuxthings.co.uk/blog/control-an-elk-bledom-bluetooth-led-strip

Good luck

dave-code-ruiz commented 1 year ago

Other option is reverse enginnering, i can not help you in this, i not need it, you can see some samples here:

https://blog.wokwi.com/reverse-engineering-a-bluetooth-lightbulb/

https://blog.attify.com/the-practical-guide-to-hacking-bluetooth-low-energy/

Good luck

dave-code-ruiz commented 1 year ago

If you collect all needed information, create new issue