agentleFS
Wang200935Wang200935/security-agent-skills/skills/hardware-iot/bluetooth-jammer-sweep/SKILL.md

bluetooth-jammer-sweep

Skill4 starsChanged 3 months agoMITView on GitHub

Fast segmented sweep technique for Bluetooth Classic (BR/EDR) jamming

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Effective coverage: All 79 channels hit every ~9ms (A/B) or ~38ms (C).

    line 104

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Bluetooth Classic Segmented Sweep Jamming

🎯 Trigger Conditions

  • Jamming Bluetooth Classic (BR/EDR) devices (headphones, speakers, keyboards)
  • Need to overcome Adaptive Frequency Hopping (AFH)
  • Using nRF24L01+ with ShockBurst continuous packet mode
  • Multiple nRF24 radios available (2-3) for parallel sweeping

📋 Problem: Why Standard Hopping Fails Against BT Classic

Bluetooth Classic hops at 1600 hops/sec across 79 channels (1 MHz spacing, 2402-2480 MHz). AFH monitors channel quality and marks bad channels as "unused" — the hop sequence skips them.

ApproachHop RateAFH ReactionResult
3ms/hop (333 hops/s)Too slowAFH maps bad channels in ~2s❌ AFH avoids you
1ms/hop (1000 hops/s)MarginalAFH still adapts❌
Continuous sweep (~350µs/hop, ~2850 hops/s)Faster than AFH evalNo time to classify✅ Overwhelms AFH

⚡ Solution: Segmented Parallel Sweep

Divide 79 channels across 3 radios, sweep continuously:

Radio A: channels  2-27  (26 ch)  →  ~350µs/ch = ~9ms full cycle
Radio B: channels 28-53  (26 ch)  →  ~350µs/ch = ~9ms full cycle
Radio C: channels 54-80  (27 ch)  →  ~1400µs/ch (bit-bang slow) = ~38ms, runs at 1/4 rate

All channels covered every ~9ms — AFH needs ~2000ms to build channel map. By the time it marks one channel bad, you've already moved to the next.

🔧 Implementation (Arduino/ESP32)

Channel Sweep in Main Loop (no delay!)

void jamLoop() {
  // WiFi + BLE use static carriers — no hopping
  if (current_Mode == WiFi_MODULE || current_Mode == BLE_MODULE) return;

  // *** BLUETOOTH CLASSIC: FAST SEGMENTED SWEEP ***
  if (current_Mode == Bluetooth_MODULE) {
    static uint8_t swA = 2, swB = 28, swC = 54, cDiv = 0;
    
    // Radio A: 2-27
    RadioA.setChannel(swA);
    swA = (swA >= 27) ? 2 : swA + 1;
    
    // Radio B: 28-53
    RadioB.setChannel(swB);
    swB = (swB >= 53) ? 28 : swB + 1;
    
    // Radio C: 54-80 at 1/4 rate (bit-bang 150µs = 3.2ms/write)
    if (++cDiv >= 4) {
      RadioC.setChannel(swC);
      swC = (swC >= 80) ? 54 : swC + 1;
      cDiv = 0;
    }
    return;
  }

  // Other modes: standard 3ms hop with ch+2/+4 offset
  if (millis() - lastHop < 3) return;
  lastHop = millis();
  // ... standard hop logic ...
}

ShockBurst Configuration (in initAllRadios)

case Bluetooth_MODULE:
  // ShockBurst continuous packets + fast segmented sweep
  chA = 2; chB = 28; chC = 78;  // Starting points
  useShockBurst = true;
  break;

Timing Analysis

RadioChannelsDelay per writeRateCycle time
A (10µs)26~20µs (2 reg writes)~50 kHz~9ms
B (10µs)26~20µs~50 kHz~9ms
C (150µs)27~300µs~3.3 kHz~38ms (1/4 rate)

Effective coverage: All 79 channels hit every ~9ms (A/B) or ~38ms (C). AFH evaluation window is typically 2000ms+. You win by 200x speed advantage.

📊 ShockBurst vs Pure CW for BT Classic

MetricPure CWShockBurst
Signal typeSingle tone32-byte packets @ 2Mbps
BT receiver seesInterfererValid-looking GFSK packets
AFH classification"Bad channel" (energy)"Bad channel" + CRC errors on valid packets
Link layer reactionMay reduce powerSupervision timeout triggers

Key insight: BT Classic expects GFSK packets. ShockBurst packets look like valid traffic but with wrong access code → CRC failure → link quality drops → supervision timeout → disconnect.

🛡️ AFH Evasion Countermeasures

The segmented sweep inherently defeats AFH because:

  1. Speed: Channel map updates can't keep up
  2. Breadth: You hit ALL channels, not just a subset
  3. Persistence: Even if AFH marks some channels "bad", the remaining "good" channels still get hit
  4. ShockBurst: Forces CRC failures on "good" channels too

🔌 Hardware Requirements

  • 3× nRF24L01+PA+LNA
  • Shared SPI bus (SCK=18, MOSI=23, MISO=19)
  • Independent CE/CSN per radio
  • Radio C on high-R branch → 150µs bit-bang delay
  • External 3.3V supply (AMS1117) for PA+LNA peak current

📡 Channel Mapping Reference

Bluetooth Classic channel N = 2402 + N MHz
nRF24 channel = Bluetooth channel (direct mapping: ch 2-80)

nRF24 channels 2-80 cover full BT Classic range

⚖️ Legal Notice

Taiwan Telecommunications Act Art 66/67: Manufacturing, possessing, or using 2.4GHz jammers is illegal (NCC confiscation + fines 100-700萬; possession/use 3-30萬). This technique is for authorized research in Faraday cage environments only.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.