InfiniTimeOrg / InfiniTimeOrg/InfiniTime

AlertNotification Service/Client are not compliant to the spec

Open
#1,895 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
3.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Verification
  • I searched for similar bug reports (including closed issues) and found none was relevant.
What happened?

AlertNotification Service/Client use a 3 bytes header, the spec defines a 2 bytes header

What should happen instead?

AlertNotification Service/Client should comply to the BLE spec.

Reproduction steps

N/A

More details?

This issue was reported by the Amazfish community : InfiniTime expects the header of all notifications is a 3 bytes header (here and here).

However, the GATT spec specifies a header of 2 bytes.

Now, even if InfiniTime is not 100% compliant, all companion apps have currently implemented this 3 bytes header, and changing this might break the compatibility with those companion apps so I'm not sure if we should fix this.
If we do want to change the header size, we'll have to communicate with companion app developers to ensure smooth transition.

It might be possible to support both 2 and 3 bytes header by checking the value of the 3rd byte of the buffer : it can be ignored if it's equal to 0x00 or lower than 0x20.

The documentation should however be completed to mention that this is not completely compliant to the spec of the AlertNotificationService.

Version

<=1.13.0

Companion app

All

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with doc/ble.md and compare its New Alert description with the linked BLE specification and the AlertNotificationService/Client behavior referenced in the issue. Resolve whether compatibility requires supporting both header sizes or retaining the current format, then document the resulting behavior and verify any implementation change against companion-app compatibility.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.