EliasKotlyar / Xiaomi-Dafang-Hacks

4.17k stars 1k forks source link

Doesn't go to stock firmware when sd card is removed (Wyze Cam v2) #1624

Closed netcheung closed 3 years ago

netcheung commented 3 years ago

Wyze Cam V2 with open source U-boot

Description

After flashing CFW1.1, my WyzeCam v2 works fine with custom firmware booting from sd card. However, when I try to go back stock firmware by removing sd card.

I did try to put stock firmware as demo.bin, push setup button for 3 to 6 sec. and try to flash back to stock firmware but no luck at all. I believe it is due to my 'new version' of wyze cam v2 with 'old' firmware 'cfw1.1' which caused a semi-bricked device (only work with booting from SD card).

Any suggestion or chance that I can flash back stock firmware? Very very appreciated for any suggestion and help.

vinniet commented 3 years ago

I also have not found way to revert the firmware back to stock. The instructions says to remove the run.sh which did nothing besides the device not coming online.

jsj0318 commented 3 years ago

Even if I remove the SD card, it won't go back to the original version. Maybe it's because I worked on a patch for 1080p. I also want to know how to go back to the original.

vinniet commented 3 years ago

I read somewhere if you use the Wyze RTSP firmware that was in beta you could get back. I tried to look up the bookmarked URL and its gone. Did anyone try this?

NorthernMan54 commented 3 years ago

This is unlikely to help as it was a bit involved and may not resolve your issue. I'm doing this more to help anyone else in the same situation and save them a similar amount of googling I did over the last few days. After reading a lot of posts and other issues, I determined my problem was a defective bootloader that would no longer do updates.

I had changed the boot loader on my Wyze Cam 2 as part of trying to get 1080p working and wanted to go to the Webcam firmware by putting demo.bin on the SD card and holding setup when starting.

1 - Install serial pins on board and connect to your laptop. Please note that the pins are in a slightly different location on the wyze V2 cam, but the order is the same. RX - TX - GND, with RX in the corner.

2 - Put a copy of the original uboot.bin and the firmware you want to upgrade to on the SD Card. If your like me and lost the original uboot.bin for the V2, the latest Wyze V2 boot loader firmware is available here.

3 - Connect the serial cable, boot the camera and press any key immediately

4 - Install the original boot loader firmware using these commands. to install new version using the boot loader.

5 - After complete, enter the command reset

6 - Normal firmware updates from the SD card should now work.

This is a log of replacing the boot loader, then upgrading the firmware to the webcam version.

U-Boot SPL 2013.07-gba03eeb (Dec 04 2018 - 21:41:16)
pll_init:365
l2cache_clk = 375000000
pll_cfg.pdiv = 8, pll_cfg.h2div = 4, pll_cfg.h0div = 4, pll_cfg.cdiv = 1, pll_cfg.l2div = 3
nf=36 nr = 1 od0 = 1 od1 = 1
cppcr is 02404900
CPM_CPAPCR 0470890d
nf=42 nr = 1 od0 = 1 od1 = 1
cppcr is 02a04900
CPM_CPMPCR 07d0c90d
nf=50 nr = 1 od0 = 1 od1 = 1
cppcr is 03204900
CPM_CPVPCR 0320490d
cppcr 0x9a794410
apll_freq 860160000
mpll_freq 1000000000
vpll_freq = 1200000000
ddr sel mpll, cpu sel apll
ddrfreq 500000000
cclk  860160000
l2clk 286720000
h0clk 250000000
h2clk 250000000
pclk  125000000
DDRC_DLP:0000f003

U-Boot 2013.07-gba03eeb (Dec 04 2018 - 21:41:16)

Bootloader-Version: Dafanghacks v2
Board: Dafang 128MB (Ingenic XBurst T20 SoC)
DRAM:  128 MiB
Top of RAM usable for U-Boot at: 84000000
Reserving 419k for U-Boot at: 83f94000
Reserving 32784k for malloc() at: 81f90000
Reserving 32 Bytes for Board Info at: 81f8ffe0
Reserving 124 Bytes for Global Data at: 81f8ff64
Reserving 128k for boot params() at: 81f6ff64
Stack Pointer at: 81f6ff48
Now running in RAM - U-Boot at: 83f94000
MMC:   msc: 0
the id code = 1c7018
unsupport ID is if the id not be 0x00,the flash is ok for burner
the manufacturer 1c
SF: Detected FM25Q64

*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Setting yellow_gpio to off:
gpio_request lable = cmd_gpio gpio = 38
gpio: pin 38 (gpio 38) value is 1
Setting blue_gpio to off:
gpio_request lable = cmd_gpio gpio = 39
gpio: pin 39 (gpio 39) value is 1
Setting night_gpios:
gpio_request lable = cmd_gpio gpio = 81
gpio: pin 81 (gpio 81) value is 0
gpio_request lable = cmd_gpio gpio = 49
gpio: pin 49 (gpio 49) value is 0
gpio_request lable = cmd_gpio gpio = 25
gpio: pin 25 (gpio 25) value is 0
Setting USB enable:
gpio_request lable = cmd_gpio gpio = 47
gpio: pin 47 (gpio 47) value is 1
Setting Speaker enable:
gpio_request lable = cmd_gpio gpio = 63
gpio: pin 63 (gpio 63) value is 1
Setting Enable SDCARD:
gpio_request lable = cmd_gpio gpio = 43
gpio: pin 43 (gpio 43) value is 1
gpio_request lable = cmd_gpio gpio = 48
gpio: pin 48 (gpio 48) value is 0
Running SDupdate....
Interface:  MMC
  Device 0: Vendor: Man 00009c Snr a503f401 Rev: 10.7 Prod: USD00␂
            Type: Removable Hard Disk
            Capacity: 15343.0 MB = 14.9 GB (31422464 x 512)
Filesystem: FAT32 "UNTITLED   "
the id code = 1c7018
unsupport ID is if the id not be 0x00,the flash is ok for burner
the manufacturer 1c
SF: Detected FM25Q64

reading flash-uboot.bin
reading flash-kernel.bin
reading flash-rootfs.bin
reading flash-full.bin
Hit any key to stop autoboot:  0
U-Boot> fatls mmc 0:1
            .spotlight-v100/
            record/
 11075648   demo.bin
            time_lapse/
     4096   ._demo.bin
       13   time.ini
   262144   wyzecam_v2_stock_bootloader.bin

4 file(s), 3 dir(s)

U-Boot> fatload mmc 0:1 0x80600000 wyzecam_v2_stock_bootloader.bin
reading wyzecam_v2_stock_bootloader.bin
262144 bytes read in 20 ms (12.5 MiB/s)
U-Boot>
U-Boot> sf probe
the id code = 1c7018
unsupport ID is if the id not be 0x00,the flash is ok for burner
the manufacturer 1c
SF: Detected FM25Q64

--->probe spend 12 ms
U-Boot>
the id code = 1c7018
unsupport ID is if the id not be 0x00,the flash is ok for burner
the manufacturer 1c
SF: Detected FM25Q64

--->probe spend 12 ms
U-Boot> sf update 0x80600000 0x0 0x40000
262144 bytes written, 0 bytes skipped in 1.130s, speed 236924 B/s
--->update spend 1136 ms
U-Boot>
0 bytes written, 262144 bytes skipped in 0.42s, speed 5965232 B/s
--->update spend 48 ms
U-Boot> reset
reset in 4ms

U-Boot SPL 2013.07 (Jul 05 2018 - 13:33:27)
pll_init:365
l2cache_clk = 375000000
pll_cfg.pdiv = 8, pll_cfg.h2div = 4, pll_cfg.h0div = 4, pll_cfg.cdiv = 1, pll_cfg.l2div = 3
nf=36 nr = 1 od0 = 1 od1 = 1
cppcr is 02404900
CPM_CPAPCR 0470890d
nf=42 nr = 1 od0 = 1 od1 = 1
cppcr is 02a04900
CPM_CPMPCR 07d0c90d
nf=50 nr = 1 od0 = 1 od1 = 1
cppcr is 03204900
CPM_CPVPCR 0320490d
cppcr 0x9a794410
apll_freq 860160000
mpll_freq 1000000000
vpll_freq = 1200000000
ddr sel mpll, cpu sel apll
ddrfreq 500000000
cclk  860160000
l2clk 286720000
h0clk 250000000
h2clk 250000000
pclk  125000000
DDRC_DLP:0000f003

U-Boot 2013.07 (Jul 05 2018 - 13:33:27)

Board: ISVP (Ingenic XBurst T20 SoC)
DRAM:  128 MiB
Top of RAM usable for U-Boot at: 84000000
Reserving 399k for U-Boot at: 83f9c000
Reserving 32784k for malloc() at: 81f98000
Reserving 32 Bytes for Board Info at: 81f97fe0
Reserving 124 Bytes for Global Data at: 81f97f64
Reserving 128k for boot params() at: 81f77f64
Stack Pointer at: 81f77f48
Now running in RAM - U-Boot at: 83f9c000
MMC:   msc: 0
the manufacturer 1c
SF: Detected FM25Q64

*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
misc_init_r before change the wifi_enable_gpio
gpio_request lable = wifi_enable_gpio gpio = 62
misc_init_r after gpio_request the wifi_enable_gpio ret is 62
misc_init_r after change the wifi_enable_gpio ret is 0
misc_init_r before change the yellow_gpio
gpio_request lable = yellow_gpio gpio = 38
misc_init_r after gpio_request the yellow_gpio ret is 38
misc_init_r after change the yellow_gpio ret is 0
misc_init_r before change the blue_gpio
gpio_request lable = blue_gpio gpio = 39
misc_init_r after gpio_request the blue_gpio ret is 39
misc_init_r after change the blue_gpio ret is 1
gpio_request lable = night_gpio gpio = 81
misc_init_r after gpio_request the night_gpio ret is 81
misc_init_r after change the night_gpio ret is 0
gpio_request lable = night_gpio gpio = 25
misc_init_r after gpio_request the night_gpio ret is 25
misc_init_r after change the night_gpio ret is 0
gpio_request lable = night_gpio gpio = 49
misc_init_r after gpio_request the night_gpio ret is 49
misc_init_r after change the night_gpio ret is 0
gpio_request lable = USB_able_gpio gpio = 47
misc_init_r after gpio_request the USB_able_gpio ret is 47
misc_init_r after change the USB_able_gpio ret is 0
gpio_request lable = TF_able_gpio gpio = 43
misc_init_r after gpio_request the TF_able_gpio ret is 43
misc_init_r after change the TF_able_gpio ret is 1
gpio_request lable = SPK_able_gpio gpio = 63
misc_init_r after gpio_request the SPK_able_gpio ret is 63
misc_init_r after change the SPK_able_gpio ret is 0
gpio_request lable = SD_able_gpio gpio = 48
misc_init_r after gpio_request the SD_able_gpio ret is 48
misc_init_r after change the SD_able_gpio ret is 0
misc_init_r before change the wifi_enable_gpio
gpio_request lable = wifi_enable_gpio gpio = 62
misc_init_r after gpio_request the wifi_enable_gpio ret is 62
misc_init_r after change the wifi_enable_gpio ret is 1
Hit any key to stop autoboot:  0
jiabo_do_auto_update!!!!!!!!!!!!!!!!!!!!!!!!
gpio_request lable = sdupgrade gpio = 46
setup_button set long!!!!!!!!!!!!!!!!!!!
Interface:  MMC
  Device 0: Vendor: Man 00009c Snr a503f401 Rev: 10.7 Prod: USD00␂
            Type: Removable Hard Disk
            Capacity: 15343.0 MB = 14.9 GB (31422464 x 512)
Filesystem: FAT32 "UNTITLED   "
the manufacturer 1c
SF: Detected FM25Q64

reading demo.bin
reading demo.bin
jiabo_au_check_cksum_valid!!!!!!!!!!!!!!!!!!!!!!!!
jiabo_idx=4
misc_init_r before change the blue_gpio
gpio_request lable = blue_gpio gpio = 39
misc_init_r after gpio_request the blue_gpio ret is 39
misc_init_r after change the blue_gpio ret is 0
jiabo_start=40000,jiabo_len=a90000
flash erase...
flash write...
misc_init_r after change the blue_gpio ret is 1
the manufacturer 1c
SF: Detected FM25Q64

--->probe spend 4 ms
SF: 2621440 bytes @ 0x40000 Read: OK
--->read spend 381 ms
## Booting kernel from Legacy Image at 80600000 ...
   Image Name:   Linux-3.10.14
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1816781 Bytes = 1.7 MiB
   Load Address: 80010000
   Entry Point:  803e9230
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.10.14 (ywu@4) (gcc version 4.7.2 (Ingenic r2.3.3 2016.12) ) #43 PREEMPT Fri Mar 20 23:44:32 CST 2020
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 RESET ERROR PC:67FEF0DF
[    0.000000] CPU0 revision is: 00d00101 (Ingenic Xburst)
[    0.000000] FPU revision is: 00b70000
[    0.000000] CCLK:860MHz L2CLK:430Mhz H0CLK:200MHz H2CLK:200Mhz PCLK:100Mhz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 00528000 @ 00010000 (usable)
[    0.000000]  memory: 00038000 @ 00538000 (usable after init)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 06800000 @ 00000000 (usable)
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x067fffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x067fffff]
[    0.000000] Primary instruction cache 32kB, 8-way, VIPT, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 8-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] pls check processor_id[0x00d00101],sc_jz not support!
[    0.000000] MIPS secondary cache 128kB, 8-way, linesize 32 bytes.
[    0.000000] Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 26416
[    0.000000] Kernel command line: console=ttyS1,115200n8 mem=104M@0x0 ispmem=8M@0x6800000 rmem=16M@0x7000000 init=/linuxrc rootfstype=squashfs root=/dev/mtdblock2 rw mtdparts=jz_sfc:256k(boot),2048k(kernel),3392k(root),640k(driver),4736k(appfs),2048k(backupk),640k(backupd),2048k(backupa),256k(config),256k(para),-(flag)
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 99364k/106496k available (3975k kernel code, 7132k reserved, 1301k data, 224k init, 0k highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:418
[    0.000000] clockevents_config_and_register success.
[    0.000024] Calibrating delay loop... 858.52 BogoMIPS (lpj=4292608)
[    0.087751] pid_max: default: 32768 minimum: 301
[    0.092734] Mount-cache hash table entries: 512
[    0.097837] Initializing cgroup subsys debug
[    0.102098] Initializing cgroup subsys freezer
[    0.109174] regulator-dummy: no parameters
[    0.113417] NET: Registered protocol family 16
[    0.135482] bio: create slab <bio-0> at 0
[    0.141808] jz-dma jz-dma: JZ SoC DMA initialized
[    0.147068] SCSI subsystem initialized
[    0.150998] usbcore: registered new interface driver usbfs
[    0.156572] usbcore: registered new interface driver hub
[    0.162008] usbcore: registered new device driver usb
[    0.167338] i2c-gpio i2c-gpio.1: using pins 57 (SDA) and 58 (SCL)
[    0.173538]  (null): set:249  hold:250 dev=100000000 h=500 l=500
[    0.179676] media: Linux media interface: v0.10
[    0.184236] Linux video capture interface: v2.00
[    0.191020] Switching to clocksource jz_clocksource
[    0.195976] cfg80211: Calling CRDA to update world regulatory domain
[    0.203089] jz-dwc2 jz-dwc2: cgu clk gate get error
[    0.208026] DWC IN DEVICE ONLY MODE
[    0.212152] dwc2 dwc2: Keep PHY ON
[    0.215545] dwc2 dwc2: Using Buffer DMA mode
[    0.219851] dwc2 dwc2: Core Release: 3.00a
[    0.224311] dwc2 dwc2: enter dwc2_gadget_plug_change:2607: plugin = 1 pullup_on = 0 suspend = 0
[    0.233309] NET: Registered protocol family 2
[    0.238234] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.245309] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.251700] TCP: Hash tables configured (established 1024 bind 1024)
[    0.258196] TCP: reno registered
[    0.261396] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.267350] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.273966] NET: Registered protocol family 1
[    0.278659] RPC: Registered named UNIX socket transport module.
[    0.284665] RPC: Registered udp transport module.
[    0.289359] RPC: Registered tcp transport module.
[    0.294142] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.301155] freq_udelay_jiffys[0].max_num = 10
[    0.305626] cpufreq  udelay  loops_per_jiffy
[    0.309999] 12000     59885   59885
[    0.313279] 24000     119771  119771
[    0.316709] 60000     299428  299428
[    0.320152] 120000    598857  598857
[    0.323734] 200000    998095  998095
[    0.327216] 300000    1497142     1497142
[    0.330924] 600000    2994285     2994285
[    0.334651] 792000    3952457     3952457
[    0.338341] 1008000   5030400     5030400
[    0.342137] 1200000   5988571     5988571
[    0.351496] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.358424] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.365016] msgmni has been set to 194
[    0.370144] io scheduler noop registered
[    0.374188] io scheduler cfq registered (default)
[    0.380625] jz-uart.1: ttyS1 at MMIO 0x10031000 (irq = 58) is a uart1
[    0.388913] console [ttyS1] enabled, bootconsole disabled
[    0.388913] console [ttyS1] enabled, bootconsole disabled
[    0.404280] brd: module loaded
[    0.409532] loop: module loaded
[    0.413560] zram: Created 2 device(s) ...
[    0.417803] logger: created 256K log 'log_main'
[    0.423222] jz SADC driver registeres over!
[    0.428548] jz TCU driver register completed
[    0.433656] the id code = 1c7018, the flash name is EN25QH128A
[    0.439710] JZ SFC Controller for SFC channel 0 driver register
[    0.445936] 11 cmdlinepart partitions found on MTD device jz_sfc
[    0.452163] Creating 11 MTD partitions on "jz_sfc":
[    0.457236] 0x000000000000-0x000000040000 : "boot"
[    0.462811] 0x000000040000-0x000000240000 : "kernel"
[    0.468473] 0x000000240000-0x000000590000 : "root"
[    0.474029] 0x000000590000-0x000000630000 : "driver"
[    0.479715] 0x000000630000-0x000000ad0000 : "appfs"
[    0.485375] 0x000000ad0000-0x000000cd0000 : "backupk"
[    0.491151] 0x000000cd0000-0x000000d70000 : "backupd"
[    0.497006] 0x000000d70000-0x000000f70000 : "backupa"
[    0.502832] 0x000000f70000-0x000000fb0000 : "config"
[    0.508549] 0x000000fb0000-0x000000ff0000 : "para"
[    0.514169] 0x000000ff0000-0x000001000000 : "flag"
[    0.519661] SPI NOR MTD LOAD OK
[    0.523040] tun: Universal TUN/TAP device driver, 1.6
[    0.528275] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    0.534820] wait stable.[246][cgu_macphy]
[    0.538979] Bus Mode Reg after reset: 0x00020101, cnt=0
[    0.545417] Bus Mode Reg after reset: 0x00020101, cnt=1
[    0.551831] Bus Mode Reg after reset: 0x00020101, cnt=2
[    0.558257] Bus Mode Reg after reset: 0x00020101, cnt=3
[    0.564681] Bus Mode Reg after reset: 0x00020101, cnt=4
[    0.571094] Bus Mode Reg after reset: 0x00020101, cnt=5
[    0.577515] Bus Mode Reg after reset: 0x00020101, cnt=6
[    0.583939] Bus Mode Reg after reset: 0x00020101, cnt=7
[    0.590352] Bus Mode Reg after reset: 0x00020101, cnt=8
[    0.596774] Bus Mode Reg after reset: 0x00020101, cnt=9
[    0.603196] func:jz_mii_bus_probe, synopGMAC_reset failed
[    0.608800] jz_mii_bus: probe of jz_mii_bus.0 failed with error -1
[    0.615292] =======>gmacdev = 0x84226980<================
[    0.620890] =========>gmacdev->MacBase = 0xb34b0000 DmaBase = 0xb34b1000
[    0.627858] Bus Mode Reg after reset: 0x00020101, cnt=0
[    0.634284] Bus Mode Reg after reset: 0x00020101, cnt=1
[    0.640694] Bus Mode Reg after reset: 0x00020101, cnt=2
[    0.647118] Bus Mode Reg after reset: 0x00020101, cnt=3
[    0.653542] Bus Mode Reg after reset: 0x00020101, cnt=4
[    0.659952] Bus Mode Reg after reset: 0x00020101, cnt=5
[    0.666376] Bus Mode Reg after reset: 0x00020101, cnt=6
[    0.672798] Bus Mode Reg after reset: 0x00020101, cnt=7
[    0.679211] Bus Mode Reg after reset: 0x00020101, cnt=8
[    0.685635] Bus Mode Reg after reset: 0x00020101, cnt=9
[    0.692044] func:jz_mac_probe, synopGMAC_reset failed
[    0.697295] jz_mac: probe of jz_mac.0 failed with error -1
[    0.703093] usbcore: registered new interface driver zd1201
[    0.708924] usbcore: registered new interface driver usb-storage
[    0.715301] usbcore: registered new interface driver usbserial
[    0.721379] usbcore: registered new interface driver usbserial_generic
[    0.728225] usbserial: USB Serial support registered for generic
[    0.734507] usbcore: registered new interface driver ch341
[    0.740221] usbserial: USB Serial support registered for ch341-uart
[    0.746763] usbcore: registered new interface driver cp210x
[    0.752590] usbserial: USB Serial support registered for cp210x
[    0.758755] usbcore: registered new interface driver ftdi_sio
[    0.764759] usbserial: USB Serial support registered for FTDI USB Serial Device
[    0.772363] usbcore: registered new interface driver pl2303
[    0.778183] usbserial: USB Serial support registered for pl2303
[    1.285301] i8042: i8042 controller selftest timeout
[    1.290944] jzmmc_v1.2 jzmmc_v1.2.0: vmmc regulator missing
[    1.302439] jzmmc_v1.2 jzmmc_v1.2.0: card inserted, state=0
[    1.332441] jzmmc_v1.2 jzmmc_v1.2.0: register success!
[    1.337833] jzmmc_v1.2 jzmmc_v1.2.1: vmmc regulator missing
[    1.382534] jzmmc_v1.2 jzmmc_v1.2.1: register success!
[    1.388011] hidraw: raw HID events driver (C) Jiri Kosina
[    1.394962] usbcore: registered new interface driver usbhid
[    1.400740] usbhid: USB HID core driver
[    1.405012] TCP: cubic registered
[    1.408456] NET: Registered protocol family 17
[    1.414124] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    1.421280] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    1.432744] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    1.440413] Freeing unused kernel memory: 224K (80538000 - 80570000)
mdev is ok......
[    2.344026] mmc0: new high speed SDHC card at address 59b4
[    2.352587] mmcblk0: mmc0:59b4 USD00 14.9 GiB
[    2.364338]  mmcblk0: p1

Ingenic-uc1_1 login: [    2.530973] register all isp device successfully!
[    2.538431] @@@@ tx-isp-probe ok @@@@@
[    2.590274] exFAT: Version 1.2.9
[    2.628407] motor_probe [ChenX @ Hualai Technologies]
[    2.635753] Hualai motor driver version: MT20180918g
[    2.702669] jz_codec_register: probe() successful!
[    3.052838] dma dma0chan24: Channel 24 have been requested.(phy id 7,type 0x06 desc a48dd000)
[    3.062093] dma dma0chan25: Channel 25 have been requested.(phy id 6,type 0x06 desc a48c2000)
[    3.087908] jz_pwm_probe[198] d_name = tcu_chn0
[    3.103722] request pwm channel 0 successfully
[    3.112651] pwm-jz pwm-jz: jz_pwm_probe register ok !
[    3.319144] name : i2c-gpio1 nr : 1
[    3.322828] name : i2c0 nr : 0
[    3.386796]  sensor_read: addr=0xa value = 0xf
[    3.391858]  sensor_read: addr=0xb value = 0x23
[    3.396602] info: success sensor find : jxf23
##### sensor : jxf23
[    3.401254] misc sinfo_release
[    3.421469] gpio:jz->reg = 0xb0010100
[    3.425768] gpio pin: 0x40
[    3.428572] jz->dev_map[0]: 0x8ff9efff
[    3.437010] CPU: 0 PID: 107 Comm: sh Tainted: G           O 3.10.14 #43
[    3.444067] Stack : 00000006 8003b6c0 00000000 00000001 00000000 00000000 00000000 00000000
      00000000 00000000 80582e2a 0000003b 847c9cd8 804ac6e8 00000000 00000000
      00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      00000000 00000000 00000000 00000000 00000000 84aadd00 84aaddb4 804a0b7c
      805061c7 8003cb24 00000000 804a0b7c 00000000 0000006b 847c9cd8 84aadd28
      ...
[    3.481262] Call Trace:
[    3.483859] [<80020ca4>] show_stack+0x48/0x70
[    3.488391] [<803ecb4c>] dump_stack+0x20/0x2c
[    3.492983] [<80018b4c>] jz_gpio_request+0xac/0x128
[    3.498059] [<801e00ac>] gpiod_request+0x120/0x220
[    3.503087] [<801e0d8c>] export_store+0x6c/0xd8
[    3.507799] [<80137c4c>] sysfs_write_file+0x11c/0x1a0
[    3.513093] [<800d6a60>] vfs_write+0xd8/0x1b0
[    3.517621] [<800d6e98>] SyS_write+0x54/0x98
[    3.522053] [<800238fc>] stack_done+0x20/0x44
[    3.526987]
[    3.528551] arch/mips/xburst/soc-t20/common/gpio.c:gpio functions has redefinitiongpio:jz->reg = 0xb0010100
[    3.539337] gpio pin: 0x80
[    3.542139] jz->dev_map[0]: 0x8ff9efff
[    3.548199] CPU: 0 PID: 107 Comm: sh Tainted: G           O 3.10.14 #43
[    3.555167] Stack : 00000006 8003b6c0 00000000 00000001 00000000 00000000 00000000 00000000
      00000000 00000000 80582e2a 0000003b 847c9cd8 804ac6e8 00000000 00000000
      00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      00000000 00000000 00000000 00000000 00000000 84aadd00 84aaddb4 804a0b7c
      805061c7 8003cb24 00000001 804a0b7c 00000000 0000006b 847c9cd8 84aadd28
      ...
[    3.592339] Call Trace:
[    3.595418] [<80020ca4>] show_stack+0x48/0x70
[    3.599990] [<803ecb4c>] dump_stack+0x20/0x2c
[    3.604794] [<80018b4c>] jz_gpio_request+0xac/0x128
[    3.610281] [<801e00ac>] gpiod_request+0x120/0x220
[    3.615508] [<801e0d8c>] export_store+0x6c/0xd8
[    3.620212] [<80137c4c>] sysfs_write_file+0x11c/0x1a0
[    3.625555] [<800d6a60>] vfs_write+0xd8/0x1b0
[    3.630077] [<800d6e98>] SyS_write+0x54/0x98
[    3.634559] [<800238fc>] stack_done+0x20/0x44
[    3.639073]
[    3.640615] arch/mips/xburst/soc-t20/common/gpio.c:gpio functions has redefinitionifconfig: SIOCGIFFLAGS: No such device
ifconfig: SIOCSIFADDR: No such device
route: SIOCADDRT: Network is unreachable
mount: mounting 193.169.4.2:/home_b/nfsroot/ywu/ on /mnt failed: Input/output error
sh: write error: Device or resource busy
/system/init/app_init.sh: line 56: can't create /sys/class/gpio/gpio63/direction: nonexistent directory
/system/init/app_init.sh: line 57: can't create /sys/class/gpio/gpio63/value: nonexistent directory
**********config param**********
sensor_name jxf23
i2c_addr 0x40
fps_num 25
width 1920
height 1080
wdr_en 0
bitrate 8000
[    4.094253] webcam: uvc descriptor header conunt:15
rcmode cbr
audio_en 1
gop 25
adb_en 0
speak_en 1
[    4.103458] dwc2 dwc2: session end detected!

640 360
1280 720
1920 1080
******************************
[    4.116535] g_webcam gadget: audio_buf_size 1280, req_buf_size 512, req_count 256
[    4.128324] g_webcam gadget: g_webcam ready
[    4.133150] dwc2 dwc2: SRP: Device Mode
[Ucamera]: [ERROR] Ucamera open Hid devices failed!

[    4.141970] set sensor gpio as PA-low-10bit
[    4.302531] jxf23 0-0040: jxf23 chip found @ 0x40 (i2c0)
[    4.308058] tx_isp: Registered sensor subdevice jxf23 0-0040
[    4.721170] ###### image_tuning_v4l2_open 4219 #######
[    5.132417] codec_set_device: set device: MIC...
set safe_suppression_value 1.500000
aecMode = 0
dtdEnable = 1
dtdBandNum = 4
dtdPowThd = 6000000.000000
dtdDxRatio = 0.100000
safeSupression = 1.500000
[    5.917801] g_webcam gadget: high-speed config #1: ucamera
[    5.923510] g_webcam gadget: uac_function_set_alt(2, 0)
[    5.928927] g_webcam gadget: uac_function_set_alt(3, 0)
[    5.934343] g_webcam gadget: uac_function_set_alt(4, 0)
[Ucamera]: Sample get PowerLine Freq value:1

[    6.042886] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.063501] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.079100] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.102957] dwc2 dwc2: dwc2_ep0_stall_and_restart
[Ucamera]: Sample get WhiteBalance mode:0 value:0

[Ucamera]: Sample get BackLight value:7

[Ucamera]: Sample get Contrast value:128

[    6.197804] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.213755] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.230155] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.253255] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.269659] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.293720] dwc2 dwc2: dwc2_ep0_stall_and_restart
[Ucamera]: Sample get Saturation value:128

[    6.365382] jffs2: warning: (56) jffs2_do_read_inode_internal: Truncating ino #56 to 306808 bytes failed because it only had 151896 bytes to start with!
[Ucamera]: Sample get Sharpness value:128

[    6.390855] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.416357] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.432181] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.448005] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.466997] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.482590] dwc2 dwc2: dwc2_ep0_stall_and_restart
[Ucamera]: Sample get WhiteBalance mode:0 value:0

[Ucamera]: Sample set WhiteBalance mode:0 value:0

[Ucamera]: Sample get BrightNess value:128

[    6.582649] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.598149] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.618897] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.634765] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.651011] g_webcam gadget: uac_function_set_alt(4, 0)
[    6.662393] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.682180] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.708585] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.737274] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.810836] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.826625] dwc2 dwc2: dwc2_ep0_stall_and_restart
[    6.852181] dwc2 dwc2: dwc2_ep0_stall_and_restart
[Ucamera]: Sample get WhiteBalance mode:0 value:0

[Ucamera]: **************Audio Start**********

[Ucamera]: [INFO]: Start audio thread.

[Ucamera]: Audio Event type:0x01, Value:0x0000

set spk volume value:0
[    7.432088] g_webcam gadget: uac_function_set_alt(3, 0)
[Ucamera]: Audio Event type:0x04, Value:0x0600

set mic volume value:100
[Ucamera]: Audio Event type:0x03, Value:0x0000

set mic volume value:100
[Ucamera]: Audio Event type:0x02, Value:0x0000

set spk volume value:60
[Ucamera]: Audio Event type:0x01, Value:0x0000

set spk volume value:60
[    7.622431] codec_set_device: set device: speaker...

Ingenic-uc1_1 login:
Ingenic-uc1_1 login: [   88.952120] dwc2 dwc2: dwc2_ep0_stall_and_restart
[   88.976100] dwc2 dwc2: dwc2_ep0_stall_and_restart
[   88.991775] dwc2 dwc2: dwc2_ep0_stall_and_restart
[Ucamera]: Sample get WhiteBalance mode:0 value:0

[Ucamera]: UVC: streaming request (req SET_CUR cs 01)

[Ucamera]: UVC: streaming request (req GET_CUR cs 01)

[Ucamera]: UVC: streaming request (req SET_CUR cs 02)

[Ucamera]: UVC: Setting format to: MJPG 1920x1080

[Ucamera]: UVC: uvc event stream on!

[Ucamera]: IMP SDK reinit!
[   95.211139] &&& chan1  scaler.max_width = 1920 max_height = 1080  min_width = 128 min_height = 128 &&&

[Ucamera]: IMP: Scaler enable w:1920 h:1080

[chn0] scaler->outwidth = 1920 scaler->outheight = 1080, sscaler.outwidth = 0 sscaler.outheight = 0
[Ucamera]: UVC: Buffer 0 mapped at address 0x6f98f000 len:1382400.

[Ucamera]: UVC: Buffer 1 mapped at address 0x6f83d000 len:1382400.

[Ucamera]: UVC: Starting video stream.

[  116.871005] (357)Failed to queue request (-143)
[Ucamera]: UVC: uvc event stream off!

[Ucamera]: UVC: Stopping video stream.

[Ucamera]: UVC: streaming request (req SET_CUR cs 01)

[Ucamera]: UVC: streaming request (req GET_CUR cs 01)

[Ucamera]: UVC: streaming request (req SET_CUR cs 02)

[Ucamera]: UVC: Setting format to: MJPG 1920x1080

[Ucamera]: UVC: uvc event stream on!

[Ucamera]: IMP SDK reinit!
[  137.999524] &&& chan1  scaler.max_width = 1920 max_height = 1080  min_width = 128 min_height = 128 &&&

[Ucamera]: IMP: Scaler enable w:1920 h:1080

[chn0] scaler->outwidth = 1920 scaler->outheight = 1080, sscaler.outwidth = 0 sscaler.outheight = 0
[Ucamera]: UVC: Buffer 0 mapped at address 0x6f18f000 len:1382400.

[Ucamera]: UVC: Buffer 1 mapped at address 0x6f03d000 len:1382400.

[Ucamera]: UVC: Starting video stream.

[  138.290324] dwc2 dwc2: dwc2_gadget_set_in_nak:915: diepint[2] = 0x00000000
[  138.297468] VS request cancelled.
[  138.300909] VS request cancelled.
[  138.304344] VS request cancelled.
[  138.307778] VS request cancelled.
[Ucamera]: UVC: uvc event stream off!

[Ucamera]: UVC: Stopping video stream.

[Ucamera]: UVC: streaming request (req SET_CUR cs 01)

[Ucamera]: UVC: streaming request (req GET_CUR cs 01)

[Ucamera]: UVC: streaming request (req SET_CUR cs 02)

[Ucamera]: UVC: Setting format to: MJPG 1920x1080

[Ucamera]: UVC: uvc event stream on!

[Ucamera]: IMP SDK reinit!
[  138.598201] &&& chan1  scaler.max_width = 1920 max_height = 1080  min_width = 128 min_height = 128 &&&

[Ucamera]: IMP: Scaler enable w:1920 h:1080

[chn0] scaler->outwidth = 1920 scaler->outheight = 1080, sscaler.outwidth = 0 sscaler.outheight = 0
[Ucamera]: UVC: Buffer 0 mapped at address 0x6e98f000 len:1382400.

[Ucamera]: UVC: Buffer 1 mapped at address 0x6e83d000 len:1382400.

[Ucamera]: UVC: Starting video stream.
vinniet commented 3 years ago

Thanks for the solution but this is incredibly involved. It would of been nice to note that this is NOT reversible on the web site.

vinniet commented 3 years ago

I have confirmed that if you install Wyze beta RTSP beta it will put it back on Wyze cloud. I assume I can flash the hack again if I want it. No sure how to get it out of general codebase of Wyze.

https://wyzelabs.zendesk.com/hc/en-us/articles/360026245231-Wyze-Cam-RTSP

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.