Reclaim a Gen 1 Nest Cam Outdoor from the cloud and turn it into a 100% local, privacy-respecting ONVIF Profile S and 1080p H.264 RTSP IP camera. Works offline with UniFi Protect, Frigate, Home Assistant, go2rtc, Blue Iris, or any standard ONVIF/RTSP NVR.
No soldering, Linux VM, or cross-compiler needed. Everything runs locally in your browser:
- Open the WebUSB Flasher in desktop Chrome, Edge, or Brave.
- Select
HD2-firmware.bin(download link included in the flasher) and enter your Wi-Fi, ONVIF/RTSP, and root SSH credentials. - Put the camera into DFU mode: gently pry off the front
"nest"cover, remove the 4 small Phillips screws and pry out the friction-fit clear inner cap (teardown photos), hold the small DFU button on the top edge of the PCB while plugging USB into your PC, then release after 2 seconds. - Click Connect and Flash (~10 seconds), then wait ~30 seconds for the camera to reboot onto your Wi-Fi.
- Adopt it in UniFi Protect, Home Assistant, Frigate, or any ONVIF/RTSP NVR (port
80ONVIF,rtsp://<user>:<pass>@<CAMERA_IP>:554/stream1). Future firmware updates can be uploaded locally athttp://<CAMERA_IP>/update.
- 1080p H.264 RTSP streaming (
nest_rtsp) at 30 fps over TCP/UDP on port554(/stream1) with RTSP Digest and Basic authentication. - Calibrated daylight color and auto exposure/white balance using the Ambarella A5s ISP black-level correction, AR0330 3D LUTs (
/etc/idsp/), and continuous YUV-based AE/AWB. - Automatic day/night vision controlling the mechanical IR-cut filter (
gpio45/gpio46) and IR LED PWM dimmer (pwm-backlight.0), with hysteresis, close-reflection protection, and ONVIFIrCutFilteroverride. - AIMD adaptive bitrate (ABR) that monitors live TCP send-queue pressure and scales smoothly between
--min-bitrate(default600 kbpsinlocal_start.sh) and-b(2.2 Mbps) so Wi-Fi fluctuations do not stall your NVR. - On-camera motion detection analyzing preview frames with exposure compensation and IR-cut settle suppression, published via ONVIF PullPoint events (
IsMotionandMotionAlarm). - ONVIF Profile S + WS-Discovery (
nest_onvif) on HTTP port80and UDP3702, with WS-Security UsernameToken + HTTP Digest/Basic auth, live JPEG snapshots (/snapshot.jpg), imaging control, and event subscriptions. - Optional local audio using mono 8 kHz G.711 u-law (
PCMU) for microphone capture and ONVIF two-way audio backchannel (off,mic,speaker, ortwo-way). - Cloud and OTA isolation (
ie_auto.sh) that neutralizes stock Nestphotonandconnectdaemons, disables the status LED, replaces open Wi-Fi telnet with modern Dropbear SSH (Curve25519 + Ed25519 + ChaCha20-Poly1305), and preserves a USB-only rescue shell at192.168.75.2.
Tested and verified on:
| Property | Value |
|---|---|
| Model | Gen 1 Nest Cam Outdoor (wired) |
| SoC | Ambarella A5s (ARMv6 soft-float) |
| Hardware revision | hwver=5 (check /mnt/dropcam/hwver after rooting) |
| Image sensor | Aptina/ON Semi AR0330 / MT9T002 (init.sh --ar0330) |
| Stock OS | Linux 2.6.38.8, glibc 2.13 |
Other Ambarella A5s Dropcam/Nest cameras may require different sensor init flags, Bayer pattern (-y), or IR-cut GPIO pins (inspect /etc/dropcam.conf on your unit).
Note: Both
nest_rtspandnest_onvifare intentionally single-threaded (select()event loops, nolibpthread) to avoid afutex_waitkernel oops in the stock 2.6.38.8 firmware.
At boot, stock /usr/bin/bootstrap.sh checks for /mnt/dropcam/ie_auto.sh on the writable UBIFS configuration partition (mtd9, volume adc) and runs it as root.
Everything you install lives in /mnt/dropcam (~8 MB UBIFS flash partition on mtd9). The stock read-only root filesystem (mtd6) is never modified.
Open the hosted flasher in desktop Chrome, Edge, or Brave:
- WebUSB Flasher: https://hcampbell98.github.io/nest-cam-local/
The static WebUSB app in web/ runs 100% locally in your browser: it connects to the camera in DFU mode (4255:0001), lets you set Wi-Fi / ONVIF / root SSH credentials, extracts v312-bld.bin + v312-hal-reloc.bin client-side from HD2-firmware.bin, merges a custom initrd.cpio.gz, bootstraps a 1.2 KB ARMv6 EP1 Bulk-OUT loader (web/firmware/fast_loader.c) that uploads and CRC32-verifies all ~2.6 MiB in ~10 seconds total, and boots an autonomous UBIFS installer on the camera that preserves every factory calibration file without erasing mtd9.
Unplug the camera, gently pry off the adhered black "nest" front cover with a thin shim (light heat helps soften the adhesive), then remove the 4 small Phillips screws and carefully pry out the friction-fit clear plastic inner cap while keeping the Wi-Fi antenna leads around the edge attached. Hold the small tactile DFU button on the top edge of the circular green PCB while plugging USB into your PC, then release after 2 seconds.
| Internal Layout (Clear Cap, IR Ring, PCB, Rear Shell) | DFU Tactile Button Location |
|---|---|
![]() |
![]() |
To run the WebUSB flasher locally (or build a static bundle yourself):
# 1. Stage compiled binaries + scripts + zImage + initrd_base.bin into web/public/assets/ ./scripts/prepare-web-assets.sh # 2. Install web dependencies and start the local dev server (or build web/dist/) cd web npm install npm run dev # Production static build: # npm run build
Open http://localhost:5173 in Chrome, Edge, or Brave. It includes both Simulation Mode (no hardware required) and a Read-only dry-run option under Advanced Options to verify WebUSB, fast EP1 bulk upload, RAM kernel boot, and read-only mtd9 UBIFS mount without writing to flash.
If you prefer the manual CLI workflow instead, follow Steps 1 through 6 below.
- A Gen 1 Nest Cam Outdoor.
- A Linux PC (Ubuntu, Debian, Pop!_OS, or Fedora recommended).
- A data-capable USB cable to connect the camera directly to a USB port on your PC (avoid unpowered USB hubs).
- A 2.4 GHz Wi-Fi network (or 2.4/5 GHz network compatible with the camera's legacy Wi-Fi chipset).
Install the ARM cross-compiler and build utilities:
sudo apt update sudo apt install -y \ gcc-arm-linux-gnueabi \ binutils-arm-linux-gnueabi \ make git curl python3 python3-venv \ netcat-openbsd iproute2 telnet openssh-client
Clone this repository:
git clone https://github.com/hcampbell98/nest-cam-local.git
cd nest-cam-localUse weegeeday/Dropcam-Rooter to root the camera over USB without soldering. It boots a temporary Linux kernel into RAM via the Ambarella USB bootloader, dumps the writable config partition (mtd9), enables root access with your Wi-Fi credentials, and injects the /mnt/dropcam/ie_auto.sh boot hook.
-
Clone and prepare
Dropcam-Rooter:git clone https://github.com/weegeeday/Dropcam-Rooter.git cd Dropcam-Rooter chmod +x setup.sh root_camera.sh rooted_toolkit.sh ./setup.shFollow the
setup.shprompts to supply the requiredHD2-firmware.binbootstrap file as documented inDropcam-Rooter/HOWTO.md. -
Put the camera into Ambarella USB DFU bootloader mode:
- Unplug the camera from USB power.
- Hold down the physical bootloader button on the camera PCB/housing (see
Dropcam-Rooter/HOWTO.mdfor details). - Plug the USB cable into your Linux host while holding the button.
- Wait 2 seconds, then release. The LED stays off and
lsusbshows Ambarella bootloader VID:PID4255:0001.
-
Run the rooting script:
./root_camera.sh
- Enter your Wi-Fi SSID and password when prompted.
- Choose Option 1 (Boot camera into RAM via USB bootloader).
- Wait until the script finishes flashing
mtd9and tells you to reboot.
-
Unplug the camera and plug it back in to boot normally. Find its IP address on your router's DHCP client list (or connect via USB Ethernet rescue; see docs/TROUBLESHOOTING.md).
-
Connect via initial telnet and immediately set a strong root password (saved to
/mnt/dropcam/shadow):telnet <CAMERA_IP> # Login as: root (empty password initially) passwd cat /mnt/dropcam/hwver
Confirm
hwverreports5for a Gen 1 Nest Cam Outdoor. -
Back up stock flash partitions before making further changes. Return to your
nest-cam-localdirectory (cd ..) and pullmtd9(config) andmtd6(active rootfs) intobackups/:mkdir -p backups
On your Linux PC, start a temporary netcat receiver for
mtd9:nc -l -p 9009 > backups/adc_stock.binIn the camera's shell, send
mtd9:dd if=/dev/mtd9 bs=4096 | nc <YOUR_PC_IP> 9009
Repeat for
mtd6(the ~43 MB UBIFS root filesystem, needed in Step 2 for cross-compilation):# On your Linux PC: nc -l -p 9006 > backups/bak_stock.bin
# On the camera: dd if=/dev/mtd6 bs=4096 | nc <YOUR_PC_IP> 9006
Because the camera runs Linux 2.6.38.8 with glibc 2.13, binaries linked against a modern host toolchain's glibc will fail to start on the camera. Instead, the Makefiles link directly against the camera's own libc-2.13.so, ld-2.13.so, and libasound.so.2.0.0.
Install ubi_reader in a local Python venv and extract backups/bak_stock.bin:
python3 -m venv workspace/ubi-venv workspace/ubi-venv/bin/pip install ubi_reader workspace/ubi-venv/bin/ubireader_extract_files -o workspace/bak_extracted backups/bak_stock.bin
Find the extracted rootfs path (the numeric UBI image ID varies per unit):
ROOTFS="$(echo "$PWD"/workspace/bak_extracted/*/rootfs)" ls -l "$ROOTFS/lib/libc-2.13.so" "$ROOTFS/lib/ld-2.13.so" "$ROOTFS/usr/lib/libasound.so.2.0.0"
If you do not want to unpack the entire UBIFS image, create a minimal sysroot containing just the libraries needed for linking:
mkdir -p workspace/rootfs/lib workspace/rootfs/usr/lib
Copy these files from the camera into workspace/rootfs/ (for example via nc or scp once Dropbear is installed):
/lib/ld-2.13.so/lib/libc-2.13.so/lib/libcrypt-2.13.so/lib/libutil-2.13.so/usr/lib/libasound.so.2.0.0
Then export ROOTFS="$PWD/workspace/rootfs".
Build all three ARMv6 binaries on your Linux host with ROOTFS pointing to the directory from Step 2.
make -C nest_rtsp ROOTFS="$ROOTFS"Produces nest_rtsp/nest_rtsp (~66 KB stripped ARMv6 binary).
make -C nest_onvif ROOTFS="$ROOTFS"Produces nest_onvif/nest_onvif (~66 KB stripped ARMv6 binary).
The dropbear/ directory includes:
dropbear/localoptions.h: strips legacy crypto and unused features, leaving only Curve25519 + Ed25519 + ChaCha20-Poly1305 (~130 KB binary) and storing the host key at/mnt/dropcam/dropbear_ed25519_host_key.dropbear/glibc213_compat.c: shims modern glibcstat/fstat/lstatand__isoc23_strtol/__isoc23_strtoulsymbols onto glibc 2.13's__xstat/__fxstat/__lxstatandstrtol/strtoul.
Build it with the included helper script:
./dropbear/build.sh "$ROOTFS"Produces dropbear/dropbear (~130 KB stripped ARMv6 binary) and verifies that it requires no glibc version newer than GLIBC_2.4.
Create your local camera configuration files from the templates in examples/.
-
ONVIF and RTSP credentials (
onvif.conf)Copy the template and set a username and strong password on a single line (
username:password):cp examples/onvif.conf.example onvif.conf chmod 600 onvif.conf # Edit onvif.conf -> e.g.: # admin:change-me-to-a-strong-password
Both
nest_onvifandnest_rtspread/mnt/dropcam/onvif.conf. If the username isadmin,nest_onvifalso acceptsrootwith the same password. -
Optional audio mode (
audio.mode)By default, audio is
off. To enable the microphone or two-way speaker, copyexamples/audio.mode.exampletoaudio.modeand set it to one of:off(default)mic(microphone capture only)speaker(ONVIF backchannel speaker only; requiresonvif.confcredentials)two-way(both mic and speaker)
Only enable
speakerortwo-wayafter verifying audio behavior on your installed unit (see docs/TROUBLESHOOTING.md). -
Wi-Fi config (
wpa_supplicant.conf)Dropcam-Rooteralready wrote/mnt/dropcam/wpa_supplicant.confon the camera during Step 1. If you ever need to recreate or change your Wi-Fi network, seeexamples/wpa_supplicant.conf.example. -
Set camera orientation and bitrate (
camera.conf)local_start.shsources/mnt/dropcam/camera.confif present, keeping your mount orientation and bitrate settings separate so future firmware updates never overwrite them. Copy the example template if you want to customize from the defaults (MIRROR_MODE=3,MAX_BITRATE=2200000,MIN_BITRATE=600000):cp examples/camera.conf.example camera.conf # Edit camera.conf -> e.g. set MIRROR_MODE=0 for an upright mountMIRROR_MODEOrientation 0Normal (upright mount) 1Horizontal mirror 2Vertical flip 3180-degree rotation (upside-down mount, default)
On a freshly rooted camera, Dropbear SSH is not installed yet, so transfer the initial files over nc or Dropcam-Rooter/rooted_toolkit.sh, or install dropbear + ie_auto.sh first so every future update uses SSH.
Quick bootstrap via netcat (one tarball over LAN):
On your Linux PC, pack the files and serve them on port 9099:
tar -cf - \ ie_auto.sh local_start.sh onvif.conf \ -C "$PWD/dropbear" dropbear \ -C "$PWD/nest_rtsp" nest_rtsp \ -C "$PWD/nest_onvif" nest_onvif \ | nc -l -p 9099
In the camera's telnet shell, extract directly into /mnt/dropcam, fix permissions, and reboot:
cd /mnt/dropcam nc <YOUR_PC_IP> 9099 | tar -xf - chmod 755 /mnt/dropcam/ie_auto.sh /mnt/dropcam/local_start.sh \ /mnt/dropcam/dropbear /mnt/dropcam/nest_rtsp /mnt/dropcam/nest_onvif chmod 600 /mnt/dropcam/onvif.conf sync reboot
If you created an audio.mode file, include audio.mode in the tar command too (or write it directly with echo mic > /mnt/dropcam/audio.mode).
Once Dropbear is running on the camera, use the included helper script:
./scripts/deploy.sh root@<CAMERA_IP>
scripts/deploy.sh uploads ie_auto.sh, local_start.sh, nest_rtsp/nest_rtsp, nest_onvif/nest_onvif, and dropbear/dropbear (plus local onvif.conf and audio.mode if present), sets permissions atomically, and prints instructions to restart services or reboot.
Wait ~25 seconds after reboot, then test SSH, snapshot, and RTSP from your PC:
# 1. Verify Dropbear SSH works (and port 23 telnet is now closed on Wi-Fi) ssh root@<CAMERA_IP> 'ps | grep -E "dropbear|nest_rtsp|nest_onvif"' # 2. Fetch a live JPEG snapshot curl -u admin:<PASSWORD> --digest -o test_snap.jpg "http://<CAMERA_IP>/snapshot.jpg" # 3. Play the live RTSP stream ffplay -rtsp_transport tcp "rtsp://admin:<PASSWORD>@<CAMERA_IP>:554/stream1"
Set a static DHCP lease (IP reservation) for your camera's Wi-Fi MAC address in your router before adopting it into an NVR.
| Service | Endpoint |
|---|---|
| RTSP main stream | rtsp://<user>:<pass>@<CAMERA_IP>:554/stream1 |
| Live JPEG snapshot | http://<CAMERA_IP>/snapshot.jpg (HTTP Digest or Basic auth) |
| Local Firmware Update UI | http://<CAMERA_IP>/update (HTTP Digest or Basic auth) |
| ONVIF Device Service | http://<CAMERA_IP>/onvif/device_service |
| ONVIF Events Service | http://<CAMERA_IP>/onvif/events_service |
| WS-Discovery | UDP multicast 239.255.255.250:3702 |
- In UniFi Protect, go to Settings -> System -> Advanced and enable Discover Third-Party Cameras.
- The camera appears automatically via WS-Discovery (or click Advanced Adoption and enter
<CAMERA_IP>on port80with youronvif.confusername and password). - Once adopted, live view, continuous/motion recording (via ONVIF PullPoint events), snapshots, and night vision mode (
Auto/Always On/Offvia ONVIF ImagingIrCutFilter) work natively.
For detailed walkthroughs covering UniFi Protect, Frigate, Home Assistant, and go2rtc (including two-way audio backchannel), see docs/NVR_SETUP.md and the sample configs in examples/.
| Flag | Default | Description |
|---|---|---|
-w <width> |
1920 |
Video width in pixels |
-h <height> |
1080 |
Video height in pixels |
-b <bps> |
3000000 |
Target / maximum H.264 bitrate in bits/sec (local_start.sh uses 2200000) |
--min-bitrate <bps> |
0 |
Minimum ABR floor in bits/sec (local_start.sh uses 600000) |
--no-abr |
off | Disable AIMD adaptive bitrate and keep a fixed target bitrate |
-p <port> |
554 |
RTSP TCP listen port |
-m <0..3> |
0 |
Sensor mirror/flip (0 normal, 1 H-flip, 2 V-flip, 3 180-deg flip) |
-y <0..3> |
2 |
Bayer pattern (2 = GR, verified for hwver=5 AR0330 daylight color) |
-c <path> |
/mnt/dropcam/onvif.conf |
Path to user:pass credentials file |
--no-auth |
off | Disable RTSP authentication (not recommended; also disables speaker) |
--no-ae |
off | Disable software auto-exposure / AWB loop |
--nv <auto|on|off> |
auto |
Initial night vision mode |
--mic |
off | Enable 8 kHz G.711 u-law microphone track (/stream1/track2) |
--speaker |
off | Enable ONVIF audio backchannel speaker track (/stream1/track3, requires auth) |
| Flag | Default | Description |
|---|---|---|
-p <port> |
80 |
HTTP / SOAP listen port |
-r <port> |
554 |
Advertised RTSP port |
-i <iface> |
wlan0 |
Network interface used for IP, MAC, and WS-Discovery |
-c <path> |
/mnt/dropcam/onvif.conf |
Path to user:pass credentials file |
| Path on Camera | Purpose |
|---|---|
/tmp/night_vision |
Write auto, on, or off to change night vision mode live |
/tmp/night_vision.status |
Current night vision state, IR PWM level, and luma info |
/tmp/nest_motion.state |
Current motion detector state (0 or 1) read by nest_onvif |
/tmp/nest_audio.capabilities |
Active audio capability flags exported by nest_rtsp |
/tmp/snapshot.jpg |
Most recent NV12-to-JPEG snapshot (refreshed on SIGUSR1 or ~5s interval) |
/tmp/rtsp.log |
nest_rtsp runtime log (auto-rotates to /tmp/rtsp.log.old) |
/tmp/onvif.log |
nest_onvif runtime log |
/tmp/local_start.log |
local_start.sh startup log |
/tmp/udhcpc.log |
Wi-Fi DHCP client log |
The RTSP server uses mono G.711 u-law (PCMU, 8 kHz) for both the microphone and the ONVIF audio backchannel. The speaker track requires configured RTSP credentials in /mnt/dropcam/onvif.conf and an ONVIF backchannel negotiation. A client such as go2rtc can negotiate both tracks from the same /stream1 URL.
local_start.sh reads /mnt/dropcam/audio.mode before launching nest_rtsp. Accepted values are off, mic, speaker, and two-way (default: off).
The camera analyzes its own preview frames on a 48x32 cell grid, compensates for exposure changes, pauses briefly when the IR-cut filter switches, and clears motion after 2.5 seconds without movement. Events are exposed via /onvif/events_service (CreatePullPointSubscription + PullMessages) as both:
tns1:RuleEngine/CellMotionDetector/Motion(IsMotion)tns1:VideoSource/MotionAlarm(State)
Once flashed, you never need to open the camera or press the DFU button again for software updates. The camera stays completely offline, and updates are uploaded directly from your browser over your local network:
- Download a
nest-cam-local-update-*.tar.gzrelease bundle (or build one locally with./scripts/build-update-bundle.sh). - Open
http://<CAMERA_IP>/updatein your browser and sign in with youronvif.confusername and password. - Select the
.tar.gzbundle and click Upload & Install Update.
The camera verifies the bundle's SHA256SUMS manifest, checks ARM32 ELF headers on binaries, stages and readback-verifies every file on /mnt/dropcam before atomically swapping them into place, and restarts services (or reboots if boot scripts/Dropbear changed). Your wpa_supplicant.conf, onvif.conf, camera.conf, audio.mode, shadow, and factory calibration files are never modified.
You can also upload a bundle from the command line:
curl -u admin:<PASSWORD> --digest \ --data-binary @nest-cam-local-update-1.1.0-local.tar.gz \ "http://<CAMERA_IP>/update"
If Wi-Fi fails or a script edit breaks networking, you can always reach the camera over USB:
ie_auto.shconfiguresusb0at192.168.75.2/24and bindstelnetdto192.168.75.2(in addition to Dropbear SSH on port22).- Plug the camera into your Linux PC via USB, assign
192.168.75.1/24to the new host USB Ethernet interface, and connect viassh [email protected]ortelnet 192.168.75.2.
See docs/TROUBLESHOOTING.md for full recovery steps, common errors, and log diagnostics.
- weegeeday/Dropcam-Rooter for the solderless Ambarella A5s USB rooting workflow.
- evilwombat/gopro-usb-tools for the Ambarella USB bootloader and RAM Linux loader.
- Kris Brosch (Include Security) for pioneering Dropcam hardware reverse engineering.
- Dropbear SSH for a compact, modern SSH server suitable for embedded ARMv6 targets.



