Closed jmlich closed 10 months ago
Ive tested the original code with an Amazfit GTS, and it works as expected ... need to find the ANS spec!
Related documentation of InfiniTime can be found here https://github.com/InfiniTimeOrg/InfiniTime/blob/main/doc/ble.md#notifications
and I can see that I was actually wrong. It should be 03 01 00
Yeah, i found that ... JF reminded me that the protocol hasnt changed since it was first committed ... and the person that wrote it was me! :laughing:
Technically its -wrong- ... the spec is 2 bytes ... however ... its already implemented, so, im torn!
In any case .. we cant send this 3 byte header for calls to the Amazfit devices, so, need some flag to specify this.
I hope, that provided patch makes it compatible with Amazfit
I am not sure if this works properly also on other smartwatches, but on PineTime this definitely helps.
It seems generic alert message is used for phone call, but it is composed in different way. The alert is category (one byte ) + alert_type=1 ( one byte ) + icon(one byte) + sender (32 bytes) + separator (one byte) +subject (128bytes) + separator=\n (two bytes) + message (128bytes)
PineTime doesn't counts lenght sender+subject+message, together and clips it to 100 bytes
The incommingCall() composes message like this 03 01 + caller_id I believe that header should be 3 bytes (I have added 0x01 for icon) 03 01 01 + caller_id
And finally proof with picture:
The notification was send from debug dialog.