Run whatever firmware you want on your v2/v3/PANv2 and have root access to the device. This is in early stages of testing, use CAUTION if you are unsure of what you are doing. No support whatsoever is offered with this release.
Using this project can potentially expose your device to the open internet depending on the configuration of your network. You alone are responsible for the configuration and security of your network, make sure you are aware of the risks involved before using.
* USB gadget support, connect the camera directly to a supported router to get an internet connection, no USB Ethernet Adapter required, using USB CDC_NCM.
* If you need assistance, or have general questions, feel free to visit the [Discussions](https://github.com/gtxaspec/wz_mini_hacks/discussions) area! There are folks always willing to help out.
2. perform a fresh format on your micro-sd card, using fat-32 ( this is a hard requirement, the bootloader does not support ex-fat or ext, and thus will not load wz_mini ), DOS partition map type, volume name does not matter.
3. copy all the files inside of SD_ROOT to your micro sd card
4.__SSH is enabled, but is secured using public key authentication for security. Edit the file ```wz_mini/etc/ssh/authorized_keys``` and enter your public key here. If you need a simple guide, [how to use public key authentication](https://averagelinuxuser.com/how-to-use-public-key-authentication/)__
4. The camera will proceed to boot, then you may connect via the IP address of your device using SSH, port 22. The username is root. It may take a few minutes for the device to finish booting and connect to Wi-Fi, then launch the SSH server. Be patient.
5. You may also login via the serial console, password is WYom2020
2. perform a fresh format on your micro-sd card, using fat-32 ( this is a hard requirement, the bootloader does not support ex-fat or ext, and thus will not load wz_mini ), DOS partition map type, volume name does not matter.
3. Run `compile_image.sh` using linux, wait for the script to finish.
4. Copy all the files inside of SD_ROOT to your micro sd card
5. Copy the generated `demo.bin` to root of your micro sd card
6.__SSH is enabled, but is secured using public key authentication for security. Edit the file ```wz_mini/etc/ssh/authorized_keys``` and enter your public key here. If you need a simple guide, [how to use public key authentication](https://averagelinuxuser.com/how-to-use-public-key-authentication/)__
## Installation v2
1. Insert the micro sd memory card into the camera
2. Hold down reset button while powering unit on. This is the standard manual firmware restore procedure.
3. Wait for camera to flash the latest modified firmware, and reboot, do not remove the micro sd card.
4. The camera will proceed to boot, then you may connect via the IP address of your device using SSH, port 22. The username is root. It may take a few minutes for the device to finish booting and connect to Wi-Fi, then launch the SSH server. Be patient. You should hear audio prompts from the camera once it has booted successfully.
5. You may also login via the serial console, password is WYom2020
1. Delete the files you copied to the memory card, or remove the memory card all together. The next time you boot the camera, you will return to stock firmware.
Edit wz_mini.conf, this is stored on the micro sd card inside the wz_mini folder, and loads the configuration variables when the camera boots. You can change the hostname of the camera, add a path to a script to mount NFS, add ping commands, anything you like.
If a remote or app update is initiated, the camera will reboot due to the failure of the update. The firmware update should not proceed again for some time, or at all.
When a firmware update is initiated, due to a bootloader issue (bug?), we intercept the update process and flash it manually. This should now result in a successful update, if it doesn't, please restore the unit's firmware manually using demo_wcv3.bin on the micro sd card.
available modules: asix, ax88179_178a, cdc_ether, r8152
the next time you boot your camera, make sure your USB Ethernet Adapter is connected to the camera and ethernet. The camera has to be setup initially with Wi-Fi for this to work. After setup, Wi-Fi is no longer needed, as long as you are using the USB Ethernet Adapter. Note that using USB Ethernet disables the onboard Wi-Fi. Specify the driver you need for your specific USB Ethernet adapter. asix is listed by default.
Tie cable and wireless network interfaces (RJ45/WLAN) together to define a single, virtual (i.e. bonding) network interface (e.g. bond0).
As long as the network cable is connected, its interface (e.g. eth0) is used for the network traffic. If you pull the RJ45-plug, ifenslave switches over to the wireless interface (e.g. wlan0) transparently, without any loss of network packages.
After reconnecting the network cable, ifenslave switches back to eth0 ("failover mode").
From the outside (=network) view it doesn't matter which interface is active. The bonding device presents its own software-defined (i.e. virtual) MAC address, different from the hardware defined MACs of eth0 or wlan0.
The dhcp server will use this MAC to assign an ip address to the bond0 device. So the computer has one unique ip address under which it can be identified. Without bonding each interface would have its own ip address.
BONDING_PRIMARY_INTERFACE
Specifies the interface that should be the primary. Typically "eth0".
BONDING_SECONDARY_INTERFACE
Specifies the interface that should be the secondary. Typically "wlan0".
BONDING_LINK_MONITORING_FREQ_MS
Specifies the MII link monitoring frequency in milliseconds. This determines how often the link state of each slave is inspected for link failures.
BONDING_DOWN_DELAY_MS
Specifies the time, in milliseconds, to wait before disabling a slave after a link failure has been detected. This option is only valid for the miimon link monitor. The downdelay value should be a multiple of the miimon value; if not, it will be rounded down to the nearest multiple.
BONDING_UP_DELAY_MS
Specifies the time, in milliseconds, to wait before enabling a slave after a link recovery has been detected. This option is only valid for the miimon link monitor. The updelay value should be a multiple of the miimon value; if not, it will be rounded down to the nearest multiple.
the next time you boot your camera, make sure your USB cable is connected to the router. Remember, the camera has to be setup initially with Wi-Fi for this to work. After setup, Wi-Fi is no longer needed. Note that using USB Direct disables the onboard Wi-Fi. Change the MAC Address if you desire via USB_DIRECT_MAC_ADDR variable.
Connectivity is supported using a direct USB connection only... this means a single cable from the camera, to a supported host (An OpenWRT router, for example) that supports the usb-cdc-ncm specification. (NCM, not ECM) If you have an OpenWrt based router, install the ```kmod-usb-net-cdc-ncm``` package. The camera should automatically pull the IP from the router with most configurations. You can also use any modern linux distro to provide internet to the camera, provided it supports CDC_NCM. enjoy!
Note: In my testing, the micro-usb cables included with the various cameras do not pass data, so they will not work. Make sure you have a micro-usb cable that passes data!
When USB Direct connectivity is enabled, the camera will be unable to communicate with accessories. To enable remote spotlight accessory support, enable the following variable and set the IP Address of the host as follows:
```
REMOTE_SPOTLIGHT="true"
REMOTE_SPOTLIGHT_HOST="0.0.0.0"
```
Then, run the following command on the host where the spotlight is attached to:
The RTSP server supports the two video streams provided by the camera, 1080p/360p (1296p/480p for the DB3). You can choose to enable a single stream of your choice, or both. Audio is also available. Set your login credentials here, server listening port, and the stream bitrate.
the singular stream will be located at ```rtsp://login:password@IP_ADDRESS:8554/unicast```
multiple streams are located at ```rtsp://login:password@IP_ADDRESS:8554/video1_unicast``` and ```rtsp://login:password@IP_ADDRESS:8554/video2_unicast```
Note: If you don't set the password, the password will be set to the unique MAC address of the camera, in all uppercase, including the colons... for example:. AA:BB:CC:00:11:22. It's typically printed on the camera. Higher video bitrates may overload your Wi-Fi connection, so a wired connection is recommended.
Forces the camera to skip writing files to /tmp, and write them directly to your storage medium or network mount, prevents trashing. Normally videos are written to /tmp then moved using `mv`, which can overload camera and or remote network connections. Useful for NFS/CIFS remote video storage.
Use as a USB Video Class (UVC) Web Camera for your PC is supported. I have tested with Windows 10, Linux, and Android TV, and it appears as a Generic HD Camera. Audio is supported. This mode disables all other functionality, and only works as a USB Web Camera for your PC. Experimental. Note that the cables typically included with the camera do not data, use a known working micro-usb cable which supports data.
Live stream DIRECTLY from the camera's local RTSP server to: `youtube` / `twitch` / `facebook` live. Audio must be enabled in the RTSP section of the configuration for this to work.
IMP_CONTROL: Tune various audio and video parameters supported by IMP. Only available when RTSP server is enabled, values are reset to default upon reboot.
This script will upgrade wz_mini over the air. It will backup `wz_mini.conf`, any files stored in `wz_mini/etc/configs`, ssh keys, and wireguard configs. It will download the latest master version, extract it, reboot into upgrade mode, perform the upgrade, then reboot to the updated system.
If there are any line differences between the old `wz_mini.conf` and the new release, the script will preserve the current config in place. Note that this means any missing or additional lines. It is recommended to download the latest wz_mini.conf from github, if there are any major changes to the file, copy the new one to your system first, set your parameteres, save the file, then perform the upgrade.
NOTE: if you are upgrading a V2 camera from a release older than 06-16-22, you must manually download the upgrade-run.sh script from this repo and place it in `wz_mini/bin/upgrade-run.sh`, then run it from there !
* 06-16-22: fix scp client bug, allow user modifications to app_init, updated initramfs script, moved upgrade-run to PATH, revised kernel module paths, added ENABLE_RTL8189FS_DRIVER option for v2/v3, updated kernels for v2/v3. ( NOTE: this is a major upgrade, file names for the init scripts have changed, if you are upgrading the V2, do not use the upgrade-run.sh script, please manually update )
* 06-12-22: Added additional audio variables for tuning in libcallback, various bug fixes in wz_user. Added `gather_wz_logs.sh` script for users to share debug logs.
* 05-31-22: added kernel and initramfs configs to src dir, fixed old logs deleted on boot, save dmesg to log folder, upgrade script fixes, user selectable usb ethernet kernel modules in config.
* 05-24-22: add `wz_mini.conf` to replace `run_mmc.sh`, all configuration variables are now stored in this file, scripting logic now in wz_user.sh inside init.d folder. add support for user to add a custom script to run on boot.
* 05-18-22: Added PC Web Camera functionality, changed RTSP server, when you use enable more than one stream, they share the port and use different paths.
* 05-14-22: Added ability to specify RTSP bitrate parameters. Note that changing bitrate in the mobile app will briefly reset the bitrate for the RTSP stream.
* 05-14-22: Update v4l2rtspserver, tinyalsa, alsa-lib. Patch busybox for older official FW's failing to run scripts, fix choppy/static audio in libcallback
* 04-30-22: Move built-in kernel stuff to modules, usb_direct kernel no longer needed, modules now included. Added usb-storage support for usb hdd/ssd/flash drive, cifs support, and rndis support for tethering camera directly to a mobile device.
* 04-26-22: Add customization of PATH via hook in v3_init.sh, and add audioplay_t31 binary for playing audio files before iCamera loads.
* 04-15-22: Enable USB Direct functionality. Allows you to connect camera using a USB cable to a device supporting CDC_NCM devices to get an internet connection, no USB Ethernet Adapter required.
* 04-13-22: Firmware updates are disabled by default, there is a bug in the bootloader that corrupts the kernel partition requiring the re-flash of the camera if an update is processed and the memory card is removed before next boot. The bootloader proceeds to copy the partitions and the system will not boot unless re-flashed. pending investigation.
* 04-12-22: Updated, custom kernel loads all required items from micro sd card. System modification no longer needed.
[https://github.com/mnakada/atomcam_tools](https://github.com/mnakada/atomcam_tools) has a great repo with docker images which include kernel sources, config, and a whole bunch of other stuff. Check it out.
Thank you to everyone who is passionate about Wyze products for making the devices popular, and thank you to Wyze for producing them. Sign up for CamPlus, show some love and support to the company.