I can't get the plates via POST from a IDS-TCM203-A

Joined
Feb 20, 2024
Messages
4
Reaction score
0
Location
Italy
Hello everyone,

I'm currently working on a project involving the retrieval of plates from a IDS-TCM203-A, via ISAPI POST call, and I've been having some trouble retrieving the plates data from the camera and could really use some help.

Here's a brief overview of my setup:
  • Camera Model: IDS-TCM203-A
  • Firmware Version: V5.0.2 220210_B
  • Network Configuration: static IP address, no firewalls

The camera is set up correctly and I was able to perform the POST with a previous version of the firmware, using Postman. However, when it comes to retrieving the recognized plates data, now , I'm facing some difficulties. I've tried multiple combinations, but it didn't work.

Ultimately this is my call>
1708447551253.png

I am using Digest authentication, and I am getting this answer

1708447892565.png

I was wondering if anyone else has encountered this issue and could provide some guidance on how to resolve it. Any advice or suggestions would be greatly appreciated!

Thank you in advance for your help.
 

Attachments

trempa92

Pulling my weight
Joined
Mar 26, 2020
Messages
768
Reaction score
242
Location
Croatia,Zagreb
Not really a camera that people have hanging around for testing purposes. Well use inspect element inside browser where you see the list, and try to check network tab to sniff out isapi request.
 

trempa92

Pulling my weight
Joined
Mar 26, 2020
Messages
768
Reaction score
242
Location
Croatia,Zagreb
Also you can always collect plates using HTTP Listener or Alarm server via TCP server, and have an ISAPI as a backup only.
 
Last edited:
Joined
Feb 20, 2024
Messages
4
Reaction score
0
Location
Italy
Also you can always collect plates using HTTP Listener or Alarm server via TCP server, and have an ISAPI as a backup only.
Hi trempa92,

I assume that the TCP Server you are mentioning is a HikVision product, isn't?
My application manages several different types of devices, for recognition purposes, and I need to have the plates read programmatically, and I cannot use any external piece of software.

Any further advice, perhaps?

Many thanks in advance.
 

trempa92

Pulling my weight
Joined
Mar 26, 2020
Messages
768
Reaction score
242
Location
Croatia,Zagreb
No , its piece of code you write, TCP Server Listener on port x

And inside camera configuration you insert IP adress and port from PC/server where your code is running

For instance C# tcp server listener

1708519292110.png

And simply parse received data. Some are xml some json.

This way you get all information plus image if you want which you store to byte array and save to disk as image.

1708519612996.png

The most important thing that you have to do after receiving data, that you respond with OK 200 otherwise will loop same piece of data until you do.


Something i made for integration

1708520238197.png
1708519979698.png
 
Last edited:
Joined
Feb 20, 2024
Messages
4
Reaction score
0
Location
Italy
Thanks, very interesting.

In fact I tried previously a similar approach,, but I noticed that the camera, once connected, never sent me any data.
I was assuming that the camera was pushing the messages, but nothing happened, even if I recognized some plates manually, from the Live View.

I am starting to thinking that maybe I didn't properly configure the camera to push data, I was assuming this configuration was ok

1708526631963.png

... but I am missing something, maybe elsewhere??

Thanks a lot!!!!!!!!!
 

trempa92

Pulling my weight
Joined
Mar 26, 2020
Messages
768
Reaction score
242
Location
Croatia,Zagreb
Weird interface. I havent worked with this old model. Usually there is something like this in each camera:

1708527249704.png

Or like this:

1708527302262.png

Totally depends on firmware.

If you dont have this option, i guess yours looks okay you even have option to filter out events you dont want on camera directly, which is nice. I had to filter them in code.
 

trempa92

Pulling my weight
Joined
Mar 26, 2020
Messages
768
Reaction score
242
Location
Croatia,Zagreb
Either way, if you dont send 200OK back to camera on each event you will end in loop if ANR is enabled. With ANR disabled, in theory you dont need to send 200OK. But i havent tested as i made with response.OK() anyway
 
Joined
Feb 20, 2024
Messages
4
Reaction score
0
Location
Italy
Either way, if you dont send 200OK back to camera on each event you will end in loop if ANR is enabled. With ANR disabled, in theory you dont need to send 200OK. But i havent tested as i made with response.OK() anyway
I think I will strongly suggest the customer to update the firmware to the latest version.
Anyway... my problem was not having data in loop, but not having any data pushed towards me.
 

trempa92

Pulling my weight
Joined
Mar 26, 2020
Messages
768
Reaction score
242
Location
Croatia,Zagreb
I believe you are on newest already and no new versions for your hardware is out.

Or i can put my server on dnynds open port and you can use mine to test if anything comes.
 

jali

n3wb
Joined
Mar 12, 2024
Messages
4
Reaction score
1
Location
TT
No , its piece of code you write, TCP Server Listener on port x

And inside camera configuration you insert IP adress and port from PC/server where your code is running

For instance C# tcp server listener

View attachment 187172

And simply parse received data. Some are xml some json.

This way you get all information plus image if you want which you store to byte array and save to disk as image.

View attachment 187174

The most important thing that you have to do after receiving data, that you respond with OK 200 otherwise will loop same piece of data until you do.


Something i made for integration

View attachment 187177
View attachment 187176
Hi, I receive event but I have problem with parsing received data. Is it possible to share GetBoundary and ExtractFormDatamethods also?
 

trempa92

Pulling my weight
Joined
Mar 26, 2020
Messages
768
Reaction score
242
Location
Croatia,Zagreb
I cant share all the code, but i can explain where the trick is.

For Get boundary
Match match = Regex.Match(header, "boundary=(?<boundary>.+?)\r\n"); this is the key.

For FormData you check for contentType, and the image filename is within that header plus in your XML

var filenameMatch = Regex.Match(header, "filename=\"(?<filename>[^\"]+)\"");


Hope it helps
 

jali

n3wb
Joined
Mar 12, 2024
Messages
4
Reaction score
1
Location
TT
Show what have you tried so far and i might point you to right direction
Thanks forreplaying,

My main problem right now is that I am not able to get data from byte array, I tried with different encoding but the answer is unreadable on every encoding. because of that ı am not able to read boundary and ....

1710318013001.png

Thank you
 

jali

n3wb
Joined
Mar 12, 2024
Messages
4
Reaction score
1
Location
TT
I tried to receive event via NetAssist program but it is unreadable data in there. But everything is ok in camera's local app.
1710332649557.png
 
Last edited:

jali

n3wb
Joined
Mar 12, 2024
Messages
4
Reaction score
1
Location
TT
For any one that may have same issue:

After some test I found out that it was because of ssl certificate. When I changed camera alarm server setting to HTTP it worked as expected. I think default certificate has expired.

1710423729637.png
 
Top