sr99622 / libonvif

Onvif library with GUI implementation and built in YOLOX
GNU Lesser General Public License v2.1
155 stars 40 forks source link

onvif-util fails to set framerate for Tenda CT6 V2.0 #69

Open ahmogit opened 1 year ago

ahmogit commented 1 year ago

Recently got hold of a Tenda CT6 camera, FW version 2.0. Attempting to set the framerate to any value within the allowed range fails with the error shown in the attachment. Any suggestions on how to debug this further?

The problem may well be the camera itself, rather than onvif-util or libonvif, as the camera is not officially ONVIF compliant. (It's not mentioned in the onvif.org 'official' compliance list). Nevertheless, it does seem to support ONVIF to some extent, but perhaps setting frame rate is simply not implemented, or is broken in some fashion. Just guessing.

I'm also new to fiddling about with IP cameras so could easily be making some silly mistake myself.

Anyway... any suggestions as to how to proceed with further debug would be helpful.

framerate_fail_examp.txt

sr99622 commented 1 year ago

It seems like the Tenda cameras should support ONVIF, although it is not unusual for specific cameras to have different interpretations of the standard. I have not seen reference to the tt:Type parameter shown in the error message before, it's possible this is something new or optional.

You could try setting onvif-util into unsafe mode and viewing the camera configuration using the browser, which should give you access to the manufacturer's own interface. There should be some settings in there that could let you change the frame rate.

You could also try communicating to the camera with the zoneminder program, it has a good reputation for working with a large number of ONVIF compatible cameras, and has an install package for linux.

If you are comfortable with programming, it is possible to modify the onvif.c library in order to view the raw XML stream coming from the camera which might provide some further details about how to get around this issue, but it does get somewhat involved. This approach may require sniffing traffic from a known good configuration program, or just guessing at different possibilities until something works.

Thank you so much for reaching out, your interest is greatly appreciated.

Best Regards,

Stephen

ahmogit commented 11 months ago

Hi Stephen,

Thanks for your response.

Actually, I had already taken many of the steps you mentioned prior to posting the issue. I should have mentioned that.

As to this particular camera "supporting" ONVIF: No dispute that it does handle some aspects of the ONVIF protocol to a limited extent, but as mentioned in my earlier post, it is not "ONVIF conformant" or "ONVIF compliant" in accordance with the definition of those terms by onvif.org, since it is not listed here:

https://www.onvif.org/conformant-products/

According onvif.org, a device is not permitted to claim that it is "ONVIF conformant" or to display the ONVIF logo unless it has been certified as such by them (all the way down to a specific firmware version) and hence appears in the above list. No products made by Tenda are presently ONVIF conformant.

So, unfortunately, since vague and ubiquitous phrases like "supports ONVIF", "ONVIF compatible", "uses ONVIF", etc. can mean anything at all, they are effectively meaningless to the prospective buyer: A dozen identical-appearing products from the same vendor having the same product ID and the same product name may all differ in their handling of ONVIF API requests due to firmware version differences alone.

I did later contact Tenda re the frame rate adjustment failure noted earlier, and according to them, the CT6 V2.0 does not support frame rate adjustment, does not support bit rate adjustment, and does not support any means of HTTP configuration, despite the fact that the camera responds to the various 'Capability' API requests indicating that it does support each of those capabilities. (See attached response to the onvif-util 'dump' command.)

In short it seems that this particular camera and FW version seems to have been intended solely for use with their proprietary TDSEE mobile app, rather than the "DIY" crowd. Much of the info reported by the camera is complete nonsense.

For those who may be interested, here's what I've been able to learn via experimentation:

Anyway... perhaps the above might be useful to others who may be fiddling about with the CT6 V2.0.

dev_dump_sanitized.txt