Skip to content

Parse incoming AirDrop BLE advertisements - #139

Open
sneurlax wants to merge 1 commit into
t4t5:mainfrom
sneurlax:feat/ble-advert-parser
Open

sneurlax wants to merge 1 commit into
t4t5:mainfrom
sneurlax:feat/ble-advert-parser

Conversation

@sneurlax

Copy link
Copy Markdown

Owly can already construct the AirDrop advertisement used while browsing, but it has no structured parser for incoming Apple Continuity manufacturer data.

This adds:

  • safe iteration over the Type-Length-Value records in Apple manufacturer data;
  • parsing of the 18-byte AirDrop payload for versions 1 and 3;
  • access to the advertisement version, tag, and four contact-hash prefixes;
  • detection of anonymous advertisements with zeroed contact hashes;
  • clean rejection of truncated records, wrong payload lengths, and unknown versions.

The parser finds AirDrop records alongside other Continuity records and preserves the existing outgoing version 3 encoding.

Tests cover version 1 and version 3 payloads, multiple Continuity records, encoding/parsing round trips, anonymous detection, truncated input, wrong lengths, and unknown versions.

Test:

`cargo test -p owly-airdrop`

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.

1 participant