niceboygithub / AqaraDoorbellG4

Everything about Aqara Smart Video Doorbell G4
Apache License 2.0
28 stars 6 forks source link

If it fits for CN version only or works with global also? #1

Open HeavyHard666 opened 1 year ago

HeavyHard666 commented 1 year ago

Does it fit for CN version only or works with global also?

niceboygithub commented 1 year ago

Mine is CN version. It shall be work on Global version.

HeavyHard666 commented 1 year ago

Mine is CN version. It shall be work on Global version.

There's no item related to Aqara Doorbell G4 in the list of Aqara integration. How shall we add it to Home Assistant after opening telnet? And what the features will be opened? 2023-06-04 114752

niceboygithub commented 1 year ago

Aqara Doorbell G4 is not gateway. So it won't be the list of AqaraGateway.

niceboygithub commented 1 year ago

Enable rtsp feature of G4 camera.

HeavyHard666 commented 1 year ago

It ends with error after replace the string "/linuxrc" to "/bin/sh". Do I do something wrong? After further commands telnet doesn't work and device doesn't connect to aqara home

`SigmaStar # nand info

Device 0: nand0, sector size 128 KiB Page size 2048 b OOB size 64 b Erase size 131072 b SigmaStar # printenv bootargs bootargs=root=/dev/mtdblock8 rootfstype=squashfs ro init=/linuxrc LX_MEM=0x7FE0000 mma_heap=mma_heap_name0,miu=0,sz=0x200000 cma=2M mmap_reserved=fb,miu=0,sz=0x300000,max_start_off=0x3300000,max_end_off=0x3600000 mtdparts=nand0:1664k@0x140000(BOOT0),1664k(BOOT1),256k(ENV),256k(ENV1),128k(KEY_CUST),5m(KERNEL),5m(KERNEL_BAK),16m(rootfs),16m(rootfs_bak),1m(factory),20m(RES),-(UBI) SigmaStar # setenv bootargs root=/dev/mtdblock8 rootfstype=squashfs ro init=/bin/sh LX_MEM=0x7FE0000 mma_heap=mma_heap_name0,miu=0,sz=0x200000 cma=2M mmap_reserved=fb,miu=0,sz=0x300000,max_start_off=0x3300000,max_end_off=0x3600000 mtdparts=nand0:1664k@0x140000(BOOT0),1664k(BOOT1),256k(ENV),256k(ENV1),128k(KEY_CUST),5m(KERNEL),5m(KERNEL_BAK),16m(rootfs),16m(rootfs_bak),1m(factory),20m(RES),-(UBI) SigmaStar # run bootcmd

NAND read: device 0 offset 0xa20000, size 0x500000 Time:501617 us, speed:10451 KB/s 5242880 bytes read: OK incorrect device type in MISC incorrect device type in LOGO

Booting kernel from Legacy Image at 22000000 ...

Image Name: MVX4##P3##gce58db1KL_LX409##[BR: Image Type: ARM Linux Kernel Image (lzma compressed) Data Size: 2156448 Bytes = 2.1 MiB Load Address: 20008000 Entry Point: 20008000 Verifying Checksum ... OK -usb_stop(USB_PORT0) -usb_stop(USB_PORT2) Uncompressing Kernel Image ... [XZ] !!!reserved 0x21000000 length=0x 1000000 for xz!! XZ: uncompressed size=0x456000, ret=7 OK atags:0x20000000

Starting kernel ...

early_atags_to_fdt() success Booting Linux on physical CPU 0x0 Linux version 4.9.84 (tanqiuwei-a1530@compilex64-ipg) (gcc version 9.1.0 (GCC) ) #31 SMP PREEMPT Mon Dec 5 20:11:26 CST 2022 CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d CPU: div instructions available: patching division code CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache early_atags_to_fdt() success OF: fdt:Machine model: PIONEER3 SSC020A-S01A-S [ERR] LX_MEM, LX_MEM2, LX_MEM3 not 1MB aligned LXmem is 0x7fe0000 PHYS_OFFSET is 0x20000000 Add mem start 0x20000000 size 0x7fe0000!!!!

LX_MEM = 0x20000000, 0x7fe0000 LX_MEM2 = 0x0, 0x0 LX_MEM3 = 0x0, 0x0 EMAC_LEN= 0x0 DRAM_LEN= 0x0 deal_with_reserved_mmap memblock_reserve success mmap_reserved_config[0].reserved_start= 0x23300000

deal_with_reserve_mma_heap memblock_reserve success mma_config[0].reserved_start= 0x27de0000

cma: Reserved 2 MiB at 0x27a00000 Memory policy: Data cache writealloc percpu: Embedded 14 pages/cpu @c7c9b000 s25560 r8192 d23592 u57344 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32480 Kernel command line: root=/dev/mtdblock8 rootfstype=squashfs ro init=/bin/sh LX_MEM=0x7FE0000 mma_heap=mma_heap_name0,miu=0,sz=0x200000 cma=2M mmap_reserved=fb,miu=0,sz=0x300000,max_start_off=0x3300000,max_end_off=0x3600000 mtdparts=nand0:1664k@0x140000(BOOT0),1664k(BOOT1),256k(ENV),256k(ENV1),128k(KEY_CUST),5m(KERNEL),5m(KERNEL_BAK),16m(rootfs),16m(rootfs_bak),1m(factory),20m(RES),-(UBI) PID hash table entries: 512 (order: -1, 2048 bytes) Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 117752K/130944K available (2577K kernel code, 217K rwdata, 1316K rodata, 176K init, 177K bss, 11144K reserved, 2048K cma-reserved) Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xffc00000 - 0xfff00000 (3072 kB) vmalloc : 0xc8000000 - 0xff800000 ( 888 MB) lowmem : 0xc0000000 - 0xc7fe0000 ( 127 MB) modules : 0xbf800000 - 0xc0000000 ( 8 MB) .text : 0xc0008000 - 0xc028ca3c (2579 kB) .init : 0xc03fa000 - 0xc0426000 ( 176 kB) .data : 0xc0426000 - 0xc045c680 ( 218 kB) .bss : 0xc045e000 - 0xc048a7e8 ( 178 kB) SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 Preemptible hierarchical RCU implementation. Build-time adjustment of leaf fanout to 32. RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2. RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2 NR_IRQS:16 nr_irqs:16 16 ms_init_main_intc: np->name=ms_main_intc, parent=gic ms_init_pm_intc: np->name=ms_pm_intc, parent=ms_main_intc ss_init_gpi_intc: np->name=ms_gpi_intc, parent=ms_main_intc Find CLK_cpupll_clk, hook ms_cpuclk_ops arm_arch_timer: Architected cp15 timer(s) running at 6.00MHz (virt). clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1623fa770, max_idle_ns: 440795202238 ns sched_clock: 56 bits at 6MHz, resolution 166ns, wraps every 4398046511055ns Switching to timer-based delay loop, resolution 166ns Console: colour dummy device 80x30 console [ttyS0] enabled Calibrating delay loop (skipped), value calculated using timer frequency.. 12.00 BogoMIPS (lpj=60000) pid_max: default: 4096 minimum: 301 Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) CPU: Testing write buffer coherency: ok CPU0: update cpu_capacity 1024 CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 Setting up static identity map for 0x20008280 - 0x200082cc CPU1: update cpu_capacity 1024 CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 Brought up 2 CPUs SMP: Total of 2 processors activated (24.00 BogoMIPS). CPU: All CPU(s) started in SVC mode. devtmpfs: initialized VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns futex hash table entries: 16 (order: -2, 1024 bytes) NET: Registered protocol family 16 DMA: preallocated 256 KiB pool for atomic coherent allocations

Version : MVX4##P3##gce58db1KL_LX409##[BR:g4]#XVM

GPIO: probe end[Padmux]reset PAD14(reg 0x103c00:6f; mask0xf0) t0 TTL24_MODE_4 (org: I2C1_MODE_7) hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. hw-breakpoint: maximum watchpoint size is 8 bytes. SCSI subsystem initialized Pinreg:0 bit:0 enable:0 speed:5 Port:0 Index=1 Enable=1 DmaReadMode:0 Speed:5 DmaEnable:0 DmaAddrMode:0 DmaMiuCh:0 DmaMiuPri:0 DmaPhyAddr:27a40000 START default delay 5(us) STOP default delay 5(us) HWI2C_MUTEX_CREATE! HWI2C(0): initialized Pinreg:0 bit:0 enable:0 speed:5 Port:1 Index=23 Enable=1 DmaReadMode:0 Speed:5 DmaEnable:1 DmaAddrMode:0 DmaMiuCh:0 DmaMiuPri:0 DmaPhyAddr:27a41000 START default delay 5(us) STOP default delay 5(us) HWI2C_MUTEX_CREATE! HWI2C(1): initialized [DrvPWMDutyQE0 L1064] grp:0 x0(0) [DrvPWMDutyQE0 L1064] grp:0 x0(0) [DrvPWMDutyQE0 L1064] grp:0 x0(0) [DrvPWMDutyQE0 L1064] grp:0 x0(0) [NOTICE]pwm-isr(59) success. If not i6e or i6b0, pls confirm it on .dtsi clocksource: Switched to clocksource arch_sys_counter NET: Registered protocol family 2 TCP established hash table entries: 1024 (order: 0, 4096 bytes) TCP bind hash table entries: 1024 (order: 2, 20480 bytes) TCP: Hash tables configured (established 1024 bind 1024) UDP hash table entries: 128 (order: 0, 6144 bytes) UDP-Lite hash table entries: 128 (order: 0, 6144 bytes) NET: Registered protocol family 1 hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available workingset: timestamp_bits=30 max_order=15 bucket_order=0 squashfs: version 4.0 (2009/01/31) Phillip Lougher jffs2: version 2.2. © 2001-2006 Red Hat, Inc. fuse init (API version 7.26) io scheduler noop registered io scheduler deadline registered (default) libphy: Fixed MDIO Bus: probed mousedev: PS/2 mouse device common for all mice =======gpio_free(43 & 44);==for ti_zb====== lumi_btn_probe key=42!! [ss_gpi_intc_domain_alloc] hw:42 -> v:63 input: main-key as /devices/virtual/input/input0 [ss_gpi_intc_domain_alloc] hw:49 -> v:64 i2c /dev entries driver 1f221000.uart0: ttyS0 at MMIO 0x0 (irq = 33, base_baud = 10800000) is a unknown 1f221200.uart1: ttyS1 at MMIO 0x0 (irq = 34, base_baud = 10800000) is a unknown 1f220400.uart2: ttyS2 at MMIO 0x0 (irq = 36, base_baud = 10800000) is a unknown 1f221400.uart2: ttyS3 at MMIO 0x0 (irq = 37, base_baud = 10800000) is a unknown [MHal_GPIO_Check_PE] set gpio85 PE MSYS: DMEM request: [emac0_buff]:0x00000812 MSYS: DMEM request: [emac0_buff]:0x00000812 success, CPU phy:@0x27A44000, virt:@0xC7A44000 libphy: mdio: probed mdio_bus mdio-bus@emac0: /soc/emac0/mdio-bus/ethernet-phy@0 has invalid PHY address mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 0 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 1 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 2 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 3 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 4 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 5 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 6 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 7 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 8 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 9 ERROR: Bus[1] in ms_i2c_xfer_write: Slave dev NAK, Addr: 0xba, Data: 0x80 0x47 Goodix-TS 1-005d: i2c test failed attempt 1: -110 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 10 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 11 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 12 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 13 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 14 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 15 ERROR: Bus[1] in ms_i2c_xfer_write: Slave dev NAK, Addr: 0xba, Data: 0x80 0x47 Goodix-TS 1-005d: i2c test failed attempt 2: -110 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 16 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 17 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 18 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 19 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 20 Goodix-TS 1-005d: I2C communication failure: -110 Goodix-TS 1-005d: touchscreen config failed!!! mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 21 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 22 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 23 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 24 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 25 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 26 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 27 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 28 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 29 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 30 mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 31 [emac_phy_connect][3534] connected mac emac0 to PHY at mdio-bus@emac0:00 [uid=11112222, driver=Generic PHY] [ms_cpufreq_init] Current clk=799999872 [FLASH] Found SNI in block 0. [FLASH] dev_id = 0xee MSYS: DMEM request: [BDMA]:0x00000840 MSYS: DMEM request: [BDMA]:0x00000840 success, CPU phy:@0x27A45000, virt:@0xC7A45000 [FLASH] mfr_id = 0xcd, dev_id= 0x71 id_len = 0x3 [SPINAND] RFC ues command 0x6b with 0x08 dummy clock. [SPINAND] Program load with command 0x32. [SPINAND] Random load with command 0x34. [FLASH] Use BDMA. nand: device found, Manufacturer ID: 0xcd, Chip ID: 0x71 nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 12 cmdlinepart partitions found on MTD device nand0 Creating 12 MTD partitions on "nand0": 0x000000140000-0x0000002e0000 : "BOOT0" 0x0000002e0000-0x000000480000 : "BOOT1" 0x000000480000-0x0000004c0000 : "ENV" 0x0000004c0000-0x000000500000 : "ENV1" 0x000000500000-0x000000520000 : "KEY_CUST" 0x000000520000-0x000000a20000 : "KERNEL" 0x000000a20000-0x000000f20000 : "KERNEL_BAK" 0x000000f20000-0x000001f20000 : "rootfs" 0x000001f20000-0x000002f20000 : "rootfs_bak" 0x000002f20000-0x000003020000 : "factory" 0x000003020000-0x000004420000 : "RES" 0x000004420000-0x000008000000 : "UBI" [wakeup source] HW gate_xtal:0 SourceNum:1 [wakeup source] WakeupSource:61

[ss_gpi_intc_domain_alloc] hw:61 -> v:65 [ss_gpi_irq_set_wake] hw:61 enable? 1 NET: Registered protocol family 10 sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver NET: Registered protocol family 17 [mstar_pm_init] resume_pbase=0x200114F5, suspend_imi_vbase=0xC8057000 ThumbEE CPU extension supported. Registering SWP/SWPB emulation handler hctosys: unable to open rtc device (rtc0) VFS: Mounted root (squashfs filesystem) readonly on device 31:8. devtmpfs: mounted This architecture does not have kernel memory protection. [emac_phy_link_adjust] EMAC Link Down /bin/sh: can't access tty; job control turned off `

HeavyHard666 commented 1 year ago

possible to fix it?

HeavyHard666 commented 1 year ago

Here is the log from normal boot via serial port (without pressing enter key) LOG.txt

niceboygithub commented 1 year ago

Did you finish the step5-7?

HeavyHard666 commented 1 year ago

Did you finish the step5-7?

Yes. Here is full log attached. log1.txt

niceboygithub commented 1 year ago

What is your fw version?

HeavyHard666 commented 1 year ago

What is your fw version?

I cannot check fw because i can't add it back to aqara home. But it is the latest for the moment. Btw it is global version of the device.

niceboygithub commented 1 year ago

you can get the version in putty (uart)

cat /etc/build.prop

And why you can not add it back to aqara home?

HeavyHard666 commented 1 year ago

When I boot with Enter key - it says Unknown command 'cat' - try 'help', but if boot without it gives following info and asks login and password at the end:

....
[Sstar_log]:apollo wifi WSM init done.
   Input buffers: 32 x 2048 bytes
   Hardware: 7.1282
   WSM firmware [=MODEM=RF=Ares_AX  2GHZ Jan 13 2022 15:22:23NOTXConfrim], ver: 13625, build: 2819, api: 1060, cap: 0x99AEF58F Config[30008]  expection 900a5c0, ep0 cmd addr 901be2c NumOfStations[8] NumOfInterfaces[3]
...

and

....
[/bin/fw_manager.sh] [1970-01-01 00:00:06] fw_manager.sh revision: 2
[/bin/fw_manager.sh] [1970-01-01 00:00:06] hostname: Doorbell Repeater-4E32
[/bin/fw_manager.sh] [1970-01-01 00:00:06] type: lumi.camera.acn005, model: AH_G4
[/bin/fw_manager.sh] [1970-01-01 00:00:06] check partition pass
mDNSResponder: mDNSResponder (Engineering Build) (Mar 16 2023 21:03:58) starting
mDNSResponder: Unable to parse DNS server list. Unicast DNS-SD unavailable
mDNSResponder: mDNSPlatformSourceAddrForDest: connect 1.1.1.1 failed errno 101
(Network is unreachable)
▒▒҂▒Ҋ▒▒type: lumi.camera.acn005, model: AH_G4
BANK:0x101E 16bit-offset 0x53
mDNSResponder: mDNSPlatformSendUDP got error 99 (Cannot assign requested address) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface FE80:0000:0000:0000:56EF:44FF:FE49:4E32/wlan0/4
mDNSResponder: mDNSPlatformSendUDP got error 99 (Cannot assign requested address) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface FE80:0000:0000:0000:56EF:44FF:FE49:4E32/wlan0/4
mDNSResponder: mDNSPlatformSendUDP got error 99 (Cannot assign requested address) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface 192.168.1.108/wlan0/4
mDNSResponder: mDNS_DeregisterService_drt: mDNSPlatformRawTime went backwards by 136148569 ticks; setting correction factor to -1340405704
mDNSResponder: mDNSPlatformSendUDP got error 99 (Cannot assign requested address) sending packet to FF02:0000:0000:0000:0000:0000:0000:00FB on interface 192.168.1.108/wlan0/4
....

(full log attached)

When I keep pressed the functional button on inner module to add it to aqara home the voice says "please remove the device from the app" dispite on it's already removed.

log2.txt

HeavyHard666 commented 1 year ago

Btw it still working in Homekit as before

niceboygithub commented 1 year ago

Why you boot with enter key?

niceboygithub commented 1 year ago

And what is the login account you input?

Is shall be root and password is empty.

HeavyHard666 commented 1 year ago

And what is the login account you input?

Is shall be root and password is empty.

now it's ok with cat /etc/build.prop

ro.sys.name=Doorbell Repeater
ro.sys.model=lumi.camera.acn005
ro.sys.product=ZNKSML01LM
ro.sys.spu=AC008
ro.sys.sku=AC008CNW01
ro.sys.ean13=6970504215405
ro.sys.manufacturer=Aqara
ro.sys.vendor=Lumi United Technology Co., Ltd.
ro.sys.fw_ver=4.0.1
ro.sys.build_num=0028
ro.sys.hw_ver=1.1
ro.sys.acc_tags=red
HeavyHard666 commented 1 year ago

Uff, now it finished Ok and the doorbell connected to aqara home back. I just was confused with login and password. So how to get rtsp stream? rtsp://login:password@ip:554? Any other inputs? Whats login and password shall i use?

earlywaff commented 1 year ago

Is it possible to get both RTSP and HomeKit as a result?

niceboygithub commented 1 year ago

Is it possible to get both RTSP and HomeKit as a result?

Yes

wfchan commented 9 months ago

Uff, now it finished Ok and the doorbell connected to aqara home back. I just was confused with login and password. So how to get rtsp stream? rtsp://login:password@ip:554? Any other inputs? Whats login and password shall i use?

did you find the answer? what is the rtsp url?

almirus commented 4 months ago

without L P

[1719149617:772] [I] rtsp [1244]: refreshURL: play stream 360p   using the URL: [rtsp://192.168.0.196:8554/360p] (rtsp_port.cpp:201)
[1719149617:772] [I] rtsp [1244]: refreshURL: play stream 720p   using the URL: [rtsp://192.168.0.196:8554/720p] (rtsp_port.cpp:201)
[1719149617:772] [I] rtsp [1244]: refreshURL: play stream 1080p  using the URL: [rtsp://192.168.0.196:8554/1080p] (rtsp_port.cpp:201)