Assistance with Hikvision DS-2CD7A26G0/P-IZS Integration Using HTTP Listening

Dec 14, 2024
3
0
Brasil
Dear all,

We have access to several Hikvision DS-2CD7A26G0/P-IZS cameras with ANPR (Vehicle Detection) enabled, which we need to integrate into a proprietary system via API. We are currently testing the HTTP Listening method, but we are receiving very limited data in the POST requests sent by the cameras to our server. Critical information, such as the camera's IP address or device name, is not included—only a few fields and the captured photo are being sent.

Given this situation, I have a few questions:

  1. Is it possible to configure the cameras to send additional data, such as the Device Name, Serial Number, or the camera's IP address (the private network IP configured in the camera, as we use NAT) to help the server identify the source of the data?
  2. Can the camera be configured as a VPN Client to connect to a VPN Server?
  3. When switching the detection mode to "Mixed Vehicles" to enable OCR for motorcycles, the device stops sending POST requests to the HTTP Listening endpoint. Is this expected behavior, or is there a way to fix it?
  4. Is there a more recent firmware version available for this camera model? We are currently using version V5.6.10 build 211021. If an update is available, is there any cost associated with it?
Below are the camera details used in our tests:

  • Device Name: 61-ZERO EIXO
  • Device No: 88
  • Model: DS-2CD7A26G0/P-IZS
  • Serial No: DS-2CD7A26G0/P-IZS20200616AAWRE51582179
  • Firmware Version: V5.6.10 build 211021
  • Encoding Version: V7.3 build 210811
  • Web Version: V4.0.1 build 190927
  • Plugin Version: 3.0.7.17
  • Number of Channels: 1
  • Number of HDDs: 0
  • Number of Alarm Inputs: 2
  • Number of Alarm Outputs: 2
  • Firmware Version Property: C-R-H3-0
Any guidance or suggestions regarding these issues would be greatly appreciated.

Best regards,
 
Greetings,

1. No its not possible to add additional information to default ANPR sending template, but it does contain ipaddress and port (local) Atleast my H8 iDS-2CD7A46G0/P-IZHSY .
1734955642686.png
This is your ID for checking which camera event it is
- I guess entire problem is that you are not doing it locally? And you dont have access to cameras by doing ISAPI /ISAPI/System/deviceInfo?

Nevertheless this is possible if you are using ISUP DeviceGateway server by hikvision then you can push /ISAPI/System/deviceInfo regardless of port opening. Only Server needs to have opened ports. And camera needs to be connected to ISUP server.

2. I partially answered your question in 1st answer. There is something called DeviceGateway(ISUP server) that hikvision provice on tpp.hikvision.com with NDA signed. Then you can connect device to your server and communicate with device without opening ports on device side, you open ISUP ports on server side.

3. Most likely a bug. It should continue to work.

4. You are on older model ANPR camera, the latest one is:

1734955535328.png


Cheers,
 
Thanks @trempa92.

I managed to receive some data sent by the camera via POST to my HTTP listener:

xxxxxxx - - [20/Dec/2024 15:57:26] "POST /?channelID=1&dateTime=20241220T165723-300&eventType=vehicleDetection&country=Brazil&licensePlate=OAX6472&lane=1&direction=reverse&confidenceLevel=90 HTTP/1.1" 200 -


The body contains two images, one of the car and one of the license plate. However, I don't think there is any XML; the data seems to come only as URL parameters. How can I verify this? I am using an HTTP listener written in Python.
 
Try this C# TCP server listener, and see RAW data you receive.

C#:
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;

namespace TcpServerExample
{
    class Program
    {
        static void Main(string[] args)
        {
            int port = 9091;
            IPAddress localAddr = IPAddress.Parse("192.168.2.107");

            TcpListener server = new TcpListener(localAddr, port);

            server.Start();
            Console.WriteLine($"Server is listening on {localAddr}:{port}...");

            while (true)
            {
                Console.WriteLine("Waiting for a connection...");
                TcpClient client = server.AcceptTcpClient();
                Console.WriteLine("Connected!");

                NetworkStream stream = client.GetStream();

                StringBuilder requestBuilder = new StringBuilder();
                byte[] buffer = new byte[67700];
                int bytesRead;
                try
                {
                    while ((bytesRead = stream.Read(buffer, 0, buffer.Length)) != 0)
                    {
                        requestBuilder.Append(Encoding.ASCII.GetString(buffer, 0, bytesRead));
                        if (requestBuilder.ToString().Contains("\r\n\r\n"))
                        {
                            break;
                        }
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine($"Exception: {ex.Message}");
                }

                string request = requestBuilder.ToString();
                if (!string.IsNullOrEmpty(request))
                {
                    Console.WriteLine($"Received: {request}");

                }
                else
                {
                    Console.WriteLine("Received empty message");
                }

                string responseString = "HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n";
                byte[] responseBytes = Encoding.ASCII.GetBytes(responseString);
                stream.Write(responseBytes, 0, responseBytes.Length);

                client.Close();
            }
        }    
    }
}