Phhere / Playbulb

tools for communication with Playbulb led lights (Candle, Rainbow,..)
MIT License
43 stars 17 forks source link

Playbulb Garden #4

Open effem opened 9 years ago

effem commented 9 years ago

Hi,

I tried to test some command listed here with my Playbulb garden but it seems that they changed the command structure?

$ sudo hcitool lescan
LE Scan ...
D2:57:4B:FF:FF:FF (unknown)
D2:57:4B:FF:FF:FF PLAYBULB GARDEN
^C
$ gatttool -b D2:57:4B:FF:FF:FF --char-write -a 0x0016 -n 0000ff00
$

But the PlayBulb Garden stays white...

Is there any way to sniff the communication between the app and the device to see what data is actually send?

derchrisuk commented 9 years ago

You can use char-read-hnd for example to read out a specific characteristic. Then change settings on the device, and see what has changed. It is possible that the color value is in another characteristic.

effem commented 9 years ago

I looked online to find examples on how to use the char-read-hnd and found some that used the "interactive"?! interface of gatttool but im not able to connect:

$ gatttool -b D2:57:4B:FF:FF:FF -I
[   ][D2:57:4B:FF:FF:FF][LE]> connect
Connecting... connect error: Connection refused (111)
[   ][D2:57:4B:FF:FF:FF][LE]>

Then I tried to read directly via command:

$ gatttool -b D2:57:4B:FF:FF:FF --char-read -a 0x0016
Connection refused (111)

Any ideas on how to proceed?

effem commented 9 years ago

Hi, I used the bluetooth snooping capabilities of my android phone to sniff the playbulb garden protocol:

gatttool -b 12:34:56:78:90:XX --char-write -a 0x001b -n 0000ff00 sets the color to green!

effem commented 9 years ago

It seems that this https://github.com/Phhere/Playbulb/blob/master/protocols/color.md represents the protocol but the code is offset by 3:

0x0016 -> 0x0019 0x0018 -> 0x001b

etc.

derchrisuk commented 9 years ago

It is possible that each product has their own protocol codes. I have no Playbulb Garden so not able to confirm this.

lunarok commented 8 years ago

Hi,

Just for gathering other models : Blue Label (the cheap color only) and new Sphere are using the same like Garden

kevinmost commented 8 years ago

For the record, I'm trying to use these new handles with the Sphere and it doesn't seem to be working. See my comment: https://github.com/Phhere/Playbulb/issues/12#issuecomment-238120045