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

Bluetooth: Add OpenHaystack implementation #3408

Closed
wants to merge 3 commits into from

Conversation

thejudge156
Copy link

@thejudge156 thejudge156 commented Jan 30, 2024

What's new

  • Modify gap.c to add OpenHaystack-related defines, such as the key path and length
  • Add the max BLE packet length to bt.h (Do I change that location and/or name?)
  • Add an advertisement data template for OpenHaystack
  • Add a bool for when the keyfile is detected, and therefor OpenHaystack gets enabled.
  • Change the mac address to the first 6 key bytes, with a bitmask over the first. (Required by AirTags)
  • Add a flag for disabling the OpenHaystack implementation for a profile, OpenHaystack for the HID profile for example is disabled.

Verification

  • A lot of people can't use OpenHaystack because of the expensive hardware surrounding it, but using this project, you just need Docker and Python
  • Clone the repo, run generate-keys.py from the repo with Python
  • ./generate-keys.py -p haystack
  • Find the out directory in the repo, copy the keyfile and the json file to a safe location
  • Copy the haystack_keyfile to ext root
  • Reboot the Flipper Zero, enable Bluetooth
  • Follow the instructions on the repo as detailed here
  • Import the JSON file into here
  • If reports do not appear after a refresh, see the last note below

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

Note

Current issue that I could use help finding a way around; You can't connect to the mobile app because the service UUID and the broadcasting name are not set while Haystack is on, and the mac address is not the same to stock. You can connect to the Flipper if you reenable service UUID in gap.c, connect to the mobile app, then disable services again. It will even reconnect even with the service disabled.

One more thing, until this issue gets resolved, iOS 17 devices will not report the "AirTag" frequently. It will see it, and give you the "someone is tracking you" notification, but I guess the Apple Servers don't like it? Either way, without a iOS <= 16 phone around, this is practically useless. Mostly posting this now so when the issue is fixed, all issues with this PR will be resolved and can be merged.

@skotopes
Copy link
Member

See #3272

@thejudge156
Copy link
Author

thejudge156 commented Jan 30, 2024

Would you prefer I add this functionality into that system when that PR gets merged?

@skotopes
Copy link
Member

@thejudge156 yes

@thejudge156
Copy link
Author

Closing until 3272 gets merged

@skywinder
Copy link

@thejudge156 #3272 is merged alredy!🙌

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