GitHub-hosted build of BW16-Tools Beta (Wi‑Fi + BLE) for bare Ai-Thinker BW16-Kit (no OLED required).
- Push to
main(or Actions → Build firmware → Run workflow). - Download artifact
bw16-tools-firmware-<sha>(or release taglatest-main). - Flash: hold BURN, tap RST, release BURN, then use your flasher / Arduino upload with board Ai-Thinker BW16.
Board FQBN used in CI: realtek:AmebaD:Ai-Thinker_BW16 (AmebaD 3.1.7).
Web UI after boot: join AP BW16-WebUI / 1234567890 (edit src/BW16-Tools/web_config.h).
Upstream is archived; this tree is the Beta branch as of the fork point. License: GPL-3.0 (see LICENSE). Authorized security research only.
🛠️ BW16-Tools
Wireless security testing tool based on the Ai-Thinker BW16-Kit (RTL8720DN). Wi-Fi features: deauthentication (Deauth), channel interference, Deauth/Disassoc frame detection, password phishing (Phishing), authentication/association frame flood attack (DoS); BLE features: Bluetooth popup attacks, Bluetooth beacon broadcasting, and more. For security research and educational purposes only — do not abuse. Developed with Arduino.
A new Beta branch was created, adding Bluetooth BLE functionality, but several bugs remain unresolved:
-
- Due to BW16 module design issues, Wi-Fi and BLE contend for resources, causing abnormal behavior in some cases.
-
- BLE functionality is suspected to cause severe memory overflow. (Affects packet capture; handshake packet buffering anomalies)
In this project, memory overflow and resource conflicts seem to have reached a delicate balance — most features work fine, but underlying issues remain. This is one reason these bugs are hard to fix.
Simply put, if you only need Wi-Fi features, use the older version on the main branch.
If you are willing to give up Wi-Fi packet capture in exchange for Bluetooth BLE features, use the Beta branch version.
If you manage to fix these issues, contributions to this project are always welcome.
Partial memory-pressure mitigations (upstream Beta OOM not fully fixed — hardware still has ~512KB RAM):
- Free old handshake PCAP (
globalPcapData) when starting a new capture;clear()+shrink_to_fit()on reset (previous capture is discarded if you start a new one) - Handshake WebUI scan releases previous
scan_resultscapacity before re-scan - BLE features tear down via
performCompleteBleCleanup()(stop + end + deinit) on exit and before Web UI /statusincludespcap_size(current PCAP buffer length)- Phishing text list already capped (200 entries)
This project is intended for security research and educational purposes in compliance with applicable laws. Do not abuse it.
- SSID/AP scanning [Scan]
- Quick scan: normal active + passive scanning
- Deep scan: multiple scan modes, channel-by-channel scanning
- Deauthentication attack [Attack -> Deauth]
- Sends deauthentication management frames to force clients to disconnect
- WPA3 enforces protected management frames, so this is ineffective against WPA3 networks
- Beacon frame attack [Attack -> Beacon]
- Random beacon frame attack: sends large numbers of random beacon frames
- Clone a specified AP: clones the beacon frame SSID transmitted by a specified AP
- Selectable operating band 2.4G/5G
- Password phishing [Phishing]
- Selectable web page styles
- Connection/channel interference [Channel Interference]
- Clones beacon frames and probe responses from the target AP onto multiple channels
- Clients cannot determine which channel the real AP is operating on, disrupting connections
- Disrupts at the communication layer, ignoring WPA/WPA2/WPA3 and other security protocols
- AP flood attack [DoS]
- Sends large numbers of open authentication requests and association request frames with random MAC addresses to the target AP
- Tested to be effective against lightweight home routers and portable Wi-Fi dongles; ineffective against phone hotspots
- Attack frame detection [Detect]
- Listens for Deauth/Disassoc frames on a specified channel
- Selectable channel group (2.4G/5G/all/common)
- Intelligently records access points suspected of being attacked
- (However, it is not very intelligent — it records some useless content)
- Monitor [Monitor]
- Counts valid packets on a specified channel
- Generates real-time charts and statistics
- A "[*]" indicator appears in the top-right corner when deauthentication/association frames are detected
- Web UI
- Custom SSID beacon frame attack [Custom Beacon]
- WPA/WPA2 handshake capture [Handshake Capture] (completely broken in the Beta version)
- Bluetooth beacon broadcasting
- Broadcasting: full Apple lineup, full Xiaomi lineup, full Huawei lineup, full Google lineup, mixed Mi Home devices, rare devices, children's toys
- Broadcasts large numbers of Bluetooth devices from the corresponding vendors; similar to Wi-Fi beacon frame attacks — sends only beacon data, cannot be connected to
- Bluetooth popup attacks
- iOS Quick Pair popup
- iOS Action Modal
- iOS 17 crash attack (suspected fixed)
- Windows Swift Pair popup
- Quick Pair popup for older Android devices
- Thanks to: @Ghost | @shiyi226
- https://github.com/shiyi226/5gwifi-bw16
- 2025-06-11
- https://github.com/tesa-klebeband/RTL8720dn-WiFi-Packet-Injection
- 2025-04-12
- https://github.com/A3ST1CODE/RTL8720DN-Captive
- 2025-04-03
- https://github.com/Cancro29/RTL8720dn-Handshake-Capture
- 2025-04-22
- https://github.com/wangergou2023/dog
- 2024-07-15
Licensed under the GPL 3.0 license. When using this project, please comply with:
- Do not modify it and sell it as closed source
- Do not use it in closed-source projects/products
- Selling derivative products must retain the copyright and unconditionally provide source code (do not sell devices at high prices with this project's firmware as a selling point)
- Ai-Thinker BW16-Kit (RTL8720DN)
- 0.96 OLED screen (SSD1315 / 1306)
- Any buttons x 4
- 3.7V lithium battery & charging module & power switch (optional)
| 0.96 OLED | BW16-Kit |
|---|---|
| GND | GND |
| VCC | 3V3 |
| SCL | PA25 |
| SDA | PA26 |
| Button mapping | BW16-Kit |
|---|---|
| BTN_UP (up) | PA27 |
| BTN_DOWN (down) | PA12 |
| BTN_OK (confirm) | PA13 |
| BTN_BACK (back) | PB2 |
Connect one end of each button to the corresponding PA/PB pin on the BW16-Kit, and the other end to any GND pin on the BW16-Kit.
Button pin definitions can be changed in BW6-Tools.ino:
// Button pin definitions
#define BTN_DOWN PA12
#define BTN_UP PA27
#define BTN_OK PA13
#define BTN_BACK PB2- Gerber ZIP
- LCEDA JSON
- Edit with LCEDA
- Ai-Thinker BW16-Kit [x1]
- 0.96 OLED (SSD1315 / 1306) [x1]
- 4 * 4 * 1.8 tactile switch [x4]
- 4 * 4 length/width, any height
- SS12D07 G3 (8.8 * 4.5 * 3) slide switch [x1]
- Vertical through-hole, 8.8 * 4.5 length/width, any lever length
- 3.7V lithium battery 502030 [x1]
- 5mm thick, 20mm wide, 30mm long
- CL4056 3.7V lithium battery charging module [x1]
- 16.8mm L * 12mm W
Go to Releases and download the compiled bin file, then flash it with any flashing tool
- Before flashing, hold the Burn button on the BW16-Kit without releasing it, then tap the RST button once to enter download mode
- Install the BW16 board in Arduino IDE
- File -> Preferences -> Additional Boards Manager URLs
- https://github.com/ambiot/ambd_arduino/raw/master/Arduino_package/package_realtek.com_amebad_index.json
- Please install version 3.1.7!!!
- Import local libraries
- Import all library files in this repository's
librariesdirectory, one by one
- Compile the project and upload
- Open
/src/BW16-Tools/BW16-Tools.ino - Connect the BW16-Kit via USB
- Hold the Burn button on the BW16-Kit without releasing it, then tap the RST button once to enter download mode
- Compile and upload






