- Aug 24, 2016
- 23
- 1
I need some help with ONVIF authentication as implemented by Dahua.
I'm trying to configure a SD22204T-GN camera for remote viewing via a smartphone app IP CENTCOM. This is the Windows Phone version of the sister Android app ONVIF IP Camera Monitor by the same developer.
The app works nicely with ONVIF authentication disabled, but it still requires a WebUI account to be able to view the RTSP streams from the camera. I cannot leave the credentials fields blank as I am led to expect by the app developer. I can view the two camera streams, and PTZ control and PTZ presets are working as long as the WebUI credentials are populated in the app's config. With this same camera WebUI configuration I can also view the camera feeds using VLC by opening the network URL:
I can access all three video streams by altering the subtype parameter (0,1,2).
What is not clear at all is that the ONVIF credentials are completely separate from the WebUI ones, and they're not listed in the WebUI at all. The default value is admin:admin, and this can only be changed using an additional software tool - for instance ONVIF Device Manager, which also allows you to add new accounts with varying role-based permissions (administrator, operator, user). I found this information in this conversation thread. What is suspicious is that the video streams are not viewable in ONVIF Device Manager, so this may indicate the Dahua is not entirely compliant with the ONVIF specification. With auth disabled, these streams should be viewable without credentials, and you can see that none are being passed in the RTSP URL that ONVIF Device Manager is using.
But the app works - so far so good. Exposing an unsecured ONVIF device to the Internet is not advisable though, so what happens when we enable ONVIF authentication in the camera WebUI? Well, the IP CENTCOM app can enumerate the device just fine when given ONVIF account credentials, but it cannot view the RTSP streams - I get an auth failure.
Testing with VLC with ONVIF authentication enabled also results in a failure of the RTSP URL quoted above. The only way I could get VLC to show me the stream was to use a WebUI account (not ONVIF) and to remove the "&proto=Onvif" parameter from the URL:
So why should enabling ONVIF authentication break the RTSP stream? Is it because ONVIF authentication enabled implies that the credentials should be presented as a one-time digest, rather than plaintext? This seems implied by this stackoverflow post (and its answers).
I see that another ONVIF app developer did apparently implement some specific workaround for an ONVIF authentication issue on DAHUA camerashere.
My camera info below:
Model SD22204T-GN (PAL variant)
Software Version 2.400.0000.16.R.T1.484, build : 2016-05-17
WEB Version 3.2.1.345759
ONVIF Version 2.4.2
I would appreciate if someone with developer knowledge of ONVIF could assist, or perhaps someone who has successfully configured some other ONVIF application to view steams from a Dahua camera with ONVIF authentication enabled. The latter would narrow down whether the problem is with the app, or the camera firmware.
Thanks!
I'm trying to configure a SD22204T-GN camera for remote viewing via a smartphone app IP CENTCOM. This is the Windows Phone version of the sister Android app ONVIF IP Camera Monitor by the same developer.
The app works nicely with ONVIF authentication disabled, but it still requires a WebUI account to be able to view the RTSP streams from the camera. I cannot leave the credentials fields blank as I am led to expect by the app developer. I can view the two camera streams, and PTZ control and PTZ presets are working as long as the WebUI credentials are populated in the app's config. With this same camera WebUI configuration I can also view the camera feeds using VLC by opening the network URL:
Code:
rtsp://onvifadmin:onvifpass@192.168.1.108/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
What is not clear at all is that the ONVIF credentials are completely separate from the WebUI ones, and they're not listed in the WebUI at all. The default value is admin:admin, and this can only be changed using an additional software tool - for instance ONVIF Device Manager, which also allows you to add new accounts with varying role-based permissions (administrator, operator, user). I found this information in this conversation thread. What is suspicious is that the video streams are not viewable in ONVIF Device Manager, so this may indicate the Dahua is not entirely compliant with the ONVIF specification. With auth disabled, these streams should be viewable without credentials, and you can see that none are being passed in the RTSP URL that ONVIF Device Manager is using.
But the app works - so far so good. Exposing an unsecured ONVIF device to the Internet is not advisable though, so what happens when we enable ONVIF authentication in the camera WebUI? Well, the IP CENTCOM app can enumerate the device just fine when given ONVIF account credentials, but it cannot view the RTSP streams - I get an auth failure.
Testing with VLC with ONVIF authentication enabled also results in a failure of the RTSP URL quoted above. The only way I could get VLC to show me the stream was to use a WebUI account (not ONVIF) and to remove the "&proto=Onvif" parameter from the URL:
Code:
rtsp://webuiadmin:webuipass@192.168.1.108/cam/realmonitor?channel=1&subtype=0&unicast=true
So why should enabling ONVIF authentication break the RTSP stream? Is it because ONVIF authentication enabled implies that the credentials should be presented as a one-time digest, rather than plaintext? This seems implied by this stackoverflow post (and its answers).
I see that another ONVIF app developer did apparently implement some specific workaround for an ONVIF authentication issue on DAHUA camerashere.
My camera info below:
Model SD22204T-GN (PAL variant)
Software Version 2.400.0000.16.R.T1.484, build : 2016-05-17
WEB Version 3.2.1.345759
ONVIF Version 2.4.2
I would appreciate if someone with developer knowledge of ONVIF could assist, or perhaps someone who has successfully configured some other ONVIF application to view steams from a Dahua camera with ONVIF authentication enabled. The latter would narrow down whether the problem is with the app, or the camera firmware.
Thanks!
Last edited: