Skip to content

feat(bluetooth): add broadcast handler for newer Icomon/e-volve scales#1345

Open
BramB-1952444 wants to merge 1 commit intooliexdev:masterfrom
BramB-1952444:master
Open

feat(bluetooth): add broadcast handler for newer Icomon/e-volve scales#1345
BramB-1952444 wants to merge 1 commit intooliexdev:masterfrom
BramB-1952444:master

Conversation

@BramB-1952444
Copy link
Copy Markdown

Fixes an issue where newer Icomon boards (broadcasting as "AAA002") fail with an UNKNOWN_STATUS_CODE during GATT connection attempts. This commit bypasses the connection entirely and passively reads the BLE advertisement.

  • Added IcomonBroadcastHandler using LinkMode.BROADCAST_ONLY.
  • Implemented the 0xA0 XOR cipher to decrypt weight and impedance from the 0xA0AC manufacturer data payload.
  • Placed the new handler at the top of ScaleFactory.kt so it intercepts the AAA002 broadcast before the legacy GATT handler attempts to connect.

Note: The protocol reverse-engineering and Kotlin implementation for this commit were developed with the assistance of generative AI.

Fixes an issue where newer Icomon boards (broadcasting as "AAA002") fail
with an UNKNOWN_STATUS_CODE during GATT connection attempts. This commit
bypasses the connection entirely and passively reads the BLE advertisement.

- Added `IcomonBroadcastHandler` using LinkMode.BROADCAST_ONLY.
- Implemented the 0xA0 XOR cipher to decrypt weight and impedance from
  the 0xA0AC manufacturer data payload.
- Placed the new handler at the top of `ScaleFactory.kt` so it intercepts
  the AAA002 broadcast before the legacy GATT handler attempts to connect.

Note: The protocol reverse-engineering and Kotlin implementation for this
commit were developed with the assistance of generative AI.
@oliexdev
Copy link
Copy Markdown
Owner

Thanks for your PR but what about the already implemented AAAxHandler? Does it not work? I would prefer to fix that implementation.

@valenipes
Copy link
Copy Markdown

Hi @oliexdev, some days ago I opened the issue #1341 because when I try to pair the scale I see this
pair
and when I pair and try the scale, nothing happens.

I noticed later that a while ago a pr was done #1041, and if I understand correctly the measures should go, but they don't. So yes, probably there is some issue with the already implemented AAAxHandler (or maybe I'm missing something on how to use the app properly)

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.

3 participants