GithubHelp home page GithubHelp logo

seemoo-lab / openhaystack Goto Github PK

View Code? Open in Web Editor NEW
8.1K 129.0 443.0 9.2 MB

Build your own 'AirTags' 🏷 today! Framework for tracking personal Bluetooth devices via Apple's massive Find My network.

Home Page: https://owlink.org

License: GNU Affero General Public License v3.0

Swift 45.13% Objective-C 11.79% C 1.69% Makefile 0.32% Python 1.49% Shell 1.69% CMake 2.96% Kotlin 0.03% Ruby 0.50% Dart 29.48% C++ 4.19% HTML 0.73%
apple offline-finding bluetooth microbit location-tracker macos find-my airtag reverse-engineering

openhaystack's Introduction

OpenHaystack application icon OpenHaystack

OpenHaystack is a framework for tracking personal Bluetooth devices via Apple's massive Find My network. Use it to create your own tracking tags that you can append to physical objects (keyrings, backpacks, ...) or integrate it into other Bluetooth-capable devices such as notebooks.

Screenshot of the app

Table of contents

What is OpenHaystack?

OpenHaystack is an application that allows you to create your own accessories that are tracked by Apple's Find My network. All you need is a Mac and a BBC micro:bit or any other Bluetooth-capable device. By using the app, you can track your accessories anywhere on earth without cellular coverage. Nearby iPhones will discover your accessories and upload their location to Apple's servers when they have a network connection.

History

OpenHaystack is the result of reverse-engineering and security analysis work of Apple's Find My network (or offline finding). We at the Secure Mobile Networking Lab of TU Darmstadt started analyzing offline finding after its initial announcement in June 2019. We identified how Apple devices can be found by iPhones devices, even when they are offline through this work. The whole system is a clever combination of Bluetooth advertisements, public-key cryptography, and a central database of encrypted location reports. We disclosed a specification of the closed parts of offline finding and conducted a comprehensive security and privacy analysis. We found two distinct vulnerabilities. The most severe one, which allowed a malicious application to access location data, has meanwhile been fixed by Apple (CVE-2020-9986). For more information about the security analysis, please read our paper. Since its release, we received quite a bit of press and media coverage.

Disclaimer

OpenHaystack is experimental software. The code is untested and incomplete. For example, OpenHaystack accessories using our firmware broadcast a fixed public key and, therefore, are trackable by other devices in proximity (this might change in a future release). OpenHaystack is not affiliated with or endorsed by Apple Inc.

How to use OpenHaystack?

OpenHaystack consists of two components. First, we provide a macOS application that can display the last reported location of your personal Bluetooth devices. Second, the firmware image enables Bluetooth devices to broadcast beacons that make them discoverable by iPhones.

System requirements

OpenHaystack requires macOS 11 (Big Sur).

Installation

The OpenHaystack application requires a custom plugin for Apple Mail. It is used to download location reports from Apple's servers via a private API (technical explanation: the plugin inherits Apple Mail's entitlements required to use this API). Therefore, the installation procedure is slightly different and requires you to temporarily disable Gatekeeper. Our plugin does not access any other private data such as emails (see source code).

  1. Download a precompiled binary release from our GitHub page.
    Alternative: build the application from source via Xcode.
  2. Open OpenHaystack. This will ask you to install the Mail plugin in ~/Library/Mail/Bundle.
  3. Open a terminal and run sudo spctl --master-disable, which will disable Gatekeeper and allow our Apple Mail plugin to run.
  4. Open Apple Mail. Go to Preferences β†’ General β†’ Manage Plug-Ins... and activate the checkbox next to OpenHaystackMail.mailbundle.
    • If the Manage Plug-Ins... button does not appear. Run this command in terminal sudo defaults write "/Library/Preferences/com.apple.mail" EnableBundles 1
  5. Allow access and restart Mail.
  6. Open a terminal and enter sudo spctl --master-enable, which will enable Gatekeeper again.

Usage

Adding a new accessory. To create a new accessory, you just need to enter a name for it and optionally select a suitable icon and a color. The app then generates a new key pair that is used to encrypt and decrypt the location reports. The private key is stored in your Mac's keychain.

Deploy to device. Connect a supported device via USB to your Mac and hit the Deploy button next to the accessory's name and choose the corresponding. Instead of using OpenHaystack's integrated deployment, you may also copy the public key used for advertising (right click on accessory) and deploy it manually.

Display devices' locations. It can take up to 30 minutes until you will see the first location report on the map on the right side. The map will always show all your items' most recent locations. You can click on every item to check when the last update was received. By clicking the reload button, you can update the location reports.

How does Apple's Find My network work?

We briefly explain Apple's offline finding system (aka Find My network). Please refer to our PETS paper and Apple's accessory specification for more details. We provide a schematic overview (from our paper) and explain how we integrate the different steps in OpenHaystack below.

Find My Overview

Pairing (1)

To use Apple's Find My network, we generate a public-private key pair on an elliptic curve (P-224). The private key remains on the Mac securely stored in the keychain, and the public key is deployed on the accessory, e.g., an attached micro:bit.

Losing (2)

In short, the accessories broadcast the public key as Bluetooth Low Energy (BLE) advertisements (see firmware). Nearby iPhones will not be able to distinguish our accessories from a genuine Apple device or certified accessory.

Finding (3)

When a nearby iPhone receives a BLE advertisement, the iPhone fetches its current location via GPS, encrypts it using public key from the advertisement, and uploads the encrypted report to Apple's server. All iPhones on iOS 13 or newer do this by default. OpenHaystack is not involved in this step.

Searching (4)

Apple does not know which encrypted locations belong to which Apple account or device. Therefore, every Apple user can download any location report as long as they know the corresponding public key. This is not a security issue: all reports are end-to-end encrypted and cannot be decrypted unless one knows the corresponding private key (stored in the keychain). We leverage this feature to download the reports from Apple that have been created for our OpenHaystack accessories. We use our private keys to decrypt the location reports and show the most recent one on the map.

Apple protects their database against arbitrary access by requiring an authenticated Apple user to download location reports. We use our Apple Mail plugin, which runs with elevated privileges, to access the required authentication information. The OpenHaystack app communicates with the plugin while downloading reports. This is why you need to keep Mail open while using OpenHaystack.

How to track other Bluetooth devices?

In principle, any Bluetooth device can be turned into an OpenHaystack accessory that is trackable via Apple's Find My network. Currently, we provide a convenient deployment method of our OpenHaystack firmwares for a small number of embedded devices (see table below). We also support Linux devices via our generic HCI script. Feel free to port OpenHaystack to other devices that support Bluetooth Low Energy based on the source code of our firmware and the specification in our paper. Please share your results with us!

Platform Tested on Deploy via app Comment
Nordic nRF51 BBC micro:bit v1 βœ“ Only supports nRF51822 at this time (see issue #6).
Espressif ESP32 SP32-WROOM, ESP32-WROVER βœ“ Deployment can take up to 3 minutes. Requires Python 3. Thanks @fhessel.
Linux HCI Raspberry Pi 4 w/ Raspbian Should support any Linux machine.

Setup

OpenHaystack Mobile

OpenHaystack Mobile is a complete reimplementation of the OpenHaystack macOS application for smartphones. The app provides the same functionality to create and track accessories and aims to increase the usability, especially for new users. In contrast to the macOS application, the location reports cannot be fetched directly on the smartphone, so the app requires a proxy server hosted on Mac hardware to access the Find My network. The proxy server can be accessed over a network by multiple users simultaneously.

To connect to your proxy server set the correct URL in: openhaystack-mobile/lib/findMy/reports_fetcher.dart

OpenHaystack Mobile is built with the cross-platform Flutter framework and currently runs on Android and iOS. More information about the app and usage instructions can be found in the openhaystack-mobile folder of this repository.

Authors

References

  • Alexander Heinrich, Milan Stute, Tim Kornhuber, Matthias Hollick. Who Can Find My Devices? Security and Privacy of Apple's Crowd-Sourced Bluetooth Location Tracking System. Proceedings on Privacy Enhancing Technologies (PoPETs), 2021. doi:10.2478/popets-2021-0045 πŸ“„ Paper πŸ“„ Preprint.
  • Alexander Heinrich, Milan Stute, and Matthias Hollick. DEMO: OpenHaystack: A Framework for Tracking Personal Bluetooth Devices via Apple’s Massive Find My Network. 14th ACM Conference on Security and Privacy in Wireless and Mobile (WiSec ’21), 2021.
  • Tim Kornhuber. Analysis of Apple's Crowd-Sourced Location Tracking System. Technical University of Darmstadt, Master's thesis, 2020.
  • Apple Inc. Find My Network Accessory Specification – Developer Preview – Release R3. 2020. πŸ“„ Download.

License

OpenHaystack is licensed under the GNU Affero General Public License v3.0.

openhaystack's People

Contributors

fhessel avatar freak4pc avatar houzuoguo avatar k-nut avatar maxgranzow avatar mowtschan avatar neoz16 avatar noahwilliamsson avatar schmittner avatar sebinbash avatar sn0wfreezedev avatar tomasharkema avatar yoution avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openhaystack's Issues

"Incompatible Plugin"

Screen Shot 2021-03-05 at 11 51 44 AM

This appears after restarting Mail. It deselects its self. Is there anything I can do?

Incompatible Plug-ins Disabled

After activating the plugin in mail, it restarts and shows:

Mail has disabled the following plug-ins:
OpenHaystackMail.mailbundle
Contact the makers of these plug-ins for versions that are compatible with Mail 14.0.

add time and date to past location pins

A clear and concise description of what the problem is.

When using the feature to show all locations from the past 7 days, I would like to see at what time the location was recorded. At the moment, when click a red pin nothing happens. Therefore, it is impossible to tell when the tracker/tracked object was at the various locations in the last 7 days.

Describe the solution you'd like
While clicking a pin from the last 7 days, OpenHaystack.app should show time and date of the tracked location.

Describe alternatives you've considered
In addition, a possibility to recreate the path the tracker took in the past 7 days would be interesting. At the moment, Iβ€˜m using it to track my car. A feature which would show which routes the tracker took would be interesting

Additional context
Add any other context or screenshots about the feature request here.

thank you for your awesome work!

Error while running ./flash_esp32.sh

konifer@Jans-MacBook-Pro ESP32 % ./flash_esp32.sh -p /dev/cu.usbserial-0001 "public-key-in-base64" Traceback (most recent call last): File "/usr/local/Cellar/[email protected]/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/Cellar/[email protected]/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/usr/local/Cellar/[email protected]/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/base64.py", line 579, in <module> main() File "/usr/local/Cellar/[email protected]/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/base64.py", line 565, in main func(sys.stdin.buffer, sys.stdout.buffer) File "/usr/local/Cellar/[email protected]/3.9.0_5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/base64.py", line 505, in decode s = binascii.a2b_base64(line) binascii.Error: Invalid base64-encoded string: number of data characters (17) cannot be 1 more than a multiple of 4 Could not parse the public key. Please provide valid base64 input
Any idea?

Can I use different company ID in the payload?

As I can see, all the beacon examples use 0x4c00 (Apple) as a company ID in the advertisement payload.

There is also some code that checks if company ID equals 0x4c00, but only for nearby scanning.

My question: is it necessary to use 0x4c00?

I've tried changing it to 0x0100 and reports stopped appearing in OpenHaystack. Is it Apple's limitation or my fault?
If it's Apple's limitation, how would 3rd-party MFi beacons work then? I bet they won't use Apple's company IDs in adv packets.

Problem with ESP32 (ESPRESSIF)

When i want to deploy an Airtag i get this error: Deploying to microbit failed. Please reconnect the device over USB

(To be honest, I don't know what to add here, since I have little affection for the mateire)

OpenHaystack version:
Version 0.3.7

macOS version:
11.4 (20F71)

Bildschirmfoto 2021-06-07 um 18 59 52

2021-06-07 19 04 14

A version for macOS Catalina

Hello,
this is not really an issue.

I have a MacBook Pro 2012 and I can not install macOS Big Sur without a Patcher.
Can you make a Catalina version please? I like your Software πŸ‘, but I can't run it on my machine. :)

Thank you and have a nice day!

AirTag privacy vs OpenHaystack

Checking the specs from the upcoming AirTag you can read this:

AirTag is designed to discourage unwanted tracking. If someone else’s AirTag finds its way into your stuff, your iPhone will notice it’s traveling with you and send you an alert. After a while, if you still haven’t found it, the AirTag will start playing a sound to let you know it’s there.

My guess is that the AirTag will broadcast another advertisement besides the OF advertisement but I’m not so sure about that. Maybe this is a new thing on iOS 14.5 that will alert also when a custom OpenHaystack device is around? (I don’t think so since the OF protocol will change the advertisement every 15 minutes)

Any thoughts on this?

Any support for macOS lower than BigSur?

For some reasons, I don't have an Apple device with macOS BigSur. Is there any chance that this project will be available for macOS Catalina, for example?

I tried building myself, but I have no knowledge about Swift, so it was not possible for me.

I do understand that the fastest solution is for me to get BigSur.
I really appreciate if it is possible, thanks!

Is PiZeroW not compatible?

I run Linux HCI on two Raspberries one "4" and one "zeroW".

OpenHaystack works properly with RPi4, but with Pizero the location is not shown. Is there anything missing on pizero?
Near the pizzerΓ² there is a green dot, so I assume something is working, right?

Thank you

Screenshot 2021-04-17 at 10 32 04

airtag on raspberry pi

can you write a fullstep manual to you use a raspberry like the raspberry pi zero w as an airtag ?

Unable to get key into "OFFLINEFINDINGPUBLICKEYHERE!" for nRF51822 firmware

Hey thank you for this great project! i have an issue with making the firmware for nRF51822, i don't know how to enter the public key in to the firmware. /* don't make const so we can replace key in compiled binary image */ static char public_key[28] = "OFFLINEFINDINGPUBLICKEYHERE!"; I tried to paste the advertisement key (Base64) from the open haystack app there, this doesn't work the make commands gives this error error: initializer-string for array of 'char' is too long [-Werror] What's the right way to get the advertisement key from the app into the main.c file for the nRF51822. Thank you for answering the question!

Import from another Mac

HI, Just wondering if there is a way to import devices that have been setup on another Mac.
I have 2 Macs and have setup OpenHayStack on both and I would like to be able to track the same devices on both, Is there a way to do that?

Thanks,
Jay

Play sounds (and possibly send arbitrary payloads to the tracked device)

Background
AirTag and other official "Find My" compatible devices allow you to trigger a sound to be played. They also allow you to remotely turn on a feature called "lost mode."

Request
I would like to be able to trigger these action on OpenHaystack Tags (e.g., be able to press a button on the OpenHaystack app and send a signal to the OpenHaystack tag to initiate a playing a sound or triggering lost mode like normal AirTags).

Additional thoughts

  • Perhaps the play sound and lost mode could be bound to pre-defined scripts as a way of triggering them and not necessarily to perform the functions Apple uses them for.
  • If playing sounds and enabling lost mode are sent through a payload that can store arbitrary data, this could potentially allow for it to trigger more commands than just those two.
    • Failing that, it would be interesting if the lost mode and play sound signals could be modulated between in a binary code to send messages. Perhaps timing would make this infeasible.

implementing deep/light sleep

I've been racking my brains for the past week trying to think how it would be possible to implement deep/light sleep into the esp32 firmware. this would drastically reduce power consumption but I'm a complete novice when using the esp ide. is this something you may be able to implement.

Raspberry Pi Support

Hi there,
awesome work. I would like to play around and implement the BLE Advertisement on a Raspberry Pi. I'm happy to contribute to this project and open up a PR after implementing it successfully (and if it's okay with you)
Cheers
Tamas

Web server for accessing location data from a web gui

Since there can't be an iPhone app, could there be a web server option to access the data from a web gui, and not just the local device? It's a little frustrating that the Openhaystack app only works on the device that it's installed on. A web server could also open the opportunity to access the location of the lost item remotely. Let me know if y'all would consider this.

Edit: I just realized you can import/export configuration. But my goal isn't to access it on another computer, it's to be able to access it on my iPhone remotely. That's where the web gui would come in handy.

nRF51822 firmware and static key

Hi, i don't understand what this means in the real-world usage.
"Note that the firmware is just a proof-of-concept and currently only implements advertising a single static key. This means that devices running this firmware are trackable by other devices in proximity."
What should be implemented to be more like the "Apple AirTags" that should be launched soon?
Thank you

ESP32 AirTag-like board hardware requirements

Hi all, since I haven't seen any type of esp32 based boards by the usual suspects (ttgo, lilygo, lolin) that would fit my personal requirements for an AirTag-like board my question is: What board are you guys using beyond development-boards?

Technically it could just come in the form of a battery holder that routes out the programming header from a micro32 board.

My ideal board would:

  • run on CR2032 (maybe larger) cell
    • No WiFi RF startup shouldn't be a problem
    • Not sure how long the cell can provide up to 2.5V under load
  • be based on
    • led-less micro esp32 module LilyGo Micro 32 comes to mind
    • OR esp32 directly on board (much more effort to design specific board)
  • ADC for voltage readout
  • have header or test-pads (VCC, GND, IO0, TX, RX) to connect to programming base

Since this is not much, I am sure I forgot a lot... What do you guys think? Any dev board out there I am missing (round design? battery management included?)

Thanks for any ideas 😊

flashing native nrf51822 beacon

Hi,
the recent version of the app allows now to either flash a microbic or ESP23. To flash any other nrf51822-based hardware you need to use additional programming software like "openocd" and a programming dongle like the "st-link v2". If you want to use the existing OpenHaystack.app/Contents/Resources/firmware.bin instead of compiling the whole app, you need to use a hex-editor like "0xED" or good old "sed" to replace the string "OFFLINEFINDINGPUBLICKEYHERE!οΏ½" in the file firmware.bin. Could you please give an example of how to get, format and place that key in the firmware.bin?
Thanks

Apple Mail is Crashing when OpenHaystack App is active

Describe the bug
After enabling plugin, If I launch OpenHaystack App with Mail opened (or vice versa) Mail crashes

To Reproduce
Steps to reproduce the behavior:

  1. Launch Mail
  2. Launch OpenHaystack

Expected behavior
Mail not crashing

Screenshots
Screenshot 2021-06-29 at 16 37 41

OpenHaystack version:
OpenHaystack Version 0.3.7 (1)

macOS version:
Mail Version 14.0 (3654.100.0.2.22)
macOS Version 11.4 (20F71) on a MacBook Pro (15-inch, Mid 2012)

Additional context
Crash log attached
mail_crash.txt

No reports generated...

Hi, I really like the work you've done here. Very impressive. I hope reporting my issue can make this project ever more robust.

I've added several devices. Raspberry PI's via HCI and ESP32's via the deploy tool. All are working, and becoming green in the list, but for over two weeks there're still no reports found.

I must say that I'm not leaving home as much because of uncle rona, so maybe only my devices see my haystacks.

By compiling it from source, I see that some calls are erroring:

Error Domain=NSURLErrorDomain Code=-1012 "(null)" UserInfo={NSErrorFailingURLStringKey=https://gateway.icloud.com/acsnservice/fetch, NSUnderlyingError=0x600001b4c1b0 {Error Domain=kCFErrorDomainCFNetwork Code=-1012 "(null)" UserInfo={_kCFURLErrorAuthFailedResponseKey=<NSHTTPURLResponse: 0x6000014ea300> { URL: https://gateway.icloud.com/acsnservice/fetch } { Status Code: 401, Headers {
    "Apple-Originating-System" =     (
        UnknownOriginatingSystem
    );
    Connection =     (
        "keep-alive"
    );
    "Content-Length" =     (
        0
    );
    Date =     (
        "Mon, 26 Apr 2021 09:21:50 GMT"
    );
    Server =     (
    	[REDACTED]
    );
    "Strict-Transport-Security" =     (
    	[REDACTED]
    );
    Via =     (
    	[REDACTED]
    );
    "Www-Authenticate" =     (
    	[REDACTED]
    );
    "X-Apple-Edge-Response-Time" =     (
    	[REDACTED]
    );
    "X-Apple-Jingle-Correlation-Key" =     (
    	[REDACTED]
    );
    "X-Apple-Request-UUID" =     (
    	[REDACTED]
    );
    "X-Responding-Instance" =     (
    	[REDACTED]
    );
    "access-control-expose-headers" =     (
    	[REDACTED]
    );
    "apple-seq" =     (
    	[REDACTED]
    );
    "apple-tk" =     (
    	[REDACTED]
    );
} }}}, NSErrorFailingURLKey=https://gateway.icloud.com/acsnservice/fetch}
Failed with error dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "The given data was not valid JSON.", underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 "No value." UserInfo={NSDebugDescription=No value.})))
Finished loading the reports. Now decrypt them
Decrypting reports

To Reproduce
Steps to reproduce the behavior:

  1. Add new device
  2. Deploy device and/or configure HCI
  3. Mark as deployed
  4. Wait....

Expected behavior
See reports after some time

Screenshots
Schermafbeelding 2021-04-26 om 11 14 47

OpenHaystack version:
0.3.6

macOS version:
11.2.3 (20D91)

Aliexpress nRF51822 beacon support

From reading #20 it seems I could use this on the Aliexpress nRF51822 beacon chips by simply taking the existing firmware.bin and replacing the string with the advertisement key.

Could this process be added to the app which could then just dump the patched firmware somewhere to manually flash?
I'm still awaiting my ST-link v2 to arrive for the actual flashing process so haven't tested things yet but the form factor of the nRF51822 chips is perfect for this application.

PuckJS Firmware

I ported the firmware to the PuckJS (https://www.puck-js.com/)

function AirTag(pk) {
  var ad = [
    0x1e, /* Length (30) */
    0xff, /* Manufacturer Specific Data (type 0xff) */
    0x4c, 0x00, /* Company ID (Apple) */
    0x12, 0x19, /* Offline Finding type and length */
    0x00, /* State */
    pk[6], pk[7], pk[8], pk[9], pk[10], pk[11], pk[12], pk[13], 
    pk[14], pk[15], pk[16], pk[17], pk[18], pk[19], pk[20], pk[21], 
    pk[22], pk[23], pk[24], pk[25], pk[26], pk[27],
    0x00, /* First two bits */
    0x00, /* Hint (0x00) */
  ];
  ad[29] = pk[0] >> 6;

  const addr = [
    pk[0], pk[1], pk[2], pk[3], pk[4], pk[5]
  ];

  addr[0] |= 0xC0;

  const s = addr
    .map(x => x.toString(0x10).padStart(2, '0'))
    .join(':')
  
  return {
    Ad: [].slice.call(ad),
    Address: s + " random",
  };
};

const public_key = [
  0xbf, 0x44, 0x1f, 0xa2, 0x44, 0x40, 0x70, 0x65, 0x24, 0xe4, 0x0f, 0x5b,
  0x4b, 0xc0, 0xd1, 0x8e, 0x40, 0x98, 0xe4, 0x6f, 0xa6, 0xd5, 0xd4, 0x14,
  0x0a, 0xfe, 0xa8, 0x05
];

const airtag = AirTag(public_key);

NRF.setAddress(airtag.Address);

NRF.setAdvertising([
  airtag.Ad,
  {} // this will add a 'normal' advertising packet showing name/etc  
], {interval:100});

Apple Mail App: enable "Manage plug-ins" button

Is your feature request related to a problem? Please describe.
I was following the README.md(Installation) and was unable to activate the plugin because plug-ings button is not enabled in apple mail app.
image

Describe the solution you'd like
Maybe the README.md(Installation) can have some notes how to enable the "Plug-ins" button:

sudo defaults write "/Library/Preferences/com.apple.mail" EnableBundles 1

Then restart the Mail app:
image

Firmware for the esp32

Does anyone have a version of this that can run on an esp32, either via a native image or via an arduino sketch?

Power consumption during trakking

How many Power need the BBC when trakking ?

3V Battery Pack take how many Time ?
And how often take the BBC send the Signal out ? Instantly or 30 min or 1 hour or ever when other IOS Device "Ping" it takes a "Pong" ?!

Big Thanks for the Project and Help.

Add "cleanup" to the deployment script

Is your feature request related to a problem? Please describe.
If you try to deploy firmware with ./Firmware/ESP32/flash_esp32.sh
and it fails, you need to remove tmp.key file manually before you can run the script again.

Describe the solution you'd like
I would like to have a kind of "cleanup" in ./Firmware/ESP32/flash_esp32.sh:

cleanup() {
    echo "cleanup ..."
    rm -v "$KEYFILE"
}
...
set -e
trap cleanup INT TERM EXIT
...

Question: Blessed dependencies

Hi! Just learned that BLESSED has dependencies on Segger's JLink software, nrftool and Nordic NRF51 SDK. How these dependencies (some of them requires paid licenses) affect flashing micro:bit with OpenHaystack Firmware for nRF51822?

Deploy for ESP32 with version 0.37 not working

Describe the bug
With the latest precompiled version (0.37) of OpenHayStack deploy to ESP32 does not work. After selecting the correct port for the ESP32, OpenHayStack directly shows me the error message:
"Could not deploy
Deploying to microbit failed. Please reconnect the device over USB"

With version 0.36 everything works as expected.

OpenHaystack version:
0.37 (pre compiled)

macOS version:
11.3.1

Additional context
Add any other context about the problem here.

Manage Plugins button not visible

If "Open Apple Mail. Go to Preferences β†’ General β†’ Manage Plug-Ins... and activate the checkbox next to OpenHaystackMail.mailbundle. "

won't work due to missing Button Manage Plugins

sudo defaults write β€œ/Library/Preferences/com.apple.mail” EnableBundles 1 defaults write com.apple.mail EnableBundles -bool true defaults write com.apple.mail BundleCompatibilityVersion 4

https://help.mailbutler.io/help/manage-plug-ins-button-is-gone-from-apple-mail

error when flashing esp32

ESP32 % ./flash_esp32.sh -p /dev/cu.usbserial-0001 "yaAusUDjMLRkXaRqZ0TLTvWeM9cbW3fdCtxnQD/xySI="
esptool.py v3.0
Found 2 serial ports
Serial port /dev/cu.usbserial-0001
Connecting........_
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: ac:67:b2:36:9c:ac
Uploading stub...
Running stub...
Stub running...
Erasing region (may be slow depending on size)...
Erase completed successfully in 0.1 seconds.
Staying in bootloader.
esptool.py v3.0
Found 2 serial ports
Serial port /dev/cu.usbserial-0001
Connecting......................................_____
/dev/cu.usbserial-0001 failed to connect: Failed to connect to Espressif device: Timed out waiting for packet header
Serial port /dev/cu.Bluetooth-Incoming-Port
Connecting......................................_____
/dev/cu.Bluetooth-Incoming-Port failed to connect: Failed to connect to Espressif device: Timed out waiting for packet header

A fatal error occurred: Could not connect to an Espressif device on any of the 2 available serial ports.
cleanup ...

This is the error I get and idk what to do any advice would be appreciated

Add troubleshooting / debug information

Due to the fact that the process consists of several steps, it is hard to find out what is broken:
broadcast - upload - download.

Example:
Status "no reports found"
...flashed 2x ESP32 - They can be found as bluetooth device(BT scanner), but do not provide any log info on the serial connection.
...installed the Mail.app plugin, but since I have no working device it is hard to verify if the plugin is retrieving correct.

Is it possible to have an indicator "Mail.app plugin connection OK" ?
Is it possible to verify if a device is already known at Apple's Servers?

By now it is only possible to verify the console: (filtered by Process== OpenHaystack)
Where that NSURLErrorDomain error can be found, but how to find out if that "Berlin" is OK - or should be "Vienna" in my case?

	standard	11:46:28.930936+0100	Requesting data for (
    "5le8H/6goDaqDDW9lAEmh1xw3LfO7wprwQ1lVf5PtAY="
)	OpenHaystack
	standard	11:46:28.931047+0100	Query : {
    search =     (
                {
            endDate = 1615459588930;
            ids =             (
                "5le8H/6goDaqDDW9lAEmh1xw3LfO7wprwQ1lVf5PtAY="
            );
            startDate = 1613645188930;
        }
    );
}	OpenHaystack
com.apple.securityd	standard	11:46:28.932385+0100	UNIX error exception: 17	OpenHaystack
com.apple.securityd	standard	11:46:28.935303+0100	UNIX error exception: 17	OpenHaystack
	standard	11:46:28.985368+0100	Headers:
{
    Accept = "application/json";
    Authorization = "Basic MTE0OTgzODE1OTk6RUFBSkFBQUFCTHdJQUFBQUFHQkk4bmtSRG1kekxtbGpiRzkxWkM1aGRYUm92UURiWmoxcG1pbGY5cFBXMlhUMW9kQ0dER3BhYm1hUnlwOGk5WlN4NDJNY0xBLWp1aVdlSTVEU0FENkNSNm4zcW1UWlZRVGdTYmdsbU1lTXNfc25XN2VqOUcxWEJyallDT2NIUDljNVpWcGR5UEF4NXZpQ3ZYZkpNZ1BjamxCZTVxWWozMEE1UU9JNWwxR09ZTFcyV1cwX2p0UTBPZ35+";
    "Content-Type" = "application/json";
    "X-Apple-I-Client-Time" = "2021-03-11T10:46:28Z";
    "X-Apple-I-MD" = "AAAABQAAABBjePJUpnnQ/EgLRmJlq8T2AAAAAQ==";
    "X-Apple-I-MD-M" = "dniIKdtJ9l01TbcG7rpxDfz18zdt4f9jop9faphccmhdPt819agG0tCFOTbBE/xaC3G1j4UcW3Uxq31F";
    "X-Apple-I-MD-RINFO" = 17106176;
    "X-Apple-I-TimeZone" = CET;
}	OpenHaystack
com.apple.CFNetwork	standard	11:46:28.985872+0100	Task <B615A893-BC2C-4DBD-81DC-FE540D1C909D>.<0> {strength 1, tls 8, ct 0, sub 0, sig 0, ciphers 1, bundle 0, builtin 0}	OpenHaystack
	standard	11:46:28.986140+0100	Connection 17: enabling TLS	OpenHaystack
	standard	11:46:28.986160+0100	Connection 17: starting, TC(0x0)	OpenHaystack
com.apple.network	standard	11:46:28.986182+0100	[C17 F98C71D1-7DDC-4D5B-BCE2-505AC577778F gateway.icloud.com:443 tcp, url hash: 440ac18c, tls, context: com.apple.CFNetwork.NSURLSession.{2ED42E76-C3B9-4DE3-BC3C-774E8312E85A}{(null)}{Y}{2}, proc: 8EFF089C-D52A-3950-B598-8A3ADB7EF06C] start	OpenHaystack
com.apple.network	standard	11:46:28.986219+0100	[C17 gateway.icloud.com:443 initial path ((null))] event: path:start @0.000s	OpenHaystack
com.apple.network	standard	11:46:28.986366+0100	[C17 gateway.icloud.com:443 waiting path (satisfied (Path is satisfied), interface: en7, ipv4, dns)] event: path:satisfied @0.000s, uuid: AB6E1AAC-DCAE-4ABC-8212-6A885760EBCD	OpenHaystack
com.apple.network	standard	11:46:28.986435+0100	[C17 gateway.icloud.com:443 in_progress resolver (satisfied (Path is satisfied), interface: en7, ipv4, dns)] event: resolver:start_dns @0.000s	OpenHaystack
com.apple.network	standard	11:46:28.986450+0100	nw_connection_report_state_with_handler_on_nw_queue [C17] reporting state preparing	OpenHaystack
	standard	11:46:28.986531+0100	Task <B615A893-BC2C-4DBD-81DC-FE540D1C909D>.<0> setting up Connection 17	OpenHaystack
com.apple.network	standard	11:46:29.042970+0100	[C17 gateway.icloud.com:443 in_progress resolver (satisfied (Path is satisfied), interface: en7, ipv4, dns)] event: resolver:receive_dns @0.056s	OpenHaystack
com.apple.network	standard	11:46:29.043111+0100	[C17.1 17.248.147.141:443 initial path ((null))] event: path:start @0.056s	OpenHaystack
com.apple.network	standard	11:46:29.043390+0100	[C17.1 17.248.147.141:443 waiting path (satisfied (Path is satisfied), interface: en7, ipv4, dns)] event: path:satisfied @0.057s, uuid: 9690C1B3-9DAC-4E33-A53C-24822AE7E97D	OpenHaystack
com.apple.network	standard	11:46:29.043842+0100	[C17.1 17.248.147.141:443 in_progress socket-flow (satisfied (Path is satisfied), interface: en7, ipv4, dns)] event: flow:start_connect @0.057s	OpenHaystack
com.apple.network	standard	11:46:29.089670+0100	[C17 gateway.icloud.com:443 in_progress resolver (satisfied (Path is satisfied), interface: en7, ipv4, dns)] event: resolver:receive_dns @0.103s	OpenHaystack
com.apple.network	standard	11:46:29.100735+0100	[C17 gateway.icloud.com:443 in_progress resolver (satisfied (Path is satisfied), interface: en7, ipv4, dns)] event: resolver:receive_dns @0.114s	OpenHaystack
com.apple.network	standard	11:46:29.100771+0100	nw_socket_handle_socket_event [C17.1:3] Socket received CONNECTED event	OpenHaystack
com.apple.network	standard	11:46:29.100841+0100	nw_flow_connected [C17.1 17.248.147.141:443 in_progress socket-flow (satisfied (Path is satisfied), viable, interface: en7, ipv4, dns)] Transport protocol connected	OpenHaystack
com.apple.network	standard	11:46:29.100903+0100	[C17.1 17.248.147.141:443 in_progress socket-flow (satisfied (Path is satisfied), viable, interface: en7, ipv4, dns)] event: flow:finish_transport @0.114s	OpenHaystack
com.apple.network	standard	11:46:29.100954+0100	[C17 gateway.icloud.com:443 in_progress resolver (satisfied (Path is satisfied), interface: en7, ipv4, dns)] event: flow:finish_transport @0.114s	OpenHaystack
com.apple.network	standard	11:46:29.101550+0100	boringssl_session_apply_protocol_options_for_transport_block_invoke(1689) [C17.1:2][0x7fd9f37939d0] TLS configured [min_version(0x0303) max_version(0x0304) name(<private>) tickets(false) false_start(false) enforce_ev(false) enforce_ats(false)]	OpenHaystack
com.apple.network	standard	11:46:29.101675+0100	boringssl_context_info_handler(1821) [C17.1:2][0x7fd9f37939d0] Client handshake started	OpenHaystack
com.apple.network	standard	11:46:29.101785+0100	boringssl_context_info_handler(1836) [C17.1:2][0x7fd9f37939d0] Client handshake state: TLS client enter_early_data	OpenHaystack
com.apple.network	standard	11:46:29.101953+0100	boringssl_context_info_handler(1836) [C17.1:2][0x7fd9f37939d0] Client handshake state: TLS client read_server_hello	OpenHaystack
com.apple.network	standard	11:46:29.146291+0100	boringssl_context_info_handler(1836) [C17.1:2][0x7fd9f37939d0] Client handshake state: TLS 1.3 client read_hello_retry_request	OpenHaystack
com.apple.network	standard	11:46:29.146353+0100	boringssl_context_info_handler(1836) [C17.1:2][0x7fd9f37939d0] Client handshake state: TLS 1.3 client read_server_hello	OpenHaystack
com.apple.network	standard	11:46:29.146619+0100	boringssl_context_info_handler(1836) [C17.1:2][0x7fd9f37939d0] Client handshake state: TLS 1.3 client read_encrypted_extensions	OpenHaystack
com.apple.network	standard	11:46:29.146914+0100	boringssl_context_info_handler(1836) [C17.1:2][0x7fd9f37939d0] Client handshake state: TLS 1.3 client read_certificate_request	OpenHaystack
com.apple.network	standard	11:46:29.158684+0100	boringssl_context_info_handler(1836) [C17.1:2][0x7fd9f37939d0] Client handshake state: TLS 1.3 client read_server_certificate	OpenHaystack
com.apple.network	standard	11:46:29.158844+0100	boringssl_context_info_handler(1836) [C17.1:2][0x7fd9f37939d0] Client handshake state: TLS 1.3 client read_server_certificate_verify	OpenHaystack
com.apple.network	standard	11:46:29.159559+0100	boringssl_context_evaluate_trust_async(1510) [C17.1:2][0x7fd9f37939d0] Performing external trust evaluation	OpenHaystack
com.apple.network	standard	11:46:29.159710+0100	boringssl_context_evaluate_trust_async_external(1495) [C17.1:2][0x7fd9f37939d0] Asyncing for external verify block	OpenHaystack
	standard	11:46:29.159877+0100	Connection 17: asked to evaluate TLS Trust	OpenHaystack
	standard	11:46:29.166486+0100	System Trust Evaluation yielded status(0)	OpenHaystack
	standard	11:46:29.172389+0100	Connection 17: TLS Trust result 0	OpenHaystack
com.apple.network	standard	11:46:29.172410+0100	boringssl_context_evaluate_trust_async_external_block_invoke_3(1451) [C17.1:2][0x7fd9f37939d0] Returning from external verify block with result: true	OpenHaystack
com.apple.network	standard	11:46:29.172451+0100	boringssl_context_certificate_verify_callback(1609) [C17.1:2][0x7fd9f37939d0] Certificate verification result: OK	OpenHaystack
com.apple.network	standard	11:46:29.172741+0100	boringssl_context_info_handler(1836) [C17.1:2][0x7fd9f37939d0] Client handshake state: TLS 1.3 client read_server_finished	OpenHaystack
com.apple.network	standard	11:46:29.172878+0100	boringssl_context_info_handler(1836) [C17.1:2][0x7fd9f37939d0] Client handshake state: TLS 1.3 client send_end_of_early_data	OpenHaystack
com.apple.network	standard	11:46:29.172897+0100	boringssl_context_info_handler(1836) [C17.1:2][0x7fd9f37939d0] Client handshake state: TLS 1.3 client send_client_certificate	OpenHaystack
com.apple.network	standard	11:46:29.172911+0100	boringssl_context_info_handler(1836) [C17.1:2][0x7fd9f37939d0] Client handshake state: TLS 1.3 client complete_second_flight	OpenHaystack
com.apple.network	standard	11:46:29.172974+0100	boringssl_context_info_handler(1836) [C17.1:2][0x7fd9f37939d0] Client handshake state: TLS 1.3 client done	OpenHaystack
com.apple.network	standard	11:46:29.173074+0100	boringssl_context_info_handler(1836) [C17.1:2][0x7fd9f37939d0] Client handshake state: TLS client finish_client_handshake	OpenHaystack
com.apple.network	standard	11:46:29.173096+0100	boringssl_context_info_handler(1836) [C17.1:2][0x7fd9f37939d0] Client handshake state: TLS client done	OpenHaystack
com.apple.network	standard	11:46:29.173177+0100	boringssl_context_info_handler(1826) [C17.1:2][0x7fd9f37939d0] Client handshake done	OpenHaystack
com.apple.network	standard	11:46:29.173537+0100	nw_protocol_boringssl_signal_connected(734) [C17.1:2][0x7fd9f37939d0] TLS connected [version(0x0304) ciphersuite(TLS_AES_128_GCM_SHA256) group(0x001d) signature_alg(0x0403) alpn(http/1.1) resumed(0) offered_ticket(0) false_started(0) ocsp_received(1) sct_received(0) connect_time(72ms) flight_time(45ms) rtt(22ms) write_stalls(0) read_stalls(3)]	OpenHaystack
com.apple.network	standard	11:46:29.173656+0100	nw_flow_connected [C17.1 17.248.147.141:443 in_progress socket-flow (satisfied (Path is satisfied), viable, interface: en7, ipv4, dns)] Output protocol connected	OpenHaystack
com.apple.network	standard	11:46:29.173837+0100	[C17.1 17.248.147.141:443 ready socket-flow (satisfied (Path is satisfied), viable, interface: en7, ipv4, dns)] event: flow:finish_connect @0.187s	OpenHaystack
com.apple.network	standard	11:46:29.174016+0100	nw_connection_report_state_with_handler_on_nw_queue [C17] reporting state ready	OpenHaystack
com.apple.network	standard	11:46:29.174082+0100	[C17 gateway.icloud.com:443 ready resolver (satisfied (Path is satisfied), interface: en7, ipv4, dns)] event: flow:finish_connect @0.187s	OpenHaystack
com.apple.network	standard	11:46:29.174154+0100	[C17.1 17.248.147.141:443 ready socket-flow (satisfied (Path is satisfied), viable, interface: en7, ipv4, dns)] event: flow:changed_viability @0.187s	OpenHaystack
com.apple.network	standard	11:46:29.174181+0100	[C17 gateway.icloud.com:443 ready resolver (satisfied (Path is satisfied), interface: en7, ipv4, dns)] event: flow:changed_viability @0.187s	OpenHaystack
	standard	11:46:29.174249+0100	Connection 17: connected successfully	OpenHaystack
	standard	11:46:29.174278+0100	Connection 17: TLS handshake complete	OpenHaystack
	standard	11:46:29.174453+0100	Connection 17: ready C(N) E(N)	OpenHaystack
	standard	11:46:29.174613+0100	Task <B615A893-BC2C-4DBD-81DC-FE540D1C909D>.<0> now using Connection 17	OpenHaystack
	standard	11:46:29.174752+0100	Connection 17: received viability advisory(Y)	OpenHaystack
	standard	11:46:29.174999+0100	Task <B615A893-BC2C-4DBD-81DC-FE540D1C909D>.<0> sent request, body D 124	OpenHaystack
	standard	11:46:29.401104+0100	Task <B615A893-BC2C-4DBD-81DC-FE540D1C909D>.<0> received response, status 401 content K	OpenHaystack
	standard	11:46:29.401552+0100	Task <B615A893-BC2C-4DBD-81DC-FE540D1C909D>.<0> done using Connection 17	OpenHaystack
com.apple.CFNetwork	standard	11:46:29.401690+0100	Task <B615A893-BC2C-4DBD-81DC-FE540D1C909D>.<0> summary for auth challenge {transaction_duration_ms=416, response_status=401, connection=17, protocol="http/1.1", domain_lookup_duration_ms=56, connect_duration_ms=130, secure_connection_duration_ms=72, request_start_ms=189, request_duration_ms=0, response_start_ms=415, response_duration_ms=0, request_bytes=973, response_bytes=859, cache_hit=0}	OpenHaystack
	standard	11:46:29.401833+0100	Task <B615A893-BC2C-4DBD-81DC-FE540D1C909D>.<0> now using Connection 17	OpenHaystack
	standard	11:46:29.402108+0100	Task <B615A893-BC2C-4DBD-81DC-FE540D1C909D>.<0> sent request, body D 124	OpenHaystack
	standard	11:46:29.644777+0100	Task <B615A893-BC2C-4DBD-81DC-FE540D1C909D>.<0> received response, status 401 content K	OpenHaystack
	standard	11:46:29.644907+0100	Task <B615A893-BC2C-4DBD-81DC-FE540D1C909D>.<0> response ended	OpenHaystack
	standard	11:46:29.644961+0100	Task <B615A893-BC2C-4DBD-81DC-FE540D1C909D>.<0> done using Connection 17	OpenHaystack
com.apple.CFNetwork	standard	11:46:29.645076+0100	Task <B615A893-BC2C-4DBD-81DC-FE540D1C909D>.<0> summary for task success {transaction_duration_ms=243, response_status=401, connection=17, reused=1, request_start_ms=0, request_duration_ms=0, response_start_ms=242, response_duration_ms=0, request_bytes=973, response_bytes=859, cache_hit=0}	OpenHaystack
	standard	11:46:29.645342+0100	Error during request: 

Error Domain=NSURLErrorDomain Code=-1012 "(null)" UserInfo={NSErrorFailingURLStringKey=https://gateway.icloud.com/acsnservice/fetch, NSUnderlyingError=0x6000033225b0 {Error Domain=kCFErrorDomainCFNetwork Code=-1012 "(null)" UserInfo={_kCFURLErrorAuthFailedResponseKey=<NSHTTPURLResponse: 0x600003c99c40> { URL: https://gateway.icloud.com/acsnservice/fetch } { Status Code: 401, Headers {
    "Apple-Originating-System" =     (
        UnknownOriginatingSystem
    );
    Connection =     (
        "keep-alive"
    );
    "Content-Length" =     (
        0
    );
    Date =     (
        "Thu, 11 Mar 2021 10:46:29 GMT"
    );
    Server =     (
        "AppleHttpServer/4b0f4e40276cabbbae998f715d1fd1336e7478a2"
    );
    "Strict-Transport-Security" =     (
        "max-age=31536000; includeSubDomains;"
    );
    Via =     (
        "xrail:st53p00ic-qujn12070302.me.com:8301:20D277:grp60,631194250daa17e24277dea86cf30319:d7eedfa27549881027b210646fdd275e:Berlin"
    );
    "Www-Authenticate" =     (
        "	OpenHaystack

Compatibility with Apple's Find My app.

Awesome project!

I was just wondering, now that Apple has released the 'Items' tab in the Find My app, does this project work with it or could it be made compatible?

Tracking on non-Macs

Problem
The problem: it's limiting to not be able to track things on non-Mac computers.

Solution
Reverse-engineer either the local Find My API or the Find My web app and allow for tracking on non-Macs

Alternatives

  • Host a macOS server to track stuff. If not self hosted it allows whoever hosts it to access private information. I believe this was discussed earlier
  • Upload the keys to Apple somehow and use the web Find My App to do this. May require temporarily disabling SIP, or possibly it's possible to use the Mail-app entitlement route to upload it.

Additional context
I understand that this is an long term goal and that either way it's easier said then done. It may be worthwhile to try seeing how auth is done for the Find My web app and then MITM'ing the connection to see how it requests the location.

M5StickC support

Hi,
I own an M5stickC that as you may know is an ESP32 with a little LCD,a battery and many sensors installed that should make a tag very interesting.
I successfully deployed manually on my MacOS your Firmware for ESP32 on my M5stickC, I added also an espressif-components during build for some specific support (enabling Led blinking when tag is in use) and I'll carry on deploying some other features for my M5 (printing Infos on LCD as battery status or something useful).
Do you think to support M5 hardware on a future release?

Add device name

Is your feature request related to a problem? Please describe.
I would like to see the name of the BLE device when discovering with some BLE discovering tools (e.g. BlueSee)

Describe the solution you'd like
Add device name to adv data?

static uint8_t adv_data[31] = {

I tried to put the name with the esp_ble_gap_set_device_name function before

if ((esp_ble_gap_config_adv_data_raw((uint8_t*)&adv_data, sizeof(adv_data))) != ESP_OK) {

the function returns no error, but the device name is still not appear in the discovery tools :-/

Curious about the finding device

I use a similar method to track my apple watch aka myself for automations, whats the fastest response time when detecting a device such as an apple watch?

Private keys of regular devices

I’m trying to use a public key from one of the devices currently registered on Find My App. This way I could create a tag that should appear as one of my Macs. According to the docs the private key should be on the iCloud Keychain but I’m unable to find it.
Does anybody knows where is it and how can I export it?
Thanks!

Flash common Aliexpress nRF51822

Hi, i was wondering what i need to flash pre built nRF51822 chips that can be found on alixpress.
I have a few of these laying around home for a little project and it would be awsome to use them as trackers.

Item: https://it.aliexpress.com/item/32885909449.html

Does anyone know what tool i need and how to mount them as volumes so i can copy the file like the microbit tutorial?

Alternative firmware

I just created an alternative firmware that is compatible with both nRF51 and nRF52 platforms. It's using the Softdevice S130/S132 2.0.0 from Nordic SDK11.

I already tried it on this modules:

More info here:
https://github.com/acalatrava/openhaystack-firmware/tree/main/apps/openhaystack-alternative

XPC error Connection interrupted -- no more location reports

Describe the bug
I have been running a Linux HCI (RPi4), where it all worked fine for the last two days, but today without any changes I'm no longer getting reports. A compiled version returns the following error after some time:

2021-06-09 12:09:10.310815+0200 OpenHaystack[44195:2477240]
Received XPC error Connection interrupted for message type 3 kCFNetworkAgentXPCMessageTypePACQuery

It does not look similar to #51 , but it could be similar. The up-right dot is always green to me, but the dot at the device box is orange (if that helps).

To Reproduce
Steps to reproduce the behavior:

  1. Install and run OpenHaystack following README instructions
  2. Deploy a Linux HCI
  3. See error on terminal

Expected behavior
Continue getting location reports, as nothing changed (i.e., device is still running, there are iPhones around).

Screenshots
openhaystack_error

OpenHaystack version:
0.3.7

macOS version:
11.4

Deploy firmware on ESP32 fails

I would like to ask for help, If I run ./flash_esp32.sh -p /dev/cu.usbserial-0001 "my public key in base64",
I got:

esptool.py v3.0
Found 4 serial ports
Serial port /dev/cu.usbserial-0001
Connecting........__
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: XXXXXXXXX
Uploading stub...
Running stub...
Stub running...
Erasing region (may be slow depending on size)...
Erase completed successfully in 0.1 seconds.
Staying in bootloader.
esptool.py v3.0
Found 4 serial ports
Serial port /dev/cu.usbserial-0001
Connecting........_____....._____....._____....._____....._____....._____....._____
/dev/cu.usbserial-0001 failed to connect: Failed to connect to Espressif device: Timed out waiting for packet header```

As I understand "erasing" of the device works fine, but then "writing" fails. Am I missing something?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.