Better ble spam comments

This commit is contained in:
Willy-JL
2023-11-13 22:22:07 +00:00
parent d7f0b62f42
commit 8651dfcb12
4 changed files with 17 additions and 17 deletions

View File

@@ -163,8 +163,8 @@ static void make_packet(uint8_t* _size, uint8_t** _packet, Payload* payload) {
}
packet[i++] = prefix; // Prefix (paired 0x01 new 0x07 airtag 0x05)
packet[i++] = (model >> 0x08) & 0xFF;
packet[i++] = (model >> 0x00) & 0xFF;
packet[i++] = (model >> 0x08) & 0xFF; // Device Model
packet[i++] = (model >> 0x00) & 0xFF; // ...
packet[i++] = 0x55; // Status
packet[i++] = ((rand() % 10) << 4) + (rand() % 10); // Buds Battery Level
packet[i++] = ((rand() % 8) << 4) + (rand() % 10); // Charing Status and Battery Case Level
@@ -238,8 +238,8 @@ static void make_packet(uint8_t* _size, uint8_t** _packet, Payload* payload) {
if(action == 0x09 && rand() % 2) flags = 0x40; // Glitched 'Setup New Device'
}
packet[i++] = flags;
packet[i++] = action;
packet[i++] = flags; // Action Flags
packet[i++] = action; // Action Type
furi_hal_random_fill_buf(&packet[i], 3); // Authentication Tag
i += 3;
break;
@@ -264,13 +264,13 @@ static void make_packet(uint8_t* _size, uint8_t** _packet, Payload* payload) {
i -= 2; // Override segment header
packet[i++] = ContinuityTypeNearbyAction; // Continuity Type
packet[i++] = 0x05; // Continuity Size
packet[i++] = flags;
packet[i++] = action;
packet[i++] = 5; // Continuity Size
packet[i++] = flags; // Action Flags
packet[i++] = action; // Action Type
furi_hal_random_fill_buf(&packet[i], 3); // Authentication Tag
i += 3;
packet[i++] = 0x00; // Terminator (?)
packet[i++] = 0x00; // Additional Action Data Terminator (?)
packet[i++] = 0x00; // ...
packet[i++] = ContinuityTypeNearbyInfo; // Continuity Type (?)

View File

@@ -125,10 +125,10 @@ void make_packet(uint8_t* out_size, uint8_t** out_packet, Payload* payload) {
packet[i++] = 0x21;
packet[i++] = 0x01;
packet[i++] = 0x09;
packet[i++] = (model >> 0x10) & 0xFF;
packet[i++] = (model >> 0x08) & 0xFF;
packet[i++] = 0x01;
packet[i++] = (model >> 0x00) & 0xFF;
packet[i++] = (model >> 0x10) & 0xFF; // Buds Model / Color (?)
packet[i++] = (model >> 0x08) & 0xFF; // ...
packet[i++] = 0x01; // ... (Always static?)
packet[i++] = (model >> 0x00) & 0xFF; // ...
packet[i++] = 0x06;
packet[i++] = 0x3C;
packet[i++] = 0x94;
@@ -175,7 +175,7 @@ void make_packet(uint8_t* out_size, uint8_t** out_packet, Payload* payload) {
packet[i++] = 0x00;
packet[i++] = 0x00;
packet[i++] = 0x43;
packet[i++] = (model >> 0x00) & 0xFF;
packet[i++] = (model >> 0x00) & 0xFF; // Watch Model / Color (?)
break;
}
default:

View File

@@ -557,9 +557,9 @@ static void make_packet(uint8_t* _size, uint8_t** _packet, Payload* payload) {
packet[i++] = 0x16; // AD Type (Service Data)
packet[i++] = 0x2C; // Service UUID (Google LLC, FastPair)
packet[i++] = 0xFE; // ...
packet[i++] = (model >> 0x10) & 0xFF;
packet[i++] = (model >> 0x08) & 0xFF;
packet[i++] = (model >> 0x00) & 0xFF;
packet[i++] = (model >> 0x10) & 0xFF; // Device Model
packet[i++] = (model >> 0x08) & 0xFF; // ...
packet[i++] = (model >> 0x00) & 0xFF; // ...
packet[i++] = 2; // Size
packet[i++] = 0x0A; // AD Type (Tx Power Level)

View File

@@ -45,7 +45,7 @@ static void make_packet(uint8_t* _size, uint8_t** _packet, Payload* payload) {
packet[i++] = 0x03; // Microsoft Beacon ID
packet[i++] = 0x00; // Microsoft Beacon Sub Scenario
packet[i++] = 0x80; // Reserved RSSI Byte
memcpy(&packet[i], name, name_len);
memcpy(&packet[i], name, name_len); // Device Name
i += name_len;
*_size = size;