Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 2.58 KB

README.md

File metadata and controls

52 lines (37 loc) · 2.58 KB

Macless Haystack Firmware for NRF51 and NRF52

This project contains an battery-optimized firmware for the Nordic NRF5x chips from acalatrava. So all credits goes to him. After flashing our firmware, the device sends out Bluetooth Low Energy advertisements such that it can be found by Apple's Find My network. This firmware consumes more power when more than 1 key is used. The controller wakes up every 30 minutes and switches the key.

Warning

Currently, only the NRF51 build has been tested, and the NRF52 build has not been tested yet, but it should work. Feedback on this is welcome. It has been tested with this or this beacon from Aliexpress.

Deploy the Firmware

  • Download firmware for your device
  • Copy your previously generated PREFIX_keyfile in the same folder
  • Patch the firmware with your keyfile (Change the path if necessary!)
# For the nrf51
export LC_CTYPE=C
xxd -p -c 100000 PREFIX_keyfile | xxd -r -p | dd of=nrf51_firmware.bin skip=1 bs=1 seek=$(grep -oba OFFLINEFINDINGPUBLICKEYHERE! nrf51_firmware.bin | cut -d ':' -f 1) conv=notrunc

or

# For the nrf52
export LC_CTYPE=C
xxd -p -c 100000 PREFIX_keyfile | xxd -r -p | dd of=nrf52_firmware.bin skip=1 bs=1 seek=$(grep -oba OFFLINEFINDINGPUBLICKEYHERE! nrf52_firmware.bin | cut -d ':' -f 1) conv=notrunc

The output should be something like this, depending on the count of your keys (in this example 3 keys => 3*28=84 Bytes):

84+0 records in
84+0 records out
84 bytes copied, 0.00024581 s, 346 kB/s
  • Patch the changed firmware file your firmware, i.e with openocd:
openocd -f openocd.cfg -c "init; halt; nrf51 mass_erase; program nrf51_firmware.bin; reset; exit"

(Hint: If needed, the file openocd.cfg is in the root of this folder)

Note

You might need to reset your device after running the script before it starts sending advertisements.

Misc

If you want to compile the firmware for yourself or need further informations have a look at project documentation

A detailed step-by-step for beginners can be found here