{"id":24208372,"url":"https://github.com/hybridgroup/go-haystack","last_synced_at":"2026-10-19T12:41:00.130Z","repository":{"id":271727168,"uuid":"914381428","full_name":"hybridgroup/go-haystack","owner":"hybridgroup","description":"Track personal Bluetooth devices via Apple's \"Find My\" network using OpenHaystack and Macless-Haystack with tools written in Go/TinyGo. No Apple hardware required! Build your own beacon using Xiao-BLE, ESP32-C3/S3, \u0026 many other boards.","archived":false,"fork":false,"pushed_at":"2026-10-13T19:24:52.000Z","size":1947,"stargazers_count":1529,"open_issues_count":3,"forks_count":49,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-10-15T01:36:42.241Z","etag":null,"topics":["airtag","bluetooth","esp32-c3","esp32-s3","find-my","findmy","golang","linux","nrf52","nrf52840","openhaystack","pico-w","tinygo"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hybridgroup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-09T13:40:45.000Z","updated_at":"2026-10-14T22:35:58.000Z","dependencies_parsed_at":"2025-01-09T14:56:30.058Z","dependency_job_id":"1d697c9d-3044-4964-ae61-5e740d84f15e","html_url":"https://github.com/hybridgroup/go-haystack","commit_stats":null,"previous_names":["hybridgroup/go-haystack"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hybridgroup/go-haystack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hybridgroup%2Fgo-haystack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hybridgroup%2Fgo-haystack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hybridgroup%2Fgo-haystack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hybridgroup%2Fgo-haystack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hybridgroup","download_url":"https://codeload.github.com/hybridgroup/go-haystack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hybridgroup%2Fgo-haystack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38356471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-19T02:00:06.414Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["airtag","bluetooth","esp32-c3","esp32-s3","find-my","findmy","golang","linux","nrf52","nrf52840","openhaystack","pico-w","tinygo"],"created_at":"2025-01-14T01:01:56.309Z","updated_at":"2026-10-19T12:41:00.125Z","avatar_url":"https://github.com/hybridgroup.png","language":"Go","funding_links":[],"categories":["Wireless Communication","Go"],"sub_categories":["WASI and WASM Unknown"],"readme":"# go-haystack\n\n[![CI](https://github.com/hybridgroup/go-haystack/actions/workflows/ci.yml/badge.svg)](https://github.com/hybridgroup/go-haystack/actions/workflows/ci.yml)\n\n![Go Haystack gopher](./images/go-haystack.png)\n\nGo Haystack lets you track personal Bluetooth devices via Apple's massive [\"Find My\"](https://developer.apple.com/find-my/) network.\n\nIt uses [OpenHaystack](https://github.com/seemoo-lab/openhaystack) together with [Macless-Haystack](https://github.com/dchristl/macless-haystack) to help you setup a custom FindMy network with tools written in Go/TinyGo. No Apple hardware required!\n\n![image of macless-haystack web UI](./images/macless-haystack.png)\n\n## Contents\n\n- [Build Your Own Beacon](#build-your-own-beacon)\n- [Linux Beacons](#linux-beacons)\n- [TinyScan](#tinyscan)\n- [How to install](#how-to-install)\n- [How to use](#how-to-use)\n- [How to test](#how-to-test)\n- [Keys](./KEYS.md)\n- [Testing](./TESTING.md)\n- [Firmware](./firmware/README.md)\n- [TinyScan hardware](./tinyscan/README.md)\n\n## Build Your Own Beacon\n\nThis package provides firmware written using [TinyGo](https://tinygo.org/) and the [TinyGo Bluetooth package](https://github.com/tinygo-org/bluetooth).\n\n![tinygo beacons](./images/tinygo-beacons.jpg)\n\nAs a result, any of the following hardware devices should work:\n\n- [Adafruit Bluefruit boards using nRF SoftDevice](https://github.com/tinygo-org/bluetooth?tab=readme-ov-file#adafruit-bluefruit-boards)\n- [BBC Microbit using nRF SoftDevice](https://github.com/tinygo-org/bluetooth?tab=readme-ov-file#bbc-microbit)\n- [Seeed Studio XIAO nRF52840](https://wiki.seeedstudio.com/XIAO_BLE)\n- [Other Nordic Semi SoftDevice boards](https://github.com/tinygo-org/bluetooth?tab=readme-ov-file#flashing-the-softdevice-on-other-boards)\n- [Boards using the NINA-FW with an ESP32 co-processor](https://github.com/tinygo-org/bluetooth?tab=readme-ov-file#esp32-nina)\n- [Espressif ESP32-C3 and ESP32-S3 boards that use the radio in the chip](https://github.com/tinygo-org/bluetooth?tab=readme-ov-file#esp32-c3-and-esp32-s3-espradio), such as the Seeed XIAO ESP32C3 and the XIAO ESP32S3. The targets are `xiao-esp32c3`, `xiao-esp32s3`, `esp32c3-supermini`, `esp32s3-supermini`, `esp32c3-generic`, `esp32s3-generic`, `qtpy-esp32c3` and `m5stamp-c3`. These boards need TinyGo 0.42 or later.\n- [Boards such as the RP2040 Pico-W using the CYW43439 co-processor](https://github.com/tinygo-org/bluetooth?tab=readme-ov-file#cyw43439-rp2040-w)\n\nThe beacon code is located in this repository in the [firmware](./firmware/) directory.\n\n## Linux Beacons\n\nYou can also run the beacon code on any Linux that has Bluetooth hardware, such as a Raspberry Pi or other embedded system.\n\nThe beacon code is the same for embedded Linux as for microcontrollers, and is located in this repo in the [firmware](./firmware/) directory.\n\nGive it the keys as one argument, separated by commas, and the time on each key as a\nsecond argument:\n\n```shell\ncd firmware\ngo run . KEY1,KEY2,KEY3 5m\n```\n\nUse the advertisement keys from the `.keys` file of the device. See [Keys](./KEYS.md).\n\n## TinyScan\n\nGo Haystack also includes TinyScan, a hardware scanner for local devices.\n\n![tinyscan](./images/tinyscan.gif)\n\nTinyScan runs on several different microcontrollers boards with Bluetooth and miniature displays, such as those made by [Adafruit](https://www.adafruit.com/) and [Pimoroni](https://shop.pimoroni.com/)\n\nThe TinyScan code is located in the [tinyscan](./tinyscan/) directory in this repository.\n\nTinyScan can also show the names of your own devices. Flash it with the same device\nnames that you used with `haystack keys`, and it then shows the name of the device\nwith a `*` mark instead of the key:\n\n```shell\nhaystack flashscan clue blackgopher redgopher\n```\n\nAdd `-onlymine` to hide every beacon that is not one of your devices. See\n[TinyScan](./tinyscan/README.md#your-own-devices) for more information.\n\n## How to install\n\n### Apple ID\n\nYou must have an Apple-ID with 2FA enabled. Only sms/text message as second factor is supported!\n\n### anisette-v3-server\n\nStart [`anisette-v3-server`](https://github.com/Dadoum/anisette-v3-server)\n\n```bash\ndocker network create mh-network\ndocker run -d --restart always --name anisette -p 6969:6969 --volume anisette-v3_data:/home/Alcoholic/.config/anisette-v3 --network mh-network dadoum/anisette-v3-server\n```\n\n### macless-haystack\n\n1. Start and set up your Macless Haystack endpoint in interactive mode:\n\n```bash\ndocker run -it --restart unless-stopped --name macless-haystack -p 6176:6176 --volume mh_data:/app/endpoint/data --network mh-network christld/macless-haystack\n```\n\n###### You will be asked for your Apple-ID, password and your 2FA. If you see `serving at port 6176 over HTTP` you have all set up correctly\n\nHit ctrl-C to exit the process once it has been configured.\n\n2. Restart the macless-haystack server\n\n```bash\ndocker restart macless-haystack\n```\n\nSee https://github.com/dchristl/macless-haystack/blob/main/README.md#server-setup for the original instructions.\n\n### go-haystack\n\nInstall the go-haystack command line tool\n\n```shell\ngo install github.com/hybridgroup/go-haystack/cmd/haystack@latest\n```\n\n## How to use\n\n### Showing the version\n\n```shell\nhaystack version\n```\n\nReturns the version of the tool, with the revision of the build if it has one:\n\n```\nhaystack 0.2.0-dev (7180716)\n```\n\n### Scanning for local devices\n\n```shell\nhaystack scan\n```\n\nShould return any local devices within range:\n\n```shell\n$ haystack scan                                                                                                             \nCE:8B:AD:5F:8A:02 -53 ce8bad5f8a0271538ff5afda87498cb067e9a020d6e4167801d55d83 - battery full\nFE:B0:67:9B:9A:5C -55 feb0679b9a5c55b1141c5cc6c8f65224ae9bc6bc2d998ccf5c56a02d - battery full\nCE:8B:AD:5F:8A:02 -53 ce8bad5f8a0271538ff5afda87498cb067e9a020d6e4167801d55d83 - battery full\nCE:8B:AD:5F:8A:02 -53 ce8bad5f8a0271538ff5afda87498cb067e9a020d6e4167801d55d83 - battery full\nFE:B0:67:9B:9A:5C -56 feb0679b9a5c55b1141c5cc6c8f65224ae9bc6bc2d998ccf5c56a02d - battery full\nCE:8B:AD:5F:8A:02 -53 ce8bad5f8a0271538ff5afda87498cb067e9a020d6e4167801d55d83 - battery full\nFE:B0:67:9B:9A:5C -56 feb0679b9a5c55b1141c5cc6c8f65224ae9bc6bc2d998ccf5c56a02d - battery full\nCE:8B:AD:5F:8A:02 -53 ce8bad5f8a0271538ff5afda87498cb067e9a020d6e4167801d55d83 - battery full\n```\n\n### Adding a new device\n\n1. Generate keys for a device\n\n```shell\nhaystack keys DEVICENAME\n```\n\nThe keys will be saved in a file named `DEVICENAME.keys` and the configuration file for Haystack will be saved in `DEVICENAME.json`. Replace \"DEVICENAME\" with whatever you want to name the actual device.\n\nThis makes a set of 12 keys, which the beacon uses in turn. Add `-keys` for a different\nnumber. See [Keys](./KEYS.md).\n\n\n2. Flash the hardware with the TinyGo target and the name of your device.\n\nFor example:\n\n```shell\nhaystack flash DEVICENAME nano-rp2040\n```\n\nThis will use TinyGo to compile the firmware using your keys, and then flash it to the device. See [https://tinygo.org/getting-started/overview/](https://tinygo.org/getting-started/overview/) for more information about TinyGo.\n\nFor a device on a battery, add `-battery`, which turns the serial port off. Add\n`-txpower` to lower the radio transmit power, which saves more current but shortens\nthe range. On an ESP32-C3 or ESP32-S3 board, add `-batterypin` and `-batterydivider` to\nread the battery. Add `-batterytype` for a cell that is not a LiPo, such as a CR2032, or\n`-batterythresholds` for the voltages of any other cell. Add `-rotate` for a different\ntime on each key. All flags go before the subcommand. See [Battery Powered Beacons](./firmware/README.md#battery-powered-beacons) and\n[Keys](./KEYS.md#rotating-keys).\n\n```shell\nhaystack -battery -txpower=-8 flash DEVICENAME xiao-ble\n```\n\n\n3. Upload the JSON file for that device to your running instance of `macless-haystack` using the web UI.\n\nPoint your web browser to [`https://dchristl.github.io/macless-haystack/`](https://dchristl.github.io/macless-haystack/) which is a single-page web application that only reads/writes local data. Click on the link for \"Accessories\", then on the \"+\" button. Choose the `DEVICENAME.json` file for your device.\n\nThat's it, your device is now setup.\n\n## Objects in your data may be closer than they appear\n\nEventually, if your device is in range of any iPhone, they will appear in your Macless-Haystack data in the web UI.\n\nNote that it might take a while for the first data to show up.\n\nHave fun, be good!\n\n## How to test\n\nThe unit tests run on the host, so they need no hardware:\n\n```shell\ngo test ./...\n```\n\nSee [Testing](./TESTING.md) for the microcontroller builds and for the tests on the\nhardware.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhybridgroup%2Fgo-haystack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhybridgroup%2Fgo-haystack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhybridgroup%2Fgo-haystack/lists"}