Skip to content

Commit

Permalink
Merge pull request #3060 from olivierbarriere/master
Browse files Browse the repository at this point in the history
OpenHaystack: Keep advertising when connected
  • Loading branch information
gfwilliams authored Oct 27, 2023
2 parents 77f925d + 48f2cd3 commit 2b35091
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/openhaystack/ChangeLog
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
0.01: New App!
0.02: Keep advertising when connected
2 changes: 1 addition & 1 deletion apps/openhaystack/custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
const mac = [ key[0] | 0b11000000, key[1], key[2], key[3], key[4], key[5] ].map(x => x.toString(16).padStart(2, '0')).join(':'); // mac address
const adv = [ 0x1e, 0xff, 0x4c, 0x00, 0x12, 0x19, 0x00, key[6], key[7], key[8], key[9], key[10], key[11], key[12], key[13], key[14], key[15], key[16], key[17], key[18], key[19], key[20], key[21], key[22], key[23], key[24], key[25], key[26], key[27], key[0] >> 6, 0x00 ]; // advertising packet
NRF.setAddress(mac);
NRF.setAdvertising([adv,{}]); // advertise AirTag *and* normal device name (to remain connectable)
NRF.setAdvertising([adv,{}],{whenConnected: true, interval: 1000}); // advertise AirTag *and* normal device name (to remain connectable)
}
`;
// send finished app
Expand Down
2 changes: 1 addition & 1 deletion apps/openhaystack/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ "id": "openhaystack",
"name": "OpenHaystack (AirTag)",
"icon": "icon.png",
"version":"0.01",
"version":"0.02",
"description": "Copy a base64 key from https://github.com/seemoo-lab/openhaystack and make your Bangle.js trackable as if it's an AirTag",
"tags": "openhaystack,bluetooth,ble,tracking,airtag",
"type": "bootloader",
Expand Down

0 comments on commit 2b35091

Please sign in to comment.