mirror of
https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git
synced 2025-09-01 20:23:11 +02:00
Pull changes from master into beta (#1880)
* Merge beta into master (#1835) * Add Push To Talk (#1743) * Fix video recording when using FTP or Dropbox (#1744) (#1745) * This adds a new feature "Dropbox URL" so you can specify the URL to be used for (#1746) * Change all absolute URL's to relative (#1748) * Fix deleteFile in sdcard.js (#1749) * Imporove security of Dropbox emulating web script (#1765) Limit maximum file size and only allow certain file types * Add full support for Matrix image and video #1756 (#1766) * More robust Telegram video handling (#1769) * Some cleanup in detectionOn.sh (#1764) Co-authored-by: Steven <36535597+StevenJonSmith@users.noreply.github.com> Co-authored-by: Chris Osgood <chris_github@functionalfuture.com> Co-authored-by: Nick Kaijaks <Nick.Kaijaks@warwick.ac.uk> * Update ui_motion.cgi (#1858) * Update Gitter URLs as old ones returned a HTTP 404 Not Found (#1874) * Improve install_sdcard.md documentation (#1865) --------- Co-authored-by: Steven <36535597+StevenJonSmith@users.noreply.github.com> Co-authored-by: Chris Osgood <chris_github@functionalfuture.com> Co-authored-by: Nick Kaijaks <Nick.Kaijaks@warwick.ac.uk> Co-authored-by: Nemesis24 <guillaumejonquiere@gmail.com> Co-authored-by: numericOverflow <numericOverflow@users.noreply.github.com> Co-authored-by: jcplaza <cuenta.registros.web@gmail.com>
This commit is contained in:
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@@ -1,5 +1,5 @@
|
||||
This is an issue tracking system only.
|
||||
If you have general questions or are a newbie, please ask for help in our [chat channel](https://gitter.im/Xiaomi-Dafang-Hacks).
|
||||
If you have general questions or are a newbie, please ask for help in our [chat channel](https://gitter.im/Xiaomi-Dafang-Hacks/Lobby).
|
||||
|
||||
To make sure your issue can be resolved as quickly as possible please state your
|
||||
|
||||
|
@@ -34,7 +34,7 @@ After that, continue to the
|
||||
### Support
|
||||
|
||||
If you encounter a problem, please see first if you find similiar open/closed issues.
|
||||
Or ask in our [Gitter channel](https://gitter.im/Xiaomi-Dafang-Hacks) for help.
|
||||
Or ask in our [Gitter channel](https://gitter.im/Xiaomi-Dafang-Hacks/Lobby) for help.
|
||||
|
||||
If you don't find anything related, feel free to open a new issue.
|
||||
If you/we solve your issue, please condense your gained insights into a pull request for continuous self-improvement.
|
||||
|
@@ -137,7 +137,7 @@ if [ -n "$F_cmd" ]; then
|
||||
if [ -n "${F_smbPassword+x}" ]; then
|
||||
F_smbPassword=$(printf '%b' "${F_smbPassword//%/\\x}" | sed 's/\//\\\//g')
|
||||
rewrite_config /system/sdcard/config/motion.conf smb_password "\"$F_smbPassword\""
|
||||
echo "Samba passward set<br/>"
|
||||
echo "Samba password set<br/>"
|
||||
fi
|
||||
if [ -n "${F_smbStillsDir+x}" ]; then
|
||||
F_smbStillsDir=$(printf '%b' "${F_smbStillsDir//%/\\x}" | sed 's/\//\\\//g')
|
||||
|
@@ -1,20 +1,81 @@
|
||||
|
||||
# Installation of the Open Source Camera Firmware
|
||||
|
||||
1. Install the classic Xiaomi-Dafang-Hacks custom firmware appropriate for your camera (if not already done) and [flash the open source bootloader](https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/blob/master/hacks/flashinguboot.md)
|
||||
|
||||
2. Partition your MicroSD card to EXT3
|
||||
2. Partition your MicroSD card to EXT3:
|
||||
|
||||
Hint: Use a different MicroSD card than your normal Xiaomi-Dafang-Hacks one to debug issues faster.
|
||||
To achieve this you can use linux tools like fdisk, parted or (in a graphical environment) gparted, combined with the use of mkfs.ext3 .
|
||||
|
||||
3. Mount your EXT3 partition and clone <https://github.com/Dafang-Hacks/rootfs> right into it.
|
||||
Try not to use Windows due to symlinks, line endings etc.
|
||||
The following example is an 8GB SD card wih a first primary partition of 512MB for allocating the operating sistem, and a second one with the rest of the space, both formatted as EXT3:
|
||||
```
|
||||
# fdisk -l /dev/sdb
|
||||
Disk /dev/sdb: 7.41 GiB, 7958691840 bytes, 15544320 sectors
|
||||
Disk model: Storage Device
|
||||
Units: sectors of 1 * 512 = 512 bytes
|
||||
Sector size (logical/physical): 512 bytes / 512 bytes
|
||||
I/O size (minimum/optimal): 512 bytes / 512 bytes
|
||||
Disklabel type: dos
|
||||
Disk identifier: 0x41289c77
|
||||
|
||||
Device Boot Start End Sectors Size Id Type
|
||||
/dev/sdb1 * 2048 1050623 1048576 512M 83 Linux
|
||||
/dev/sdb2 1050624 15544319 14493696 6.9G 83 Linux
|
||||
|
||||
```
|
||||
*Hint: Use a different MicroSD card than your normal Xiaomi-Dafang-Hacks one to debug issues faster.*
|
||||
|
||||
3. Mount your EXT3 first partition and clone the content of <https://github.com/Dafang-Hacks/rootfs> right into it
|
||||
**Try not to use Windows due to symlinks, line endings etc.**
|
||||
|
||||
4. Put your credentials on etc/wpa_supplicant.conf in your EXT3 partition, refer to the [installation manual](https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/blob/master/hacks/install_cfw.md)
|
||||
|
||||
5. Depending on the camera version you have to copy the appropiate uEnv_\<model\>.txt file onto an uEnv.tx file at the root-level of de MicroSD Card. For example, for a Dafang Cam with 128MB of memory, you have to do the following:
|
||||
```
|
||||
# mv uEnv_dafang128.txt uEnv.txt
|
||||
```
|
||||
|
||||
6. Depending on the camera version you have to load the appropriate wireless card driver, this is done commenting out the startup script located in etc/init.d/rcS, in the EXT3 partition of the microSD card. Locate the following section of the mentioned file:
|
||||
|
||||
```
|
||||
# insmod /lib/modules/$KERNEL_VERSION/rtl8189es.ko rtw_initmac="$MAC" # Uncomment for Dafang
|
||||
# insmod /lib/modules/$KERNEL_VERSION/rtl8189fs.ko rtw_initmac="$MAC" # Uncomment for XiaoFang s1 && Wyzecam V2
|
||||
# insmod /lib/modules/$KERNEL_VERSION/mt7601Usta.ko # Uncomment for Sannce
|
||||
|
||||
```
|
||||
And remove the first **\#** of the line that matches your camera version (Look at the comments at the end of the line)
|
||||
|
||||
For example, for a Dafang 128MB of memory CAM it will look like this:
|
||||
```
|
||||
insmod /lib/modules/$KERNEL_VERSION/rtl8189es.ko rtw_initmac="$MAC" # Uncomment for Dafang
|
||||
# insmod /lib/modules/$KERNEL_VERSION/rtl8189fs.ko rtw_initmac="$MAC" # Uncomment for XiaoFang s1 && Wyzecam V2
|
||||
# insmod /lib/modules/$KERNEL_VERSION/mt7601Usta.ko # Uncomment for Sannce
|
||||
```
|
||||
|
||||
7. Unmount the MicroSD card
|
||||
|
||||
8. Put the MicroSD card in your camera and boot it
|
||||
9. Optional: If you create a second partition, you can mount it in the cam operating system,.For that, connect though ssh to the cam and create a mount point, for example located in /media/storage, and add the proper line to the /etc/fstab file. The following is an example of the procedure:
|
||||
|
||||
```
|
||||
# mkdir /media/storage
|
||||
|
||||
# vi /etc/fstab
|
||||
{ ... content os /etc/fstab ommited ... }
|
||||
#Line added to the etc/fstab file
|
||||
/dev/mmcblk0p2 /media/storage ext3 rw,relatime 0 0
|
||||
{ ..end of /etc/fstab }
|
||||
|
||||
# mount /media/storage
|
||||
```
|
||||
*Note: The vi command is for editing the /etc/fstab file you dont have to add the comments enclosed by brackets { ... .... }* only th line that begins with /dev is necessary to be **added** an the end of the file
|
||||
*Note 2: The mount command is only needed this time, the next reboot it wil be mounted automatically*
|
||||
|
||||
4. Put your credentials on etc/wpa_supplicant.conf in your EXT3 partition
|
||||
5. Unmount the MicroSD card
|
||||
6. Put the MicroSD card in your camera and boot it
|
||||
|
||||
## Features
|
||||
|
||||
|
||||
|
||||
* Complete open source
|
||||
* Audio should be working now
|
||||
* No more /system/sdcard/ paths. Everything will have its own place.
|
||||
@@ -25,3 +86,12 @@ It will provide a lot of cool software without compiling (git, python etc.)
|
||||
## Known issues
|
||||
|
||||
* A lot of scripts classic Xiaomi-Dafang-Hacks are broken and need refactoring - mostly paths.
|
||||
|
||||
## Troubleshooting
|
||||
If you have problems booting up and cannot connect to IP of the cam, remove th card form the camera al mount it on a PC, locate the var/log/startup.log on the root of the MicroSD Card and read it. Also you can put content inside the etc/init.d/rcS, like :
|
||||
```
|
||||
echo "CUSTOM LOG: Loading wireless drivers from /lib/modules/$KERNEL_VERSION" >> $LOGPATH
|
||||
|
||||
```
|
||||
|
||||
To see your custom boot log messages.
|
||||
|
Reference in New Issue
Block a user