Skip to content
tinicPublic

About

Receive and decode the video from VEKOOTO VK7Pro wireless backup cameras (Mars Semiconductor pWiFi, MR6682A / MR7917A = BK7231N) on Linux with a cheap USB WiFi dongle: plain 802.11g on channel 14 carrying H.265.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

74 Commits

Folders and files

Repository files navigation

pwifi

Watch and record VEKOOTO VK7Pro (and other Mars Semiconductor "pWiFi") wireless backup cameras on a Raspberry Pi or Linux machine using a single USB WiFi adapter.

pwifi in-browser HUD: live backup-camera view with status pill, battery and solar indicator, signal strength, parking guide lines, and a bottom touch control dock

The full-bleed touch HUD (demo frame — not a real feed). Camera status, battery/solar, link signal, parking guides, and the auto-hiding control dock overlay the live H.265 video.

Everything ships as a single statically linked Rust binary (pwifi) with no external media server or Python runtime required:

  • Live browser viewer (port 80) — full-bleed touch HUD with single camera, picture-in-picture, multi-camera grid, horizontal mirror, vertical flip, parking guide lines, live camera sensor (ISP) controls, battery/solar/RSSI telemetry, and instant <1 s startup via cached GOP replay (native H.265 MSE over WebSocket, automatic on-demand H.264 fallback via ffmpeg, and native HLS for Safari).
  • Optional multi-camera monitor emulator — talks directly to 1–N cameras round-robin on channel 14 so you can leave the original vendor screen unplugged.
  • Continuous recording — crash-safe 10-minute fragmented MP4 files with automatic 24-hour retention plus automatic oldest-file cleanup at 80% disk usage, playable, downloadable, and clearable in the browser.
  • RTSP server (port 8554) — standard rtsp://<host>:8554/cam1 HEVC stream for VLC, Home Assistant, Frigate, or any NVR.

Requirements

  • Linux host — Raspberry Pi (3B+ / 4 / 5 / Zero 2 W, 64-bit) or any Linux PC.
  • Single USB WiFi adapter — any adapter whose Linux driver supports monitor mode on channel 14 (2484 MHz) (iw reg set JP). An MT7601U ("150 Mbps" USB dongle, 148f:7601) is recommended and best tested because it supports both channel 14 monitor mode and packet injection (required for --emulate) out of the box in mainline Linux. Use --iface <name> to pick a specific interface if needed.
  • Runtime tools — iw and ip (for monitor mode on channel 14), plus ffmpeg only if a browser needs the on-demand H.264 fallback.

Quick Start

1. Install from .deb Release (Recommended — Raspberry Pi OS / Debian / Ubuntu)

Download the latest arm64 (Raspberry Pi) or amd64 (x86_64 Linux) .deb from GitHub Releases and install with apt:

sudo apt install ./pwifi_*_arm64.deb

This installs /usr/bin/pwifi, keeps NetworkManager off USB monitor dongles, and starts pwifi.service automatically on boot.

To also have a Raspberry Pi broadcast its own 5 GHz WiFi access point (10.42.0.1) for an in-cab tablet or phone:

sudo pwifi-setup-ap MyCameras my-wpa-password

Open http://<pi-hostname>.local/ (or http://10.42.0.1/ on the Pi's WiFi) in any browser.

2. Or Build From Source

On the target Linux machine (requires Rust 1.80+):

git clone https://github.com/tinic/pwifi.git
cd pwifi
cargo build --release

Or cross-compile a static ARM64 binary and package a .deb on a fast x86_64 machine:

rustup target add aarch64-unknown-linux-musl
cargo build --release --target aarch64-unknown-linux-musl
./packaging/build-deb.sh --arch arm64 --binary target/aarch64-unknown-linux-musl/release/pwifi

(You can also install from a local binary via sudo ./pi/install.sh --binary /path/to/pwifi [--ap MyCameras my-wpa-password].)

3. Running Without the Original Monitor (Optional)

By default pwifi listens passively while the vendor monitor stays powered on. To replace the vendor screen completely:

Option A — Auto-learn from the Web UI (easiest):

  1. Power on the original vendor monitor and camera together for a few seconds while pwifi is running.
  2. pwifi automatically learns the camera's monitor identity and saves it in /var/lib/pwifi/learned.json.
  3. Turn off the vendor monitor, open Settings in the HUD, and turn on Run without vendor screen (which also unlocks live camera sensor brightness/contrast/saturation controls).

Option B — Via CLI (pwifi listen):

  1. With the camera and original monitor powered on briefly, run:

    sudo pwifi listen --seconds 10
  2. Copy the printed PWIFI_ARGS="..." line into /etc/default/pwifi (repeatable --emulate <addr1>,<pair_id>,<slot> for multiple cameras), turn off the vendor monitor, and restart:

    sudo systemctl restart pwifi

CLI Reference

Command Description
pwifi run [OPTIONS] Run the single-adapter WiFi receiver, optional monitor emulator, recorder, web server (:80), and RTSP server (:8554).
pwifi listen [--seconds 10] Passively scan channel 14 and print heard cameras (addr1, pair ID, RSSI, battery/firmware) and ready-to-copy --emulate flags.
pwifi extract <in.pcap> [out] [--mp4] [--list] [--camera <pair>] Extract H.265 video (raw Annex-B or fragmented MP4) per camera from a radiotap capture and print packet/loss statistics.

Run pwifi <subcommand> --help for all options (--port, --rtsp-port, --data-dir, --retain-hours, --segment-secs, --iface, --emulate, etc.).

Compatible Hardware

Tested with the VEKOOTO VK7Pro (1280×720 H.265 at 30 fps, Mars MR6682A + MR7917A / Beken BK7231N). Other wireless backup cameras, RV cameras, or baby monitors using Mars Semiconductor pWiFi chips that transmit unencrypted 802.11g frames tagged BK7231 / MR6612 on channel 14 (2484 MHz) are likely compatible.

Documentation

Guide Contents
docs/truck-setup.md Raspberry Pi + in-cab tablet setup, AP configuration, and hardware notes
docs/monitor-emulation.md How monitor emulation works and tuning notes
docs/protocol.md Byte-level 802.11g air protocol and 512-byte ring-buffer video format
docs/capture-setup.md Manual channel-14 packet capture and troubleshooting
docs/hardware.md Camera teardown, chip identification, and flash layout
docs/sdr.md Reverse-engineering notes from the original SDR investigation

Privacy note: Do not attach raw .pcap captures to public issues unless you are comfortable sharing both your camera's video frames and its device IDs.

Legal

Passive monitor mode does not transmit. Channel 14 (2484 MHz) is enabled via the JP regulatory domain so the Linux driver can tune to the frequency the camera already uses. Monitor emulation transmits control frames on channel 14 — check your local radio regulations before enabling --emulate.

Not affiliated with VEKOOTO, Mars Semiconductor, Fullhan, or Beken.

License

MIT — see LICENSE.

About

Receive and decode the video from VEKOOTO VK7Pro wireless backup cameras (Mars Semiconductor pWiFi, MR6682A / MR7917A = BK7231N) on Linux with a cheap USB WiFi dongle: plain 802.11g on channel 14 carrying H.265.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages