Adding SCC/HK P2P_IPC Camera Protocol Support

Anything you want added or changed in future versions of ZoneMinder? Post here and there's a chance it will get in! Search to make sure it hasn't already been requested.
Post Reply
jhilliard
Posts: 2
Joined: Sat Dec 31, 2016 3:36 pm

Adding SCC/HK P2P_IPC Camera Protocol Support

Post by jhilliard »

We picked up a bunch of cheap and small WiFi security cameras from china that just have "Plug2Cam" on the label. They appear to implement a customized control protocol that is common to a lot of cheap Chinese network security cameras. This protocol appears to be used by a large number of different camera brands that manufacture in china.

There are clients available for most platforms here however they all use a library that implements the custom UDP based control and transmission protocol that is not supported by ZoneMinder yet. The protocol has a NAT bypass capability or can just use the LAN. I've tracked down quite a few SDK's from Chinese websites and Github which should have enough information to implement minimal control protocol and capture capability. I also found that someone implemented what appears to be a python client that can pull captures from the cameras.

When the device connects to a network it broadcasts UDP packets(authentication data removed) on port 5000 with these contents.

Code: Select all

MainCmd=LocalData;bootproto=static;dns0=192.168.1.1;dns1=;netmask=255.255.255.0;netwet=192.168.1.1;userType=312;status=2;ver=833;index=0;lanport=0;wannetable=0;errorcod=200;EnableSD=0;MoveRec=0;OutMoveRec=0;AutoRec=0;LoopWrite=0;Splite=0;AllSize=0;HaveUse=0;LeftSize=0;sdAudioMux=0;SDRecQC=0;devid=;Psw=;DEVNAME=smart;allAttribute=d6:isopen1:19:bootproto6:static10:wifistatus1:12:Ip12:10.29.32.2317:netmask13:255.255.255.06:netwet11:192.168.1.14:dns011:192.168.1.14:dns10:7:wifisid7:12:wifipassword14:
These values correspond to those in this header/this header and are normally configured using the phone app or computer app.

I haven't been able to find full source code to the client networking libraries which are usually called libcaptetown1, libchinalink, libSCCodec and/or libsystem in the SDK's(although there is a lot of information in header/other files). However I did find what appears to be the multiple variants of complete source code for different cameras. I've uploaded all the SDK's and software I could find so far related to these cameras here.
Post Reply