From 0b4f7edf6e9f420226313bb507476e214151d756 Mon Sep 17 00:00:00 2001 From: Alfonso Gamboa Date: Wed, 25 May 2022 23:50:50 -0700 Subject: [PATCH] enable rndis and usb direct mode for v2 --- README.md | 7 +++---- SD_ROOT/wz_mini/etc/init.d/wz_user.sh | 20 ++++++++++++++------ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 8a769e4..485397b 100644 --- a/README.md +++ b/README.md @@ -64,9 +64,7 @@ Using this project can potentially expose your device to the open internet depen 1. PAN v2: - Tilt (Vertical) only works at motor speed 9 2. v2 - - webcam mode does not work on v2 - - usb direct does not work on v2 yet - - rndis mode on v2 is untested + - webcam mode does not work on v2 yet ## Setup v3/PANv2 @@ -289,7 +287,8 @@ edit the file `wz_mini/usr/bin/rtmp-stream.sh` with your stream keys and then ru ## Latest Updates -* 05-24-22: add experimental youtube/twitch/facebook live steam rtmp support in `wz_mini/usr/bin/rtmp-stream.sh` +* 05-25-22: usb direct mode and rndis are now supported on the v2 camera +* 05-25-22: add experimental youtube/twitch/facebook live steam rtmp support in `wz_mini/usr/bin/rtmp-stream.sh` * 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-23-22: added simple wireguard startup configuration. * 05-22-22: added fps variable for rtsp server, thanks @claudobahn. diff --git a/SD_ROOT/wz_mini/etc/init.d/wz_user.sh b/SD_ROOT/wz_mini/etc/init.d/wz_user.sh index 0cd013b..c4fb8c4 100755 --- a/SD_ROOT/wz_mini/etc/init.d/wz_user.sh +++ b/SD_ROOT/wz_mini/etc/init.d/wz_user.sh @@ -210,14 +210,22 @@ fi if [[ "$ENABLE_USB_DIRECT" == "true" ]]; then - #Set dwc2 ID_PIN driver memory - devmem 0x13500000 32 0x001100cc - devmem 0x10000040 32 0x0b000096 - #wipe the bits to set the ID_PIN - devmem 0x10000040 32 0x0b000FFF - host_macaddr=$(echo $HOSTNAME|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/') + if [[ "$V2" == "true" ]]; then + echo connect > /sys/devices/platform/jz-dwc2/dwc2/udc/dwc2/soft_connect + sleep 1 + devmem 0x10000040 32 0x0b800096 + sleep 1 + devmem 0x13500000 32 0x001100cc + else + #Set dwc2 ID_PIN driver memory + devmem 0x13500000 32 0x001100cc + devmem 0x10000040 32 0x0b000096 + #wipe the bits to set the ID_PIN, only for the V3. + devmem 0x10000040 32 0x0b000FFF + fi + if [[ "$V2" == "false" ]]; then insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/kernel/drivers/usb/gadget/u_ether.ko insmod /opt/wz_mini/lib/modules/3.10.14__isvp_swan_1.0__/kernel/drivers/usb/gadget/usb_f_ncm.ko