Protocol specification #56
Replies: 3 comments 4 replies
-
Hey, this seems really cool! Do you have a way of contact so i can contact you privately? |
Beta Was this translation helpful? Give feedback.
-
Hi @scorpi11 this is amazing stuff, thank you for documenting this! Is there any way you could help walk me through how I might run these commands on Mac? I am trying to use Bluetility to send and receive values but am having some trouble. Any insight you could offer is much appreciated! |
Beta Was this translation helpful? Give feedback.
-
Are you able to read a characteristic using gatttool? I can't seem to get it to spit out any values from the speaker. |
Beta Was this translation helpful? Give feedback.
-
I used the source code of this cool project to collect information about the protocol. Now I can control JBL Flip 4 speakers in Linux and macOS. To contribute back to this project, I started to write a protocol description (mainly by copying the imported parts from the source code) and added some examples. Maybe someone is interested in this.
GATT characteristics to write control data:
0x000f (handle) or 65786365-6c70-6f69-6e74-2e636f6d0002 (UUID)
Data format:
byte 0| byte 1 | byte 2 |further bytes
0xaa |packet type|payload length| payload
Byte 0 and 1 are mandatory. Depending on the packet type, there can be
a payload length + payload after this.
payload can be a parameter for the packet type (like SET_FEEDBACK_SOUNDS)
or a token with further parameters. Some tokens have an index byte before them.
Packet types:
Tokens:
Usage of certain packet types and tokens:
Request Speaker info (can be long, increase MTU if necessary)
0xaa11
Enable feedback sound:
0xaa670101
Play sound:
0xaa31
Use speaker for the left channel in connect+ mode:
aa1503004601
the first byte (0x00) after the payload (0x03) is some kind of index
Example commands for Linux:
Enable feedback sounds:
sudo gatttool -i hci0 -b <MAC address> --char-write-req -a 0x000f -n 0xaa670101
Play a sound:
sudo gatttool -i hci0 -b <MAC address> --char-write-req -a 0x000f -n 0xaa31
Set the speaker to play the left channel:
sudo gatttool -i hci0 -b <MAC address> --char-write-req -a 0x000f -n 0xaa1503004601
Beta Was this translation helpful? Give feedback.
All reactions