Running custom code in Hikvision DVR?

chopchop

n3wb
Joined
Oct 30, 2018
Messages
1
Reaction score
0
Location
Australia
Hello all,
I am working on a project with a couple of tricky bits and I was hoping to get a little kick in the right direction.

In short, I'd like to put a recorder and a couple of cameras in my car. The whole thing would act as a overly complicated Dashcam with a camera on the front and rear of the vehicle.

The Hardware

The cameras are the Dahua HAC-HMW3200N and the recorder in question is a Hikvision DS-7204HUHI-K1. The cameras were chosen because of there form factor, not to big, not to fragile. The recorder was chosen for it’s compatibility with HD-CVI cameras, relatively low power consumption and I/O.


The Question

So as not to bore you all with my ramblings, my main question is about root access. I believe the DVR is a K72 series and I am having trouble finding any information on bypassing the PSH.

Does anyone have any suggestions on how I could get proper shell access?


What I’ve Tried So Far

I’ve put together a serial cable and can interrupt the U-Boot process, this gives me a prompt but no commands (printenv bootargs, setenv etc.) seem to be acknowledged. Is this something that has been locked down in newer versions?

The cable does work correctly as serial interaction with the PSH has no issues.

I’ve had a look at hikpack_2.5 from @montecrypto, it does not list the K37 series as supported but does seem to unpack the .dav file with only “File size mismatch” warning. Not really sure where to go from here...


The Goal

Out of the box, this is technically working but I was hoping to make a couple of changes to make it more suitable for use in a car.

The first is boot time. The DVR was loaded with a newer firmware (Vers. 4.20) that used the GUI 4 interface, this took roughly 45 seconds from power on to recording. Not super great.

I’ve since loaded an earlier version of the firmware (Vers. 3.5.50) with the older GUI and the boot time is now roughly 25 seconds. This is a massive improvement but I am interested to see if it can be reduced even further, hopefully disabling some unnecessary services from starting at boot could achieve this.

The second and more important change is a safe shutdown method. The recorder and cameras will be attached to a small battery backup providing a few minutes of power when the car as been turned off. Instead of just cutting power, I was hoping to be able to use one of the external inputs on the DVR to trigger a shutdown.

Not sure if this is even possible but is anyone running custom code on their Cameras/Recorders?


If you've made it this far, thank you and I hope you might be able to give me that kick.

Thank you for the help in advance.
Jeremy.
 
Top