Skip to content

Repository files navigation

Kindle Drone Tools

Passive Wi-Fi drone detection system for jailbroken Amazon Kindle 4

Detects DJI, Parrot, Autel, and other drone models using Wi-Fi signal analysis on the built-in Atheros AR6003 chipset. Displays real-time detection HUD, threat scores, and RF activity on the device's e-ink display.

Features

βœ… Real-time Wi-Fi AP scanning (5-second cycle)
βœ… Threat scoring system (0–100 scale, ML-ready)
βœ… Distance estimation (log-distance path loss model)
βœ… Temporal analysis (movement detection, channel hopping, transient tracking)
βœ… CRC-based external RF detection (2.4 GHz interference indicator)
βœ… E-ink HUD display (50Γ—40 ASCII text, radar images, weather/sensor pages)
βœ… Hardware sensor integration (battery %, room temperature)
βœ… Persistent CSV logging (14-column detection history)
βœ… Power bank keepalive (automatic charging throttle to prevent auto-shutoff)

πŸ–ΌοΈ Quick Visual Preview

E-Ink Display Pages:

Welcome Weather Radar Temperature
Welcome Weather Radar Temp

Hardware Requirements

Item Details
Device Amazon Kindle 4 (2011 model, 600Γ—800 e-ink)
Jailbreak SSH enabled on /mnt/us/ mounted partition
Chipset Atheros AR6003 hw2.1.1 (built-in, no USB WiFi adapter needed)
CPU ARM, 256 MB RAM minimum
WiFi Passive scanning (no monitor mode required)

Quick Start

1. Build

# On development machine
mvn -DskipTests clean package
# Output: drone-app/target/drone-app-2.0.0-SNAPSHOT.jar

2. Deploy to Kindle

# Upload JAR and runtime scripts
scp drone-app/target/drone-app-2.0.0-SNAPSHOT.jar root@<kindle-ip>:/mnt/us/
scp scripts/kindle/drone-*.sh root@<kindle-ip>:/mnt/us/
ssh root@<kindle-ip> "chmod +x /mnt/us/drone-*.sh"

3. Start on Kindle

# Start detector
ssh root@<kindle-ip> "/mnt/us/drone-control.sh start"

# View status
ssh root@<kindle-ip> "/mnt/us/drone-control.sh status"

# Stream logs
ssh root@<kindle-ip> "tail -f /mnt/us/drone-app.log"

# Stop detector
ssh root@<kindle-ip> "/mnt/us/drone-control.sh stop"

Logging & Monitoring

Detection Log

  • Path: /mnt/us/drone-app.log
  • Format: Tab-separated fields (timestamp, MAC, SSID, distance, threat, flags)
  • Update: Every 5 seconds
  • Retention: Auto-trimmed at 10 MB

CSV History

  • Path: /mnt/us/drone_nets.csv
  • Columns: mac, ssid, firstSeen, lastSeen, count, peakSignal, oui, keyword, obsTime, distHist, lastCh, surgeCnt, maxApp, lastFlags
  • Purpose: Persistent baseline and anomaly tracking

Real-time Status

ssh root@<kindle-ip> "cat /mnt/us/drone-app.log | tail -20"

E-Ink Display

Screen Layout

DRONE 02:48:34 AP:30 THR:2 #45
CRC+52 NF:-96 SNR:33 LQ:42 ARMED
--------------------------------------
!~* 7m  -53dB C6  DJI_MAVIC_3      DJI NEW STR
+   43m -74dB C3  [HIDDEN]         HID RMAC
    65m -79dB C9  HomeNetwork
    71m -80dB C6  Buffonn

Display Modes (auto-rotating every 5 minutes)

  1. Main HUD β€” Top 30 APs by threat score
  2. Weather page β€” Current conditions + radar image
  3. Moon/Space page β€” Placeholder pages
  4. Home temp β€” Room temperature history (if papyrus sensor available)
  5. Radar β€” Graphical AP position map (50 sec animation)

Symbols

Symbol Meaning
! Threat β‰₯60 (likely drone)
+ Threat β‰₯30 (suspicious)
~ Moving (signal variance >10 dB)
* New device, not in baseline
ARMED Baseline complete, alerting active
LEARN Still building baseline (first 30 loops)
** RF BURST ** CRC delta >200 (non-WiFi 2.4 GHz)
** EXT RF ** Idle CRC detected external RF
πŸ“Έ Display Screenshots (8 pages)

Display Screenshots

Welcome Page (App Startup)

Kindle Welcome Page

Weather Page

Kindle Weather Page

Moon Information Page

Kindle Moon Page

Space & Weather Page

Kindle Space Page

Home Temperature History

Kindle Temperature Page

Radar Visualization

Radar Rendered Image Radar Page Display

Graphical Radar Map

Radar Map

Message/Log Page

Kindle Message Page


Firewall Configuration

The app opens two ports for control and monitoring:

Setup (automatic in drone-install-autostart.sh)

# Enable loopback access (for local button control)
iptables -A INPUT -i lo -j ACCEPT

# Enable external HTTP access on port 5555
iptables -A INPUT -i wlan0 -p tcp --dport 5555 -j ACCEPT
iptables -A INPUT -i wlan0 -p udp --dport 5555 -j ACCEPT

# Persist firewall rules
iptables-save > /etc/iptables/rules.v4

Manual firewall management

# View current rules
iptables -L -n

# Reset to defaults (WARNING: disconnects SSH)
iptables -F
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT

# Restore from backup
iptables-restore < /mnt/us/iptables_backup.conf
πŸ–₯️ Web UI Screenshots

Web UI Screenshots

Main Detection Dashboard

Web UI Main Page

Detection Logs & History

Web UI Logs

Gallery of All Pages

Web UI Gallery


Configuration & Tuning

Main Application Properties

Edit drone-app/src/main/resources/application.properties before building:

# Scan interval (milliseconds)
detector.scan.interval=5000

# Threat score thresholds
detector.threat.alert=60
detector.threat.suspicious=30

# Distance model parameters
detector.distance.rssi.ref=-30
detector.distance.path.loss.exp=2.7

# Baseline learning period (scan cycles)
detector.baseline.loops=30

# CRC detection sensitivity
detector.crc.alert.threshold=200
detector.crc.idle.interval=10000

# E-ink refresh interval (milliseconds)
display.refresh.interval=5000
display.page.hold.ms=300000

Temporal Analysis Tuning

  • Movement threshold (MOV): RSSI standard deviation >10.0 dB
  • New device threshold (NEW): Signal >βˆ’80 dBm
  • Channel hop threshold (HOP): Seen on 2+ channels
  • Transient threshold (TRN): Peak signal >βˆ’80 dBm + 2+ gaps in history
  • Hidden range limit (HID): <80 meters estimated distance
  • EMA smoothing factor (Ξ±): 0.25 (Ο„β‰ˆ20 seconds)

Troubleshooting

App won't start

# Check if port 5555 is in use
netstat -tlnp | grep 5555

# Check Java runtime
ls -la /mnt/us/java/jre/bin/java

# Check logs
cat /mnt/us/drone-app.log

Screen shows only white

  • Clear e-ink cache: eips -c
  • Restart app: /mnt/us/drone-control.sh restart
  • Check for "eips -f" calls in logs (known issue, fixed in v2.1)

WiFi disconnects during scanning

  • Run: wmiconfig -i wlan0 --power maxperf (reapplied every 2.5 min automatically)
  • Check power management: wmiconfig -i wlan0 --getpower
  • Reduce scan dwell time: wmiconfig -i wlan0 --scan --pas=100 (default 200 ms)

High CPU/Battery drain

  • Increase scan interval: edit detector.scan.interval=10000 (10 seconds)
  • Disable radar display: comment out radar page rotation
  • Enable power saving: echo rec > /proc/sys/kernel/... (reduces detection sensitivity)

Firewall port access denied

  • Add rule: iptables -A INPUT -i wlan0 -p tcp --dport 5555 -j ACCEPT
  • Restart app: /mnt/us/drone-control.sh restart
  • Verify: iptables -L -n | grep 5555

Project Structure

drone/
β”œβ”€β”€ README.md                           # This file
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ DETECTION_SCORING.md           # Threat scoring algorithm
β”‚   β”œβ”€β”€ CHIPSET_CAPABILITIES.md        # AR6003 firmware guide
β”‚   β”œβ”€β”€ DISTANCE_CALCULATION.md        # RSSI path loss models
β”‚   └── HARDWARE_SENSORS.md            # Kindle 4 I2C sensors
β”œβ”€β”€ pom.xml                             # Parent Maven config
β”œβ”€β”€ drone-util/                         # Shared utilities
β”œβ”€β”€ drone-core/                         # Detection engine
β”œβ”€β”€ drone-display/                      # E-ink rendering
β”œβ”€β”€ drone-app/                          # Packaged JAR (main executable)
└── scripts/kindle/
    β”œβ”€β”€ drone-control.sh               # Control script (start/stop/status)
    β”œβ”€β”€ drone-start.sh                 # Idempotent startup
    β”œβ”€β”€ drone-install-autostart.sh     # Enable boot autostart
    └── drone-button-*.sh              # Hardware button integration

Documentation


Hardware Notes

Kindle 4 Sensors (I2C bus 1)

Address Device Type Status Access
1-0048 Papyrus PMIC Temperature βœ… Working /sys/bus/i2c/devices/1-0048/papyrus_temperature
1-0055 Yoshi Battery Fuel gauge βœ… Working lipc-get-prop -i com.lab126.powerd battLevel
1-0035 Maxim AL32 Ambient light ❌ No driver Unreadable
1-001a WM8962 Audio codec ❌ No sensor Not useful
1-0006 SMB347 Charger ❌ Not responding See SMB347_INVESTIGATION.md

Known Issues

  1. Power mode resets β€” Kindle daemon resets radio to "rec" every ~2.5 min. App re-applies --power maxperf every 30 loops.
  2. CRC errors during scanning β€” Normal (30–100/interval). Non-WiFi RF >200 = interference, >500 = drone nearby.
  3. E-ink refresh overhead β€” Minimize with diff-based updates; avoid eips -f after eips -g.
  4. Power bank auto-shutoff β€” At 100% battery, charging current drops, power bank sees low load. App auto-throttles to ≀85%.

Building from Source

Prerequisites

  • Java 8+ (Maven compatible)
  • Maven 3.6+
  • Bash/Git

Compile on Development Machine

mvn clean compile

Create JAR

mvn -DskipTests package

Unit Tests (optional)

mvn test

Cross-compile for Kindle (ARM)

Pre-built Kindle-compatible JAR is included in drone-app/target/. To rebuild for ARM:

# Use ARMv7 JDK or cross-compile toolchain
mvn -DskipTests -P arm package

License

This project is provided as-is for educational and RF research purposes.


Contributing

Contributions welcome! Please submit issues and pull requests via GitHub.


Support & Resources

  • AR6003 Documentation: Atheros datasheets (limited public availability)
  • Kindle Jailbreak: MobileRead wiki (https://www.mobileread.com/)
  • E-ink Rendering: eips tool documentation
  • RSSI Path Loss: See DISTANCE_CALCULATION.md for academic references

About

Kindle Drone Tools is a Wi-Fi-based drone detection system that runs on a jailbroken Amazon Kindle 4, using its built-in AR6003 chipset to passively scan for and identify drone activity through signal analysis, threat scoring, and real-time e-ink display visualization.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages