Files
car-key-killer/include/config.h
2026-03-24 23:59:19 -07:00

64 lines
2.1 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: max CC1101 TX (+10 dBm). External PA removed — radiated power is chip + antenna gain only.
#define DEFAULT_AUTO_START_JAM false // NVS key autoStartJam; do not jam until user enables or saves auto-start
// CC1101 only accepts 8 discrete power levels (index 0-7); jam path always uses max (10 dBm).
#define JAM_POWER_LEVELS 8
#define DEFAULT_JAM_POWER_IDX 7 // 10 dBm — full device output (see TI SWRS061 PATABLE / output power)
// Modulation parameters for jamming (LFSR drives GDO0 in direct async TX)
#define JAM_BITRATE_KBPS 250.0f // baseband / channel filter context for RadioLib begin()
#define JAM_FREQ_DEV_KHZ 380.0f // default passed to begin(); per-radio deviation applied after init
#define JAM_RX_BW_KHZ 812.0f // wide RX BW for begin()
// Fixed dual-carrier jamming: each radio holds one frequency at full TX power (TI CC1101 freq + deviation).
#define JAM_LOCK_FREQ_1_MHZ 315.0f
#define JAM_LOCK_FREQ_2_MHZ 433.92f
#define JAM_DEV_KHZ_R2_WIDE 380.0f
#define JAM_DEV_KHZ_R1_NARROW 25.0f
// 0.96" SSD1306 OLED display — I2C via SW_I2C (any free GPIO)
#define OLED_SDA_PIN 17
#define OLED_SCL_PIN 18
// Rotary encoder — dial to cycle OLED pages
#define ENC_CLK_PIN 14
#define ENC_DT_PIN 21
// Signal capture / replay
#define CAP_SAMPLE_HZ 100000
#define CAP_DURATION_S 4
#define CAP_BUF_BYTES ((CAP_SAMPLE_HZ * CAP_DURATION_S) / 8 + 8)
#define CAP_HISTORY_MAX 8
// ESP-NOW mesh
#define ESPNOW_BEACON_MS 750
#define ESPNOW_PEER_STALE_MS 12000
#define ESPNOW_MAX_PEERS 8
#endif