derHeinz/divoom-adapter

How to capture the bluetooth serial messages from divoom apps?

Closed this issue · 7 comments

I am wondering how you were able to capture the serial messages to get started and/or how you reverse engineered the message protocol? Was it some kind of bluetooth proxy between the phone apps and the device itself? I tried briefly to setup a fake serial bluetooth service on my PC to connect to using the app but it would never show up in the app.

I am working on a Windows C# UWP port of the serial protocol for aurabox and there are a few missing commands that I can tell from testing the official divoom android app. I have everything working you documented here so thank you very much for the hard work.

The missing commands are minor but I wanted to see if it is possible for completeness.

  1. Set temperature units (I tried the message format from the timebox protocol and it did not work on my aurabox)
  2. Set color of the solid color view
  3. Set volume

Hi,

To reverse engineer bluetooth I activated the bluetooth log on my mobile. Search for "snoop hci bluetooth" within development options of your android phone and activate it. The log file contains all communication of your phone's bluetooth adapter including the communication from divoom's app. The log file can be read with tools like https://www.wireshark.org/. This way you are able to find the bytes the app writes to your device.

Good luck to you

Thanks!

I was able to get it to work but it wasn't easy on my Samsung S8. Here is link to enable snoop.

I logged the following additional commands I did not find here
"Set Temp C", { 0x4c, 0x00 }
"Set Temp F", { 0x4c, 0x01 }
"Set Color Black", { 0x47, 0x00 }
"Set Color Red", { 0x47, 0x01 }
"Set Color Green", { 0x47, 0x02 }
"Set Color Yellow", { 0x47, 0x03 }
"Set Color Blue", { 0x47, 0x04 }
"Set Color Purple", { 0x47, 0x05 }
"Set Color Teal", { 0x47, 0x06 }
"Set Color White", { 0x47, 0x07 }

One more command I found. Not sure how useful
"Play Button", { 0x41, 0x00, 0xff }

I'm currently unable to test any of those because my aurabox broke. I could however write some code to send the commands you wrote into the issue. What should we do about it?

I haven't actually tried to run your python code and do not have a linux environment with access to bluetooth (I typically use linux subsystem for windows or a ubuntu VM). I used your readme and some of the code as a reference to create my own app. I could submit a PR to update the readme.md with a table of the complete set of commands.

this would be very great.