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

There was missing first letter in notification #286

Merged
merged 4 commits into from Oct 21, 2023

Conversation

jmlich
Copy link
Contributor

@jmlich jmlich commented Oct 17, 2023

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:

image20231017_181829517
image20231017_181836912

The notification was send from debug dialog.

@piggz
Copy link
Owner

piggz commented Oct 18, 2023

Ive tested the original code with an Amazfit GTS, and it works as expected ... need to find the ANS spec!

@jmlich
Copy link
Contributor Author

jmlich commented Oct 20, 2023

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 ,
<03 is for call>
<01 number of notifications>
<00 separator>

@piggz
Copy link
Owner

piggz commented Oct 20, 2023

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! 😆

Technically its -wrong- ... the spec is 2 bytes ... however ... its already implemented, so, im torn!

@piggz
Copy link
Owner

piggz commented Oct 20, 2023

In any case .. we cant send this 3 byte header for calls to the Amazfit devices, so, need some flag to specify this.

@jmlich
Copy link
Contributor Author

jmlich commented Oct 20, 2023

I hope, that provided patch makes it compatible with Amazfit

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

Successfully merging this pull request may close these issues.

None yet

2 participants