Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update on bluetooth data structure #13

Open
paulhamsh opened this issue Nov 27, 2020 · 0 comments
Open

Update on bluetooth data structure #13

paulhamsh opened this issue Nov 27, 2020 · 0 comments

Comments

@paulhamsh
Copy link

paulhamsh commented Nov 27, 2020

Hi
I am working on decoding the data format to add to the amazing work above. I think the key is the 8th byte in the sequence - so I've created this addition to the description you have created.
I am still working through how this works but think it all relies on the 8th byte, and that data is not prefixed by a type indicator.
I hope this helps.

`

Body structure

The body of the message made of sequences of 8 bytes - 7 bytes of data and 'format' byte.
Arguments are sequential in the data sequence and the format byte shows where new a new argument starts.
Each bit maps to a byte in the next sequence, and if the bit is set in the format byte then that byte in the sequence is the start of a new data element.
Strings have their length as their first byte (stored as 0x20 + length).

An example is shown below, with each new data sequence on a new line. The bit expansion is the 8th byte with the bits reversed, to show where the new sequence starts:

    D1 D2 D3 D4   D5 D6 D7         F1    Bit expansion of F1
    xx xx xx xx   xx xx xx         02    0100 000x
    xx 
       2b 52 6f   79 61 62         40    0000 001x
    20 43 72 6f   77 6e 
                        23         08    0001 000x
    30 2e 37 
             27   31 2d 43         10    0000 100x
    6c 65 61 6e   
                  28 69 63         40    0000 001x
    6f 63 2e 70   6e 67 
                        4a         32    0100 110x
    42 
       70 00 00   
                  17 
                     2e 62         00    0000 000x
    69 61 73 2e   6e 6f 69         40    0000 001x
    73 65 67 61   74 65 
                        xx         xx    xxxx xxxx

Which translates to:
String: Royal Crown
String: 0.7
String: 1-Clean
String: icon.png
???: 4a 42
???: 70 00 00
???: 17
String: .bias.noisegate

It appears that strings are the only variable length data sequence and the only sequence that starts with a length
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant