Wyze V2 Cameras: Xiaomi-Dafang Hacks, Round 2

Another attempt at replacing the Wyze camera firmware went much more smoothly, producing a pair of small cameras with better network manners:

Wyze Camera hacks - Cam 1 overhead workbench
Wyze Camera hacks – Cam 1 overhead workbench

That’s a VLC screen capture from the RTSP stream; obviously, I must up my clutter control game.

I formatted a 32 GB MicroSD card with a 512 MB partition, which may not be strictly necessary, copied the MicroSD CFW bootloader (as demo.bin, sheesh), and it installed without drama.

I resized the partition to 32 GB, installed the firmware (per the FAQ) into the root directory, tweaked the configuration files to match my situation, popped it in the camera, plugged the power cable, and It Just Worked™.

Herewith, a checklist of config directory files requiring tweakage:

  • wpa_supplicant – WiFi SSID and password
  • timezone.conf – America/New_York for us
  • osd.conf – can be tweaked through the Web interface
  • staticip.conf – 192.168.1.11x, as you like
  • resolve.confpihole or router IP, as needed
  • defaultgw.conf – router IP
  • rtspserver.conf – different ports for additional cameras

It would be possible to have the pihole’s DHCP server assign a fixed IP address to each camera, based on its MAC address, but this way the camera knows who it is right from the start and what it’s supposed to be doing.

The router isn’t bright enough to route different port numbers on its Internet side to different LAN IP addresses with the same port address, so each camera must stream from a different port number. I don’t plan many world-available video streams, but a friend does enjoy watching the birds during feeder season.

With the RTSP stream up & running, I flashed the U-Boot bootloader (again, minus drama) and tweaked its uEnv.txt configuration file:

  • Change the memory layout to allow 1920×1080 video
  • ethaddr – set to match hardware MAC address
  • gateway – router IP
  • ipaddr – match the staticip.conf value
  • serverip – router IP (unclear what this does)

The cameras now produce no objectionable network activity, dramatically down from the Wyze firmware’s desperate attempts to contact various servers, every five minutes, around the clock. I have no way of tracking connections made with direct dotted-quad IP addresses, rather than through the pihole, but … this is a distinct improvement.

  1. #1 by David Davis on 2019-04-09 - 07:51

    Keep the camera focused on your workbench; that way, nothing will get out of order.

    • #2 by Ed on 2019-04-09 - 09:35

      Long ago, I discovered I can either have a tidy shop or get stuff done. I definitely err toward the latter …

  2. #3 by Jason Doege on 2019-04-09 - 08:02

    Regarding hairpin connections from the last post about these, you could use a VPN on whatever computer you are using to get outside and then come back in from there.

    • #4 by Ed on 2019-04-09 - 09:40

      Weirdly, the NetGear router handles RTSP hairpins, although I don’t know if it actually bounces data off the far end or just rewrites the URL with the internal IP address.
      I definitely need to get smartened up about VPNs and VMs and all that stuff … [mutter]

  3. #5 by Ken Davidson on 2019-04-09 - 09:41

    So what do I type into my browser to watch you work? :o)

    • #6 by Ed on 2019-04-09 - 09:46

      Yeah, live-streaming my fumbling attempts to fix stuff would be just … fascinating.

      Thinking about what I’m doing and managing a chat session on the side would probably make me fall off the chair.

      • #7 by Jason Doege on 2019-04-11 - 10:17

        There are people on Youtube who, as the kids today like to say, “make bank” showing their fumbling attempts to fix stuff. I sometimes find myself yelling at the monitor as I watch some of them miss the most obvious solutions to problems.

  4. #8 by Vedran on 2019-04-09 - 11:41

    I’m just glad it’s not only my workbench(es) that are covered with stuff :)

  1. Money For Nothing: Bitcoin Blackmail | The Smell of Molten Projects in the Morning
  2. Xiaomi Dafang Hacks: Timelapse Images | The Smell of Molten Projects in the Morning
  3. Xiaomi Dafang Hacks: Motion Detection | The Smell of Molten Projects in the Morning
  4. Weatherproof Outlet Cover Re-Chaining | The Smell of Molten Projects in the Morning