zsgx1hacks icon indicating copy to clipboard operation
zsgx1hacks copied to clipboard

Managed to disable p2pcam and use another RTSP server with a GM8136/SC1135 camera

Open CarlosML opened this issue 6 years ago • 6 comments
trafficstars

Excuse me in advance for posting this as an issue, this repository has been very helpful for me and I want to share this information. I managed to disable p2pcam and use another RTSP server with a GM8136/SC1135 camera, although the SoC is not the same as the ZSGX1 and the sensor is an inferior model the filesystem layout is pretty much the same. The first problem I had was that killin p2pcam triggered the watchdog, so I had to disable it using:

echo 0 > /proc/watchdog/watchdog_enable

Then, I found the demo RTSP server from GM8136 SDK here:

https://github.com/willthrom/rtspServer_gm/releases

Killing p2pcam disables the cloud services and I can stream the video feed using the RTSP demo server and change the video bitrate (p2pcam was awfully low). Bsesides, I have a file called "ptz_test" for controlling the PTZ commands.

CarlosML avatar Dec 24 '18 18:12 CarlosML

I must admit I've not put much effort into this hack lately as I felt I couldn't add much more. But this is a very big find that I'll look to implement very soon.

Does it give an onvif compatible stream or just RTSP?

ant-thomas avatar Dec 24 '18 19:12 ant-thomas

Does it give an onvif compatible stream or just RTSP?

Just RTSP, it's a barebones server that comes with the SDK, but at least there is source code available.

CarlosML avatar Dec 24 '18 20:12 CarlosML

Hi,

I couldn't find to way to kill p2pcam :( Whenever I kill the process, it waits few seconds and crashes and camera restarts. In addition, I couldn't find a process named watchdog. But still I uploaded compiled rtsp_server and tried to run it but nothing happens. Should I compile it from the source?

@CarlosML Could you explain in details how did you make it work?

gokhansaroglu avatar Dec 25 '18 19:12 gokhansaroglu

Source code available? I actually looked for this and even tried to reverse engineer the hardware without luck. Good find tnx.

Also found the dependencies including the SDK. Had a look at the code and it is indeed an implementation of a simple RTSP server for similar hardware. Sadly no driver code, but this is already much better than whatever we had before. I am going to try combine this with my motion build.

deorder avatar Jan 02 '19 19:01 deorder

Does it give an onvif compatible stream or just RTSP?

I used onvif_srvd with a ezviz camera and it works very well.

roleoroleo avatar Jan 06 '19 20:01 roleoroleo

I did some work which I report on at https://github.com/cspwcspw/CloudCameraGK7102

Perhaps the most interesting aspect is that my cloud camera has both Ethernet and WiFi. So by ensuring that the Ethernet is attached (or we can fool the camera with an Ethernet Loopback Plug), p2pcam won't bring up the wireless and runs in some in-lan mode that makes it pretty usable without the cloud. We can then bring the wireless up manually using our own configuration and use it independently of its attempt to go via the cloud.

Peter

cspwcspw avatar Jun 17 '19 09:06 cspwcspw