Hardware: GPIO17=SDA, GPIO18=SCL, 3V3, GND — I2C address 0x3C (SW_I2C)
Library: olikraus/U8g2 (SW_I2C full-buffer mode, tolerant of missing display)
Boot sequence (shown synchronously during setup):
BOOTING splash → SPI init → WiFi AP start → Radio 1 init → JAMMING ACTIVE
or RADIO INIT FAILED / STANDBY on error
Live display cycles every 4 seconds between 3 pages:
Page 0 — Status:
Inverted header: ">> JAMMING ACTIVE <<" (animated pulsing glow banner) or STANDBY
ANT1 309.583MHz ))) ← animated radio-wave arcs (1-3 arcs cycling ~1.1s)
ANT2 433.920MHz )))
TX:10dBm+20dB=30dBm
"[ FULL DUAL-BAND TX ]" when both radios active, else TEMP+HEAP
Page 1 — Frequency/Hops:
R1: 309.5830MHz
12,456 hops
R2: 433.9200MHz
11,234 hops
Page 2 — System Health:
TEMP 48.2 C
HEAP 185kB (min 183)
UP 2h 34m 12s
PWR 30dBm / 1000mW
Notification overlays (full-screen inverted, 2.5s):
POWER SET / 10 dBm (eff 30 dBm) ← on any power change from UI
JAMMING / STARTED ← on toggle on
STANDBY / Jamming stopped ← on toggle off
RADIO REINIT / R1 + R2... ← on watchdog reinit
RADIO FAIL / Check connections ← if both radios fail to start
Made-with: Cursor
74 lines
2.5 KiB
C
74 lines
2.5 KiB
C
#ifndef CONFIG_H
|
||
#define CONFIG_H
|
||
|
||
// CC1101 #1 (315 MHz band)
|
||
#define CC1101_1_CS 7
|
||
#define CC1101_1_GDO0 4
|
||
#define CC1101_1_FREQ_MHZ 315.0f
|
||
|
||
// CC1101 #2 (433.92 MHz band)
|
||
#define CC1101_2_CS 8
|
||
#define CC1101_2_GDO0 5
|
||
#define CC1101_2_FREQ_MHZ 433.92f
|
||
|
||
// Shared SPI (FSPI default on ESP32-S3: 11=MOSI, 12=SCK, 13=MISO)
|
||
#define SPI_SCK_PIN 12
|
||
#define SPI_MISO_PIN 13
|
||
#define SPI_MOSI_PIN 11
|
||
#define SPI_SPEED_HZ 500000
|
||
|
||
// WiFi AP for read-only telemetry UI
|
||
#define WIFI_AP_SSID "killer"
|
||
#define WIFI_AP_PASS "password" // simple demo password
|
||
|
||
// Web server
|
||
#define WEB_PORT 80
|
||
|
||
// Jamming configuration
|
||
#define JAMMING_ENABLED true // Start jamming immediately on boot
|
||
// CC1101 only accepts 8 discrete power levels (index 0-7):
|
||
// { -30, -20, -15, -10, 0, 5, 7, 10 } dBm
|
||
#define JAM_POWER_LEVELS 8
|
||
#define DEFAULT_JAM_POWER_IDX 7 // index into power table (7 = 10 dBm, max)
|
||
#define JAM_NOISE_PATTERN_LEN 64
|
||
|
||
// External amplifier gain in dB (used only for display — does not affect CC1101 output)
|
||
#define DEFAULT_AMP_GAIN_DB 20
|
||
|
||
// Modulation parameters for jamming
|
||
#define JAM_BITRATE_KBPS 250.0f // High bitrate = wider noise bandwidth
|
||
#define JAM_FREQ_DEV_KHZ 120.0f // Wide deviation = covers ~240 kHz per hop
|
||
#define JAM_RX_BW_KHZ 812.0f // Maximum RX BW
|
||
|
||
// Frequency sweep — full coverage of all known car-key-fob sub-GHz bands
|
||
//
|
||
// Radio 1 (CC1101 #1) — 300–320 MHz [CC1101 Band 1: 300–348 MHz]
|
||
// Honda/Acura (US): 303.825 MHz
|
||
// Chamberlain/LiftMaster: 310.0 MHz
|
||
// Toyota/Lexus/Scion: 314.98 MHz
|
||
// Ford/GM/Chrysler/Dodge/Jeep: 315.0 MHz
|
||
// Linear Delta-3 / LiftMaster: 318.0 MHz
|
||
#define SWEEP_1_CENTER_MHZ 310.0f
|
||
#define SWEEP_1_SPAN_MHZ 20.0f // 300–320 MHz
|
||
#define SWEEP_1_STEPS 25 // ~0.83 MHz/step — overlaps 812 kHz RX BW
|
||
|
||
// Radio 2 (CC1101 #2) — 390–436 MHz [CC1101 Band 2: 387–464 MHz]
|
||
// Chamberlain/LiftMaster: 390.0 MHz
|
||
// Holtek-based remotes: 418.0 MHz
|
||
// Somfy RTS / SMC 5326: 433.42 MHz
|
||
// Global standard (BMW/VW/Audi/Mercedes/Hyundai/Kia…): 433.92 MHz
|
||
// Nero Radio / some Asian fobs: 434.42 MHz
|
||
#define SWEEP_2_CENTER_MHZ 413.0f
|
||
#define SWEEP_2_SPAN_MHZ 46.0f // 390–436 MHz
|
||
#define SWEEP_2_STEPS 47 // ~1 MHz/step
|
||
|
||
// How long to dwell on each hop frequency (ms)
|
||
#define SWEEP_DWELL_MS 5
|
||
|
||
// 0.96" SSD1306 OLED display — I2C via SW_I2C (any free GPIO)
|
||
// Wiring: VCC→3V3, GND→GND, SDA→GPIO17, SCL→GPIO18
|
||
#define OLED_SDA_PIN 17
|
||
#define OLED_SCL_PIN 18
|
||
|
||
#endif
|