Merge branch 'gtxaspec:master' into master

This commit is contained in:
virmaior 2022-07-15 17:54:29 +09:00 committed by GitHub
commit 51102719c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 161 additions and 10 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
generate_checksum.sh

View File

@ -1,7 +1,7 @@
# wz_mini_hacks
### v2/PANv1/v3/PANv2 devices ONLY
### v2/car/PANv1/v3/PANv2 devices ONLY
Run whatever firmware you want on your v2/PANv1/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.
Run whatever firmware you want on your v2/car/PANv1/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.
**Do not contact the manufacturer for information or support, they will not be able to assist or advise you!**
@ -17,7 +17,7 @@ Using this project can potentially expose your device to the open internet depen
* No modification is done to the device filesystem. **_Zero!_** (T31 only)
* Custom kernel loads all required files from micro-sd card at boot time
* Easy uninstall, just remove files from micro-sd card, or don't use a micro-sd card at all!
* Works on ANY firmware release (so far!)
* Works on ANY firmware release up to 4.36.9.139 (DO NOT UPGRADE BEYOND THIS FW IF YOU WANT RTSP or any `cmd` FEATURES!)
* Compatability is not guaranteed with really old firmware versions!
* Update to the latest stable or beta firmware, this mod should still work!
* Block remote or app initiated firmware updates
@ -102,6 +102,7 @@ Using this project can potentially expose your device to the open internet depen
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. If you have a car, you will now need to convert the camera to the car firmware. Use the car app to do this. After the conversion is complete, wz_mini remains active.
5. You may also login via the serial console, password is WYom2020
## Removal
@ -449,15 +450,27 @@ Disable the movement capability on motorized devices. You will no longer be abl
---
ENABLE_FSCK_ON_BOOT="false"
ENABLE_FSCK_ON_BOOT="true"
run fsck.vfat on boot. This runs fsck.vfat, the FAT disk repair utility on the micro sd card, automatically repairing most issues, including corruption. Increases boot time. During the repair process, the LEDs on the camera will flash RED-off-BLUE-off-PURPLE-off to inform the user the repair program is running. Once the program has completed, the LED will switch to RED, resuming the normal boot process.
---
ENABLE_CAR_DRIVER="true"
Loads the appropriate driver for the car to function. On devices other than a V2 with the car firmware, the car may be controlled via `car_control.sh` on the command line. experimental!
`car_control.sh` defaults to high speed
`car_control.sh low_speed` low speed
`car_control constant` direction is constant, car keeps moving the direction you select without holding down any keys.
`car_control.sh constant low_speed` like above, but in low speed
---
## Latest Updates
* 07-13-22: Includes latest build of libcallback, better RTSP video and audio performance: fixed broken audio caused by motor_stop on T20 devices, fixed waitMotion errors. `cmd jpeg` currently still broken on T20 devices, updated scripts to account for changes. Some usage of `cmd` has changes, please see command output. Kernel & modules updated to prepare for H265 support on T31.
* 07-14-22: Add car compatability with normally unsupported devices.
* 07-13-22: Includes latest build of libcallback, better RTSP video and audio performance: fixed broken audio caused by motor_stop on T20 devices, fixed waitMotion errors. `cmd jpeg` currently still broken on T20 devices, updated scripts to account for changed. Some usage of `cmd` has changes, please see command output. Kernel & modules updated to prepare for H265 support on T31.
* 07-08-22: Added support for multiple custom scripts, simply create scripts ending in .sh in wz_mini/etc/rc.local.d. You can prefix them with numbers to order execution if desired.
* 07-08-22: Updated T31 Kernel & Modules, added cp210x serial kernel module to support car. Add motor disable, fsck on boot. Disable debug logging for wifi drivers to prevent log spam, improved method of setting imp variables, fixed soundcard issues in the kernel, revert libcallback to account for this change.
* 06-24-22: BIG UPGRADE! Updated & improved WiFi Drivers - 8189fs and 6032i - Drivers work across all supported camera models. This update requires you to copy over a new wz_mini.conf before upgrading! Drivers required for operation, do not disable! Updated upgrade-run.sh script to prevent broken boot during a rare corrupted file situation. Added connection bonding, for network fail-over support.

View File

@ -0,0 +1,111 @@
#!/bin/sh
echo "=== CAR CONTROL over COMMAND LINE! ==="
echo "CAR: car_control.sh"
echo "CAR: car_control.sh constant"
echo "CAR: car_control.sh constant low_speed"
echo "CAR: car_control.sh low_speed"
echo "CAR: w: forward "
echo "CAR: d: reverse"
echo "CAR: a: turn wheel left"
echo "CAR: d: turn wheel right"
echo "CAR: q: forward left"
echo "CAR: e: forward right"
echo "CAR: z: reverse left"
echo "CAR: c: reverse right"
echo "CAR: x: all stop"
echo "CAR: use 1 to quit ASAP!"
echo -e ""
echo "Ready!"
trap control_c SIGINT
control_c()
{
echo -ne "\xaa\x55\x43\x06\x29\x80\x80\x00\x02\x71" > /dev/ttyUSB0
echo "control-c KILL"
pkill -9 -f car_control.sh
}
#idle background loop
while true; do
echo -ne "\xaa\x55\x43\x06\x29\x80\x80\x00\x02\x71" > /dev/ttyUSB0
#fw sends 0.2
sleep 0.2
done &
while true; do
if [ "$1" == "constant" ]; then
read -s -n1 -t 0.05 input
else
read -rsn1 input
fi
if [ "$input" = "w" ]; then
#forward
if [ "$1" == "low_speed" ] || [ "$2" == "low_speed" ]; then
echo -ne "\xaa\x55\x43\x06\x29\x80\xca\x00\x02\xbb" > /dev/ttyUSB0
else
echo -ne "\xaa\x55\x43\x06\x29\x80\xe3\x00\x02\xd4" > /dev/ttyUSB0
fi
elif [ "$input" = "s" ]; then
#reverse
if [ "$1" == "low_speed" ] || [ "$2" == "low_speed" ]; then
echo -ne "\xaa\x55\x43\x06\x29\x80\x3b\x00\x02\x2c" > /dev/ttyUSB0
else
echo -ne "\xaa\x55\x43\x06\x29\x80\x36\x00\x02\x27" > /dev/ttyUSB0
fi
elif [ "$input" = "a" ]; then
#left
echo -ne "\xaa\x55\x43\x06\x29\x76\x81\x00\x02\x68" > /dev/ttyUSB0
elif [ "$input" = "d" ]; then
#right
echo -ne "\xaa\x55\x43\x06\x29\x8a\x81\x00\x02\x7c" > /dev/ttyUSB0
elif [ "$input" = "q" ]; then
#forward left
if [ "$1" == "low_speed" ] || [ "$2" == "low_speed" ]; then
echo -ne "\xaa\x55\x43\x06\x29\x76\xca\x00\x02\xb1" > /dev/ttyUSB0
else
echo -ne "\xaa\x55\x43\x06\x29\x76\xe3\x00\x02\xca" > /dev/ttyUSB0
fi
elif [ "$input" = "e" ]; then
#forward right
if [ "$1" == "low_speed" ] || [ "$2" == "low_speed" ]; then
echo -ne "\xaa\x55\x43\x06\x29\x8a\xca\x00\x02\xc5" > /dev/ttyUSB0
else
echo -ne "\xaa\x55\x43\x06\x29\x8a\xe3\x00\x02\xde" > /dev/ttyUSB0
fi
elif [ "$input" = "z" ]; then
#reverse left
if [ "$1" == "low_speed" ] || [ "$2" == "low_speed" ]; then
echo -ne "\xaa\x55\x43\x06\x29\x76\x3b\x00\x02\x22" > /dev/ttyUSB0
else
echo -ne "\xaa\x55\x43\x06\x29\x76\x36\x00\x02\x1d" > /dev/ttyUSB0
fi
elif [ "$input" = "c" ]; then
#reverse right
if [ "$1" == "low_speed" ] || [ "$2" == "low_speed" ]; then
echo -ne "\xaa\x55\x43\x06\x29\x8a\x3b\x00\x02\x36" > /dev/ttyUSB0
else
echo -ne "\xaa\x55\x43\x06\x29\x8a\x36\x00\x02\x31" > /dev/ttyUSB0
fi
elif [ "$input" = "c" ]; then
echo -ne "\xaa\x55\x43\x06\x29\x80\x80\x00\x02\x71" > /dev/ttyUSB0
elif [ "$input" = "1" ]; then
#exit
echo -ne "\xaa\x55\x43\x06\x29\x80\x80\x00\x02\x71" > /dev/ttyUSB0
pkill -9 -f car_control.sh
break
fi
done

BIN
SD_ROOT/wz_mini/bin/curl Executable file

Binary file not shown.

View File

@ -140,6 +140,13 @@ if [ -f /opt/wz_mini/tmp/.T20 ]; then
mount -t jffs2 /dev/mtdblock4 /system
fi
#Check for Car FW
if [ -f /opt/wz_mini/tmp/.WYZEC1-JZ ]; then
if cat /system/bin/app.ver | grep 4.55; then
touch /opt/wz_mini/tmp/.CAR
fi
fi
echo "Copy factory app_init.sh"
cp /system/init/app_init.sh /opt/wz_mini/tmp/.storage/app_init.sh

View File

@ -138,6 +138,11 @@ if [[ "$DISABLE_MOTOR" == "true" ]]; then
touch /opt/wz_mini/tmp/.ms
fi
#Enable serial driver for car
if [ -f /opt/wz_mini/tmp/.CAR ] || [[ "$ENABLE_CAR_DRIVER" == "true" ]]; then
modprobe cp210x
fi
/opt/wz_mini/etc/init.d/wz_user.sh &
##LIBRARY DEBUG

View File

@ -91,6 +91,7 @@ ENABLE_MP4_WRITE="false"
NIGHT_DROP_DISABLE="false"
DISABLE_MOTOR="false"
ENABLE_FSCK_ON_BOOT="false"
ENABLE_CAR_DRIVER="false"
#####DEBUG#####
#drops you to a shell via serial, doesn't load app_init.sh

View File

@ -0,0 +1 @@
Thu Jul 14 04:01:23 PM PDT 2022

View File

@ -91,6 +91,7 @@ ENABLE_MP4_WRITE="false"
NIGHT_DROP_DISABLE="false"
DISABLE_MOTOR="false"
ENABLE_FSCK_ON_BOOT="false"
ENABLE_CAR_DRIVER="false"
#####DEBUG#####
#drops you to a shell via serial, doesn't load app_init.sh

View File

@ -3,13 +3,13 @@ d41d8cd98f00b204e9800998ecf8427e SD_ROOT/wz_mini/mnt/.gitignore
28cf061770da7b83fbc3752c455a02c3 SD_ROOT/wz_mini/etc/dnsmasq.conf
34c6a4c3a941ff2becd9f487826d7692 SD_ROOT/wz_mini/etc/uvc.config
ad7d1a2f9db3079617731b5854ce3b6a SD_ROOT/wz_mini/etc/init.d/wz_cam.sh
4fa268615ba8103545b062ca403bd6e8 SD_ROOT/wz_mini/etc/init.d/wz_init.sh
f97ffcb1482d564bf2557684a4c68846 SD_ROOT/wz_mini/etc/init.d/wz_init.sh
52c9d41071b59825a9b8c66e55289f0d SD_ROOT/wz_mini/etc/init.d/wz_user.sh
24d3dbf789915507ce7aee7537ec0826 SD_ROOT/wz_mini/etc/init.d/wz_post.sh
4eaf541a47e60035992435b115463541 SD_ROOT/wz_mini/etc/init.d/wz_post.sh
e3034eac02d8eda9902ca9cf89f0a586 SD_ROOT/wz_mini/etc/inittab
840aa9c26726201f7cffbf001bee193a SD_ROOT/wz_mini/etc/uvc_jxf22.config
d41d8cd98f00b204e9800998ecf8427e SD_ROOT/wz_mini/etc/rc.local.d/.gitignore
f9fea7e8c6926879a1088d41c8a616e9 SD_ROOT/wz_mini/etc/wz_mini.conf.dist
7c885d8d7ea04c23d1e6622608d40cca SD_ROOT/wz_mini/etc/wz_mini.conf.dist
8b5e58acfcbb20034dc4873a08b45fd9 SD_ROOT/wz_mini/etc/profile
2c2df1b9cb603f9c31c46162d6ac307f SD_ROOT/wz_mini/etc/alsa/alsa.conf
9e5591da95042bcca910403bde25dc60 SD_ROOT/wz_mini/etc/fstab
@ -42,8 +42,10 @@ c77675d150e2274de3cfe08c5c295f8f SD_ROOT/wz_mini/bin/ld
14e944353e335cff9430080e1ca007f6 SD_ROOT/wz_mini/bin/busybox
aba4bad7530f7f702d4c27b103cc970d SD_ROOT/wz_mini/bin/scp
c5d2801b7117b8db6275647110e6c8f1 SD_ROOT/wz_mini/bin/iwconfig.sh
52f9e7711ae7ae75ff42d63a42e31d41 SD_ROOT/wz_mini/bin/car_control.sh
67ab51181a29f16e60d879d793d4407f SD_ROOT/wz_mini/bin/audioplay_t20
78aaf46b312749d71c1f93a97f80fa74 SD_ROOT/wz_mini/bin/nm
e6bcaf0465750b67cff55eb3e380e624 SD_ROOT/wz_mini/bin/curl
02c62618633915a282a547411524ed3c SD_ROOT/wz_mini/bin/v4l2rtspserver
a9b8e51b956806e27021e6524ba917ed SD_ROOT/wz_mini/bin/ranlib
2393ba8bfe8c86775b8eb7b40fa2fe57 SD_ROOT/wz_mini/bin/dnsmasq
@ -84,6 +86,7 @@ b339aee882a5d1c943ad08e4282ec3fd SD_ROOT/wz_mini/usr/bin/iCamera-dbg
20b061689308b2cee7edf3b9b906bca7 SD_ROOT/wz_mini/usr/bin/ucamera
3777d9e80c8b517c01a124e6360b6525 SD_ROOT/wz_mini/usr/bin/imp_helper.sh
580b1b6e91e72b4a4fef7b21d8954403 SD_ROOT/wz_mini/usr/bin/getSensorType
0a0d0aaf0eb4ba6be237ea4511cae1fe SD_ROOT/wz_mini/usr/bin/app.ver
4c780f0455481d106d47d89f0ae04ed5 SD_ROOT/wz_mini/lib/uClibc.tar
9afeb088e4cbabbe0b04033b560204d0 SD_ROOT/wz_mini/lib/libimp.so
4100755cb6cc6e3b76da20c7e3690e16 SD_ROOT/wz_mini/lib/libalog.so
@ -232,7 +235,7 @@ c6a2e765996b4a8bfe351757785fb989 SD_ROOT/wz_mini/lib/modules/3.10.14__isvp_swan
14865a6e2e2df87a8362c6f20377a934 SD_ROOT/wz_mini/lib/libtinyalsa.so.2
bd383994491e4bdca81788c168feb2eb SD_ROOT/wz_mini/lib/libasound.so.2
f6f0d5a9ebd916de6bdb9695067809ae SD_ROOT/wz_mini/lib/libaudioProcess.so
f9fea7e8c6926879a1088d41c8a616e9 SD_ROOT/wz_mini/wz_mini.conf
7c885d8d7ea04c23d1e6622608d40cca SD_ROOT/wz_mini/wz_mini.conf
d41d8cd98f00b204e9800998ecf8427e SD_ROOT/wz_mini/tmp/.gitignore
30cd28d6e52753c4afe5d6bca209bfc7 v2_install/compile_image.sh
53db8da5b90bc9b219dbb1d58e934bda v2_install/fw_tool.sh

10
generate_checksum.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
#set release date before generation
date > SD_ROOT/wz_mini/usr/bin/app.ver
rm -f file.chk
find SD_ROOT/ -type f -exec md5sum "{}" + > file.chk
#Ignore demo.bin
find v2_install -type f ! -name "demo.bin" -exec md5sum "{}" + >> file.chk