From 5d709971f72115c0476215d7e1808dd183cbb0cd Mon Sep 17 00:00:00 2001 From: jmtatsch Date: Fri, 30 Dec 2022 13:40:39 +0100 Subject: [PATCH 1/4] 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 Co-authored-by: Nick Kaijaks --- hacks/install_cfw.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hacks/install_cfw.md b/hacks/install_cfw.md index e9f6d33..031fac6 100644 --- a/hacks/install_cfw.md +++ b/hacks/install_cfw.md @@ -95,6 +95,9 @@ network={ } ``` + +5. Inspect you sdcard for logs/startup.log + If your Wi-Fi WPA setup uses protocol WPA2, add proto=WPA2 under ssid= ``` ctrl_interface=/var/run/wpa_supplicant @@ -114,7 +117,6 @@ ssid="enteryourssidherebutrememebertokeepthequotes" } ``` - 5. Inspect you sdcard for logs/startup.log ### Advanced Installation From 4339f8c247c1802c394175e523fe76decc1a8d7c Mon Sep 17 00:00:00 2001 From: Nemesis24 Date: Wed, 7 Jun 2023 15:18:00 +0200 Subject: [PATCH 2/4] Update ui_motion.cgi (#1858) --- firmware_mod/www/cgi-bin/ui_motion.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware_mod/www/cgi-bin/ui_motion.cgi b/firmware_mod/www/cgi-bin/ui_motion.cgi index fafc021..9fba764 100755 --- a/firmware_mod/www/cgi-bin/ui_motion.cgi +++ b/firmware_mod/www/cgi-bin/ui_motion.cgi @@ -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
" + echo "Samba password set
" fi if [ -n "${F_smbStillsDir+x}" ]; then F_smbStillsDir=$(printf '%b' "${F_smbStillsDir//%/\\x}" | sed 's/\//\\\//g') From 652e90ef6c5ef17611a1901fe59e901e30e3d33c Mon Sep 17 00:00:00 2001 From: numericOverflow Date: Wed, 9 Aug 2023 01:04:53 -0500 Subject: [PATCH 3/4] Update Gitter URLs as old ones returned a HTTP 404 Not Found (#1874) --- .github/ISSUE_TEMPLATE.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 2260f5a..bc81393 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -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 diff --git a/README.md b/README.md index baa8540..78331b9 100644 --- a/README.md +++ b/README.md @@ -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. From 03338b92578f2b8f6f498bb5ea0db7f0632d1fd4 Mon Sep 17 00:00:00 2001 From: jcplaza Date: Sun, 13 Aug 2023 13:25:50 +0200 Subject: [PATCH 4/4] Improve install_sdcard.md documentation (#1865) --- hacks/install_sdcard.md | 84 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 77 insertions(+), 7 deletions(-) diff --git a/hacks/install_sdcard.md b/hacks/install_sdcard.md index 06ba0e3..aed617a 100644 --- a/hacks/install_sdcard.md +++ b/hacks/install_sdcard.md @@ -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 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 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_\.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.