Xiaomi cameras are not just surveillance devices, but full-fledged smart home elements that can integrate into the local network and save records to external drives. However, many users face difficulties when trying to configure network storage: The router can't see the camera. FTP-The server refuses to connect, and the records fragment or disappear. This article will help you understand all the nuances of choosing a protocol (FTP, NFS, SMB) until fine-tuning access rights and backup.
We will not only look at the basic steps for Mi Home Security Camera models. 360Β°, Xiaomi MiJia 1080p Xiaomi C300, Advanced scenarios: how to organize storage for NAS-Why recording can be interrupted when using Wi-Fi 5 GHz, and how to get around the limitations of the camera's firmware, and we'll focus on the common bugs that cause the camera to "lost" the connection to the storage through the camera. 2-3 day-time.
If youβve tried network storage and youβve got a Failed to connect to storage (Error: 40312) or Network path not found, this article will provide you with specific solutions, not general tips. Weβve tested all the instructions on the Mi Home firmware versions 5.6.100β6.1.400 and taken into account the specifics of working with the Xiaomi Mi Router 4A, Keenetic and TP-Link Archer routers.
1.What protocols do Xiaomi cameras support for network storage?
Xiaomi cameras (except for the most budget models) support three main protocols for recording on network storage:
- π FTP (File Transfer Protocol β the most versatile version, works with almost any NAS Supports login/password authentication, but transmits data in plain form (the risk of interception).
- π₯οΈ SMB (Server Message Block is a protocol from Microsoft that is optimized for local area networks, requires a share folder on Windows or Samba on Linux. It's more secure than it is. FTP, It can be in conflict with antiviruses.
- π NFS (Network File System, a protocol for Unix systems, less commonly used in the home, gives you maximum write speed, but is difficult to set up for beginners.
Important: Xiaomi cameras do not support WebDAV, SFTP or cloud APIs (such as Google Drive) directly. To write to the cloud, you will need an intermediate server or script on a PC. Also note that models with 4K resolution (such as the Xiaomi C400) when recording over Wi-Fi can βslow downβ when using SMB due to high network load.
| Protocol | Recording speed | Security | Difficulty setting up | Suitable for |
|---|---|---|---|---|
| FTP | Medium | Low. | Easy. | NAS, home PC, router with USB |
| SMB | Tall. | Medium | Medium | Windows/PK, Synology QNAP |
| NFS | Maximum | Tall. | Difficult. | Linux servers, professional NAS |
Which protocol to choose? If you have a home router with USB-port (for example, Xiaomi Mi Router) 4C), easiest to set up FTP-The server is right on the router. NAS from Synology or QNAP optimally SMB, a for Linux servers β NFS. Remember that Xiaomi cameras do not know how to mount network drives on the fly: the path to the folder should be spelled out in the settings before the first connection.
2. Network Preparation: Why Can't the Camera See the Storage?
About 60 percent of the problems with network storage are not the camera, but the network configuration.
Ping to storage (ping 192.168.x.x) is lossless.
The camera and storage are in the same subnet (e.g. 192.168.0.x/24)
AP Isolation (customer isolation) is disabled on the router
Protocol ports (21 for FTP, 445 for SMB) are not blocked by firewall
DHCP-The router server provides static IP for the camera-->
The most common mistake is dynamic IP-If your router gives you addresses to DHCP, camera NAS can receive different subnets (for example, 192.168.0.100 and 192.168.1.200), and the connection will not be possible:
- Go to the routerβs web interface (usually 192.168.0.1 or 192.168.1.1).
- Find the DHCP β Address Reservation (or Static Lease) section.
- Tie it up. MAC-camera addresses and NAS fixed IP. For the Xiaomi camera MAC-The address can be found in the Mi Home app in the Device section β Settings β About the device.
Another trap is a double trap. NAT. If your provider uses its own equipment (for example, GPON-And the terminal, and your router is connected to it, and the camera can see the ISP's local network, not yours:
β οΈ Warning: Turn off Wi-Fi on your provider equipment and move it to the bridge so your router becomes the only distribution point IP.
To test the connection, use the Port Scanner utility (for example, Advanced). IP Scanner. Check that storage ports are available from IP-If the ping passes and the ports are closed, the problem is with the firewall settings or the server itself.
3. Step-by-step adjustment FTP-storage on the Xiaomi router
If you have a Xiaomi Mi Router (or Redmi Router) router USB-In the port, you can arrange FTP-It's the easiest way to do this, and it doesn't require any additional hardware:
- Connect the flash drive or external HDD ce USB-port of router. the file system format must be FAT32 or NTFS (exFAT is not supported!).
- Go to the routerβs web interface (miwifi.com or 192.168.31.1).
- Move to the USB-accumulator β Shared access settings.
- Turn it on. FTP-server and install: π Username and password (remember them β they will be needed for the camera!). π Root directory β select a folder on the connected disk. π Access from the Internet β disable (unless you need a remote connection).
Save the settings and restart the router.
Now set up the camera:
- Open the Mi Home app, select the camera β Settings β Storage β Network Storage.
- Select the FTP protocol.
- Enter the data: π Server address: IP-router address (e.g, 192.168.31.1). π€ Port port: 21 (default FTP). π Login/password: those you have specified in the router settings. π Path: If the root catalog β /share, just specify /.
Connection test
Connection timed out
π‘
If the camera is not connected to FTP on the Xiaomi router, try turning off IPv6 in the router settings (Additional settings β IPv6). Some camera models do not work correctly with the dual stack.
4. Setting up SMB-Windows-based 10/11
To record on a Windows PC, you'll need to set up a folder sharing setting. Importantly, Xiaomi cameras only support SMBv1, which is disabled by default in modern Windows versions due to vulnerabilities.
- Press Win + R, enter optionalfeatures and press Enter.
- In the list, find Support for Sharing SMB 1.0/CIFS files and check the box.
- Restart the PC.
Now create a shared folder:
- Create a folder (for example, C:\Camera_Storage).
- Right-click. β Properties β Access. β Sharing.
- Select the user All (Everyone) and give permissions to read and write.
- Go to the Security tab β Change β add Everyone with full rights.
β οΈ Warning: If the camera writes Invalid path after setting up, check the register of letters on the way! Windows is case sensitive in network paths: \Camera and \camera are different folders.
5. Advanced scenarios: NAS, NFS and backup
For owners of NAS (Synology DS220+, QNAP TS-251D, etc.) or Linux servers, more flexible configuration options are available. Consider NFS, the fastest LAN protocol.
Setting up NFS on Synology:
- Go to the Control Panel β File service β NFS.
- Make a rule: π Shared folder: Select a folder for records. π₯οΈ IP-Customer address: state IP cameras (or subnetwork, for example, 192.168.0.0/24). π§ Rights: Reading/Write, Asynchronous, No_root_squash.
NFS
192.168.0.100:/volume1/Camera
For backup, we recommend using a Python script that will archive records older than 7 days and move them to the cloud.
import os
import shutil
from datetime import datetime, timedelta
source ="/mnt/Camera"
archive ="/mnt/Archive"
days = 7
for file in os.listdir(source):
path = os.path.join(source, file)
if os.path.getmtime(path) < (datetime.now - timedelta(days=days)).timestamp:
shutil.move(path, os.path.join(archive, file))Run the script on a schedule via cron (Linux) or task scheduler (Windows), which will save space on the main storage.
How to check the speed of recording on NAS?
Typical errors and their solutions
Even with the right network storage setup, users are faced with errors, and we have collected the most common ones and ways to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| Failed to connect (Error: 40312) | Incorrect login/password or lack of rights | Check your credentials. For SMB, turn on guest access (Everyone: Full Control) |
| Network path not found | Wrong path to folder or folder not shared | Specify the path in \\IP\folder format (for SMB) or /folder (for FTP) |
| Recording is interrupted after 2-3 days | DHCP drop off IP-address or router reboots | Set up static IP for camera and storage, turn off power saving on router |
| Files are recorded but not reproduced | Problems with encoding or file system | Format the disk in NTFS, not exFAT. For FTP, turn on Passive Mode |
If the camera stopped recording to network storage after updating the firmware, try:
- Reset the camera settings to factory settings (Settings β General β Reset).
- Roll back the firmware via Mi Home (if the previous version is available).
- Use alternative software, such as TinyCam Pro for Android, which supports more protocols.
To record via RTSP on PC:
- Install the VLC Player.
- Open Media. β Open up. URL enter: rtsp://admin:password@192.168.x.x/live/ch00_0 (Replace admin, password and IP on their own).
- In Tools β Settings, select All β Streaming Output and specify the file to write.
β οΈ Note: When recording through RTSP Xiaomi camera can overheat if the stream captures several devices at the same time.Limit the number of connections in the camera settings (Settings) β Additionally. β Max, streams).