mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-16 04:24:45 -07:00
Add flags parameter to nearby actions
This commit is contained in:
@@ -18,9 +18,7 @@ typedef struct {
|
||||
// Proximity Pair IDs from https://github.com/ECTO-1A/AppleJuice/
|
||||
// Custom adv logic and Airtag ID from https://techryptic.github.io/2023/09/01/Annoying-Apple-Fans/
|
||||
|
||||
static Payload
|
||||
payloads[] =
|
||||
{
|
||||
static Payload payloads[] = {
|
||||
#if false
|
||||
{.title = "AirDrop",
|
||||
.text = "",
|
||||
@@ -69,7 +67,7 @@ static Payload
|
||||
.msg =
|
||||
{
|
||||
.type = ContinuityTypeNearbyAction,
|
||||
.data = {.nearby_action = {.type = 0x00}},
|
||||
.data = {.nearby_action = {.flags = 0xC0, .type = 0x00}},
|
||||
}},
|
||||
{.title = "AirPods Pro",
|
||||
.text = "Modal, spammy (auto close)",
|
||||
@@ -125,7 +123,7 @@ static Payload
|
||||
.msg =
|
||||
{
|
||||
.type = ContinuityTypeNearbyAction,
|
||||
.data = {.nearby_action = {.type = 0x13}},
|
||||
.data = {.nearby_action = {.flags = 0xC0, .type = 0x13}},
|
||||
}},
|
||||
{.title = "AppleTV Connecting...",
|
||||
.text = "Modal, unlocked, long range",
|
||||
@@ -133,7 +131,7 @@ static Payload
|
||||
.msg =
|
||||
{
|
||||
.type = ContinuityTypeNearbyAction,
|
||||
.data = {.nearby_action = {.type = 0x27}},
|
||||
.data = {.nearby_action = {.flags = 0xC0, .type = 0x27}},
|
||||
}},
|
||||
{.title = "AppleTV Audio Sync",
|
||||
.text = "Banner, locked, long range",
|
||||
@@ -141,7 +139,7 @@ static Payload
|
||||
.msg =
|
||||
{
|
||||
.type = ContinuityTypeNearbyAction,
|
||||
.data = {.nearby_action = {.type = 0x19}},
|
||||
.data = {.nearby_action = {.flags = 0xC0, .type = 0x19}},
|
||||
}},
|
||||
{.title = "AppleTV Color Balance",
|
||||
.text = "Banner, locked",
|
||||
@@ -149,7 +147,7 @@ static Payload
|
||||
.msg =
|
||||
{
|
||||
.type = ContinuityTypeNearbyAction,
|
||||
.data = {.nearby_action = {.type = 0x1E}},
|
||||
.data = {.nearby_action = {.flags = 0xC0, .type = 0x1E}},
|
||||
}},
|
||||
{.title = "Setup New iPhone",
|
||||
.text = "Modal, locked",
|
||||
@@ -157,7 +155,7 @@ static Payload
|
||||
.msg =
|
||||
{
|
||||
.type = ContinuityTypeNearbyAction,
|
||||
.data = {.nearby_action = {.type = 0x09}},
|
||||
.data = {.nearby_action = {.flags = 0xC0, .type = 0x09}},
|
||||
}},
|
||||
{.title = "Transfer Phone Number",
|
||||
.text = "Modal, locked",
|
||||
@@ -165,7 +163,7 @@ static Payload
|
||||
.msg =
|
||||
{
|
||||
.type = ContinuityTypeNearbyAction,
|
||||
.data = {.nearby_action = {.type = 0x02}},
|
||||
.data = {.nearby_action = {.flags = 0xC0, .type = 0x02}},
|
||||
}},
|
||||
{.title = "Pair AppleTV",
|
||||
.text = "Modal, unlocked",
|
||||
@@ -173,7 +171,7 @@ static Payload
|
||||
.msg =
|
||||
{
|
||||
.type = ContinuityTypeNearbyAction,
|
||||
.data = {.nearby_action = {.type = 0x06}},
|
||||
.data = {.nearby_action = {.flags = 0xC0, .type = 0x06}},
|
||||
}},
|
||||
{.title = "HomePod Setup",
|
||||
.text = "Modal, unlocked",
|
||||
@@ -181,7 +179,7 @@ static Payload
|
||||
.msg =
|
||||
{
|
||||
.type = ContinuityTypeNearbyAction,
|
||||
.data = {.nearby_action = {.type = 0x0B}},
|
||||
.data = {.nearby_action = {.flags = 0xC0, .type = 0x0B}},
|
||||
}},
|
||||
{.title = "AirPods",
|
||||
.text = "Modal, spammy (auto close)",
|
||||
@@ -293,7 +291,7 @@ static Payload
|
||||
.msg =
|
||||
{
|
||||
.type = ContinuityTypeNearbyAction,
|
||||
.data = {.nearby_action = {.type = 0x01}},
|
||||
.data = {.nearby_action = {.flags = 0xC0, .type = 0x01}},
|
||||
}},
|
||||
{.title = "HomeKit AppleTV Setup",
|
||||
.text = "Modal, unlocked",
|
||||
@@ -301,7 +299,7 @@ static Payload
|
||||
.msg =
|
||||
{
|
||||
.type = ContinuityTypeNearbyAction,
|
||||
.data = {.nearby_action = {.type = 0x0D}},
|
||||
.data = {.nearby_action = {.flags = 0xC0, .type = 0x0D}},
|
||||
}},
|
||||
{.title = "Join This AppleTV?",
|
||||
.text = "Modal, unlocked",
|
||||
@@ -309,7 +307,7 @@ static Payload
|
||||
.msg =
|
||||
{
|
||||
.type = ContinuityTypeNearbyAction,
|
||||
.data = {.nearby_action = {.type = 0x20}},
|
||||
.data = {.nearby_action = {.flags = 0xC0, .type = 0x20}},
|
||||
}},
|
||||
{.title = "AppleID for AppleTV?",
|
||||
.text = "Modal, unlocked",
|
||||
@@ -317,7 +315,7 @@ static Payload
|
||||
.msg =
|
||||
{
|
||||
.type = ContinuityTypeNearbyAction,
|
||||
.data = {.nearby_action = {.type = 0x2B}},
|
||||
.data = {.nearby_action = {.flags = 0xC0, .type = 0x2B}},
|
||||
}},
|
||||
};
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ void continuity_generate_packet(const ContinuityMsg* msg, uint8_t* packet) {
|
||||
break;
|
||||
|
||||
case ContinuityTypeNearbyAction:
|
||||
packet[i++] = 0xc1; // Action Flags
|
||||
packet[i++] = msg->data.nearby_action.flags; // Action Flags
|
||||
packet[i++] = msg->data.nearby_action.type;
|
||||
packet[i++] = (rand() % 256); // Authentication Tag
|
||||
packet[i++] = (rand() % 256); // ...
|
||||
|
||||
@@ -32,6 +32,7 @@ typedef union {
|
||||
struct {
|
||||
} tethering_source;
|
||||
struct {
|
||||
uint8_t flags;
|
||||
uint8_t type;
|
||||
} nearby_action;
|
||||
} ContinuityData;
|
||||
|
||||
Reference in New Issue
Block a user