# debbuk/bruce-evil-knop-ble architecture

> Architecture diagram of the GitHub repository debbuk/bruce-evil-knop-ble, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/debbuk/bruce-evil-knop-ble
- Repository: https://github.com/debbuk/bruce-evil-knop-ble

## Overview

This repository is a Bruce firmware customization for LilyGO T-Display TTGO (ESP32), adding a prominent menu action that launches a fixed Apple BLE advertisement-spam configuration and runs until ESC. The graph follows the documented menu-to-action workflow and shows the BLE module as the internal implementation layer. README and sampled sources document broader BLE spam capabilities, but their full runtime wiring was not inspected; those details are kept within the BLE module rather than represented as speculative call chains.

Main entry points: [`src/modules/ble/ble_spam.cpp`](https://github.com/debbuk/bruce-evil-knop-ble/blob/main/src/modules/ble/ble_spam.cpp) (BLE spam runner), [`src/core/main_menu.cpp`](https://github.com/debbuk/bruce-evil-knop-ble/blob/main/src/core/main_menu.cpp) (Main menu), [`src/core/menu_items/EvilKnopBleMenu.cpp`](https://github.com/debbuk/bruce-evil-knop-ble/blob/main/src/core/menu_items/EvilKnopBleMenu.cpp) (EVIL KNOP item), [`src/include/MenuItemInterface.h`](https://github.com/debbuk/bruce-evil-knop-ble/blob/main/src/include/MenuItemInterface.h) (Menu item display)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_menu["Main Menu"]
  node_main_menu["Main menu<br/>[main_menu.cpp]"]
  node_evil_menu["EVIL KNOP item"]
  node_menu_interface["Menu item display"]
end

subgraph group_ble["BLE Spam"]
  node_ble_runner["BLE spam runner<br/>[ble_spam.cpp]"]
  node_apple_payloads["Apple action payloads<br/>[ble_spam.cpp]"]
  node_ble_controls["BLE run controls<br/>[ble_spam.cpp]"]
end

node_operator(("Device operator"))
node_nearby_devices(("Nearby Apple devices"))

node_operator -->|"selects item"| node_main_menu
node_main_menu -->|"offers first"| node_evil_menu
node_main_menu -->|"renders item"| node_menu_interface
node_evil_menu -->|"implements display"| node_menu_interface
node_evil_menu -->|"launches"| node_ble_runner
node_ble_runner -->|"builds advertisements"| node_apple_payloads
node_ble_runner -->|"runs until ESC"| node_ble_controls
node_ble_runner -->|"broadcasts BLE"| node_nearby_devices

click node_main_menu "https://github.com/debbuk/bruce-evil-knop-ble/blob/main/src/core/main_menu.cpp"
click node_evil_menu "https://github.com/debbuk/bruce-evil-knop-ble/blob/main/src/core/menu_items/EvilKnopBleMenu.cpp"
click node_menu_interface "https://github.com/debbuk/bruce-evil-knop-ble/blob/main/src/include/MenuItemInterface.h"
click node_ble_runner "https://github.com/debbuk/bruce-evil-knop-ble/blob/main/src/modules/ble/ble_spam.cpp"
click node_apple_payloads "https://github.com/debbuk/bruce-evil-knop-ble/blob/main/src/modules/ble/ble_spam.cpp"
click node_ble_controls "https://github.com/debbuk/bruce-evil-knop-ble/blob/main/src/modules/ble/ble_spam.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main_menu,node_evil_menu,node_menu_interface toneBlue
class node_ble_runner,node_apple_payloads,node_ble_controls toneAmber
class node_operator,node_nearby_devices toneIndigo
```

## Components

### Main Menu

- [Main menu](https://github.com/debbuk/bruce-evil-knop-ble/blob/main/src/core/main_menu.cpp): `src/core/main_menu.cpp`
- [EVIL KNOP item](https://github.com/debbuk/bruce-evil-knop-ble/blob/main/src/core/menu_items/EvilKnopBleMenu.cpp): `src/core/menu_items/EvilKnopBleMenu.cpp`
- [Menu item display](https://github.com/debbuk/bruce-evil-knop-ble/blob/main/src/include/MenuItemInterface.h): `src/include/MenuItemInterface.h`

### BLE Spam

- [BLE spam runner](https://github.com/debbuk/bruce-evil-knop-ble/blob/main/src/modules/ble/ble_spam.cpp): `src/modules/ble/ble_spam.cpp`
- [Apple action payloads](https://github.com/debbuk/bruce-evil-knop-ble/blob/main/src/modules/ble/ble_spam.cpp): `src/modules/ble/ble_spam.cpp`
- [BLE run controls](https://github.com/debbuk/bruce-evil-knop-ble/blob/main/src/modules/ble/ble_spam.cpp): `src/modules/ble/ble_spam.cpp`

### Other components

- **Device operator**
- **Nearby Apple devices**

## Connections

- Device operator → Main menu: selects item (evidence: `README.md`)
- Main menu → EVIL KNOP item: offers first (evidence: `src/core/main_menu.cpp`)
- Main menu → Menu item display: renders item (evidence: `src/core/main_menu.cpp`)
- EVIL KNOP item → Menu item display: implements display
- EVIL KNOP item → BLE spam runner: launches (evidence: `src/core/menu_items/EvilKnopBleMenu.cpp`)
- BLE spam runner → Apple action payloads: builds advertisements (evidence: `src/modules/ble/ble_spam.cpp`)
- BLE spam runner → BLE run controls: runs until ESC (evidence: `README.md`)
- BLE spam runner → Nearby Apple devices: broadcasts BLE (evidence: `README.md`)
