I went through the README to flash a nRF51822. To my understanding, everything worked as expected.
But after flashing, I can't see the tag, neither in "Android nRF Connect", nor can the tag being added to "Find My" in an iPhone.
The tag is from AliExpress (HolyIoT) and looks like this:
The command for flashing was
make stflash-nrf51822_xxac-patched ADV_KEYS_FILE=/home/klaus/projects/airtag/heystack-nrf5x/tools/output-nrf51822-2/nrf51822-2_keyfile ADVERTISING_INTERVAL=2000 KEY_ROTATION_INTERVAL=3600*12 MAX_KEYS=50 HAS_DEBUG=1
Log while flashing was:
merging application and softdevice... : nrf51822_xxac
mergehex -m _build/nrf51822_xxac.hex ../../nrf-sdk/nRF5_SDK_12.3.0_d7731ad/components/softdevice/s130/hex/s130_nrf51_2.0.1_softdevice.hex -o _build/nrf51822_xxac_s130.hex
Parsing input files.
Merging file "nrf51822_xxac.hex" into output.
Merging file "s130_nrf51_2.0.1_softdevice.hex" into output.
Storing merged file.
hex2bin.py _build/nrf51822_xxac_s130.hex _build/nrf51822_xxac_s130.bin
Patching nrf51822_xxac
cp _build/nrf51822_xxac_s130.bin _build/nrf51822_xxac_s130_patched.bin
xxd -p -c 100000 /home/klaus/projects/airtag/heystack-nrf5x/tools/output-nrf51822-2/nrf51822-2_keyfile | xxd -r -p | dd of=_build/nrf51822_xxac_s130_patched.bin skip=1 bs=1 seek=116704 conv=notrunc
1400+0 records in
1400+0 records out
1400 bytes (1.4 kB, 1.4 KiB) copied, 0.00267036 s, 524 kB/s
xxd -p -c 100000 _build/nrf51822_xxac_s130_patched.bin | grep -q 454e444f464b455953454e444f464b455953454e444f464b45595321 || (echo "The key was not patched correctly!"; exit 1)
"/home/klaus/projects/airtag/heystack-nrf5x/nrf-sdk/gcc-arm-none-eabi-6-2017-q2-update/bin/arm-none-eabi-objcopy" -I binary -O elf32-littlearm -B arm _build/nrf51822_xxac_s130_patched.bin _build/nrf51822_xxac_s130_patched.elf
flashing application and softdevice...␍
openocd -f openocd.cfg -c "init; halt; nrf51 mass_erase; program _build/nrf51822_xxac_s130_patched.bin verify; reset; exit";
Open On-Chip Debugger 0.12.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 1000 kHz
Info : STLINK V2J37S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.098182
Info : [nrf51.cpu] Cortex-M0 r0p0 processor detected
Info : [nrf51.cpu] target has 4 breakpoints, 2 watchpoints
Info : starting gdb server for nrf51.cpu on 3333
Info : Listening on port 3333 for gdb connections
[nrf51.cpu] halted due to debug-request, current mode: Thread
xPSR: 0x61000000 pc: 0x00011434 msp: 0x20003fd8
Info : nRF51822-QFAA(build code: H0) 256kB Flash, 16kB RAM
Info : Mass erase completed.
Info : A reset or power cycle is required if the flash was protected before.
[nrf51.cpu] halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0xfffffffe msp: 0xfffffffc
** Programming Started **
Warn : Adding extra erase range, 0x0001ce20 .. 0x0001cfff
** Programming Finished **
** Verify Started **
** Verified OK **
I went through the README to flash a nRF51822. To my understanding, everything worked as expected. But after flashing, I can't see the tag, neither in "Android nRF Connect", nor can the tag being added to "Find My" in an iPhone.
The tag is from AliExpress (HolyIoT) and looks like this:
The command for flashing was
Log while flashing was:
Log from strtt is: