guino / Merkury1080P

Merkury1080P (CW017) Rooting and Customization
77 stars 16 forks source link

Using ONVIF while the camera is not connected to the Tuya cloud #11

Closed jilleb closed 2 years ago

jilleb commented 2 years ago

Great work, thanks to you I got myself another device 😄

I got the LSC Smart Home Camera "Mini 16S", and got your hack working. But.... I've noticed that ONVIF isn't available when the unit isn't connected to Tuya. This is the same behavior we saw on the Bazz doorbell.

I took a dive into ppsapp with Ghidra, but couldn't really find why it doesn't start ONVIF.. can you point me in the right direction? Thanks!

ppsapp.zip

jilleb commented 2 years ago

Hah, I was looking in the wrong place... of course.

The FUN_0001ff98 checks the online status of the device. While status is not Online, sleep. I replaced the iVar1 != 1 by iVar1 != 0 and it's totally ignored, device is nicely usable off-cloud! image

guino commented 2 years ago

@jilleb nice work finding it. You could also just replace the command that loops so that it would just startup regardless of being online or not. Let me know if you need anything else anyway.

jilleb commented 2 years ago

Thanks! Nothing else needed. But... I could share the offline-patched ppsapp so you can share it?

guino commented 2 years ago

@jilleb if you post the patch and deviceinfo I can definitely add it to the list on https://github.com/guino/ppsapp-rtsp/issues/1 with the proper credit.

jilleb commented 2 years ago

@jilleb if you post the patch and deviceinfo I can definitely add it to the list on guino/ppsapp-rtsp#1 with the proper credit. ppsapp_Mini16S_offline.zip

Camera is an LSC Smart Home Camera 1080p

{"devname":"Smart Home Camera","model":"Mini 16S","serialno":"10080xxxxx","softwareversion":"4.0.6","hardwareversion":"M16S_A2_V10_F37","firmwareversion":"ppstrong-a3-tuya2_lsc-4.0.6.20210311","identity":"M1K007CF4xxxxxxx","authkey":"xxxxx","deviceid":"xxxx","pid":"aaa","WiFi MAC":"84:7a:b6:xx:xx:xx","ETH MAC":"00:00:00:00:00:00"}
guino commented 2 years ago

@jilleb I just noticed there's a ppsapp with the 1st post along with a ips file -- is that an ONVIF patch you made too ? I can post it if so. I have posted the offline patch to the list already.

jilleb commented 2 years ago

@jilleb I just noticed there's a ppsapp with the 1st post along with a ips file -- is that an ONVIF patch you made too ? I can post it if so. I have posted the offline patch to the list already.

I think that patch is already available for download here

guino commented 2 years ago

@jilleb the md5sum on the ppsapp you posted is different than previously posted (despite being the same version). I have seen same version firmware with different md5sum in the past ( some slight changes in the file with no actual code changes ).