Hello,
I bought a PTZ camera with name "Toaioho QB320". It works fine with the belonging app, also the PTZ control.
But actually I want to use Zoneminder. But I cannot make PTZ control work.
I figured out two ports: 8554 and 8000. 8554 works with the video. I found in the web the link for this and it works fine.
rtsp://admin:password@192.168.2.58:8554/Streaming/Channels/101
But no chance to get PTZ run.
I tried it with ODM. This works directly perfect, but I don't know how to figure the info about PTZ out.
ODM indetifies the camera as "Meari Speed 6BT" and PTZ works fine.
In Zoneminder I tried 1000 things and syntaxes and ports but without success.
If I e.g. use: admin:password@192.168.2.58:8000/onvif/device_service and "Netcat ONVIF" then I get in the log
[After sending PTZ command, camera returned the following error:'400 Not Authorized'
But username and password are correct
What can I do to figure it out.
No PTZ control with QB320
-
- Posts: 2
- Joined: Tue Oct 01, 2024 6:52 am
Re: No PTZ control with QB320
I think you should testing with Netcat. To test ONVIF commands using Netcat, ensure you’re sending properly formatted SOAP requests. Here’s a basic example of how you might format a PTZ command:
Replace <length> with the length of your SOAP request and <SOAP request here> with the actual SOAP XML for a PTZ command.
Code: Select all
bash
echo -e "POST /onvif/PTZ HTTP/1.1\r\nHost: 192.168.2.58:8000\r\nContent-Type: application/soap+xml;charset=utf-8\r\nContent-Length: <length>\r\n\r\n<SOAP request here>" | nc 192.168.2.58 8000
Re: No PTZ control with QB320
Use Netcat.
Look in logs in /var/log/zm/zmcontrol_*.log
Turn on debug Options->Logging->LOG_DEBUG
It might be as simple as needing to pass user authentication.
Look in logs in /var/log/zm/zmcontrol_*.log
Turn on debug Options->Logging->LOG_DEBUG
It might be as simple as needing to pass user authentication.
Re: No PTZ control with QB320
I think this part is interessting:
I use: admin:password@192.168.2.58:8000/onvif/device_service
In the log file I can find
[After sending PTZ command, camera returned the following error:'400 Not Authorized'
But I don't know why. User and password are the same as for the stream.
// part from log file
27.10.2024 20:23:59.212264 zmcontrol_2[322779].DB1 [ZoneMinder::Logger:321] [LogOpts: level=DB9/DB1, screen=OFF, database=INF, logfile=DB1->/var/log/zm/zmcontrol_2.log, syslog=WAR]
27.10.2024 20:23:59.212465 zmcontrol_2[322779].DB1 [main:72] [zmcontrol: arg string: --id 2 sock file /run/zm/zmcontrol-2.sock]
27.10.2024 20:23:59.592398 zmcontrol_2[322779].INF [main:116] [Starting control server 2/Netcat]
27.10.2024 20:23:59.595119 zmcontrol_2[322779].INF [main:127] [Control server 2/Netcat starting at 24/10/27 20:23:59]
27.10.2024 20:24:07.554770 zmcontrol_2[322779].DB1 [main:165] [$VAR1 = {
'autostop' => 1,
'command' => 'moveConRight'
};]
27.10.2024 20:24:07.554877 zmcontrol_2[322779].DB1 [ZoneMinder::Control::Netcat:307] [Move Right]
27.10.2024 20:24:07.555360 zmcontrol_2[322779].DB1 [ZoneMinder::Control:237] [onvif/PTZ[9]]
27.10.2024 20:24:07.555422 zmcontrol_2[322779].DB1 [ZoneMinder::Control:237] [<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
<Security s:mustUnderstand="1" xmlns="http://docs.oasis-open.org/wss/2004/01/ ... xt-1.0.xsd">
<UsernameToken xmlns="http://docs.oasis-open.org/wss/2004/01/ ... xt-1.0.xsd">
<Username>admin</Username>
<Password Type="http://docs.oasis-open.org/wss/2004/01/ ... </Password>
<Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/ ... y"></Nonce>
<Created xmlns="http://docs.oasis-open.org/wss/2004/01/ ... Z</Created>
</UsernameToken>
</Security>
</s:Header><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ContinuousMove xmlns="http://www.onvif.org/ver20/ptz/wsdl"><P ... y><PanTilt x="0.49" y="0" xmlns="http://www.onvif.org/ver10/schema"/></V ... lope>[1143]]
27.10.2024 20:24:07.634372 zmcontrol_2[322779].ERR [ZoneMinder::Control::Netcat:163] [After sending PTZ command, camera returned the following error:'400 Not Authorized'
MSG:<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
<Security s:mustUnderstand="1" xmlns="http://docs.oasis-open.org/wss/2004/01/ ... xt-1.0.xsd">
<UsernameToken xmlns="http://docs.oasis-open.org/wss/2004/01/ ... xt-1.0.xsd">
<Username>admin</Username>
<Password Type="http://docs.oasis-open.org/wss/2004/01/ ... </Password>
<Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/ ... y"></Nonce>
<Created xmlns="http://docs.oasis-open.org/wss/2004/01/ ... Z</Created>
</UsernameToken>
</Security>
I use: admin:password@192.168.2.58:8000/onvif/device_service
In the log file I can find
[After sending PTZ command, camera returned the following error:'400 Not Authorized'
But I don't know why. User and password are the same as for the stream.
// part from log file
27.10.2024 20:23:59.212264 zmcontrol_2[322779].DB1 [ZoneMinder::Logger:321] [LogOpts: level=DB9/DB1, screen=OFF, database=INF, logfile=DB1->/var/log/zm/zmcontrol_2.log, syslog=WAR]
27.10.2024 20:23:59.212465 zmcontrol_2[322779].DB1 [main:72] [zmcontrol: arg string: --id 2 sock file /run/zm/zmcontrol-2.sock]
27.10.2024 20:23:59.592398 zmcontrol_2[322779].INF [main:116] [Starting control server 2/Netcat]
27.10.2024 20:23:59.595119 zmcontrol_2[322779].INF [main:127] [Control server 2/Netcat starting at 24/10/27 20:23:59]
27.10.2024 20:24:07.554770 zmcontrol_2[322779].DB1 [main:165] [$VAR1 = {
'autostop' => 1,
'command' => 'moveConRight'
};]
27.10.2024 20:24:07.554877 zmcontrol_2[322779].DB1 [ZoneMinder::Control::Netcat:307] [Move Right]
27.10.2024 20:24:07.555360 zmcontrol_2[322779].DB1 [ZoneMinder::Control:237] [onvif/PTZ[9]]
27.10.2024 20:24:07.555422 zmcontrol_2[322779].DB1 [ZoneMinder::Control:237] [<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
<Security s:mustUnderstand="1" xmlns="http://docs.oasis-open.org/wss/2004/01/ ... xt-1.0.xsd">
<UsernameToken xmlns="http://docs.oasis-open.org/wss/2004/01/ ... xt-1.0.xsd">
<Username>admin</Username>
<Password Type="http://docs.oasis-open.org/wss/2004/01/ ... </Password>
<Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/ ... y"></Nonce>
<Created xmlns="http://docs.oasis-open.org/wss/2004/01/ ... Z</Created>
</UsernameToken>
</Security>
</s:Header><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ContinuousMove xmlns="http://www.onvif.org/ver20/ptz/wsdl"><P ... y><PanTilt x="0.49" y="0" xmlns="http://www.onvif.org/ver10/schema"/></V ... lope>[1143]]
27.10.2024 20:24:07.634372 zmcontrol_2[322779].ERR [ZoneMinder::Control::Netcat:163] [After sending PTZ command, camera returned the following error:'400 Not Authorized'
MSG:<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
<Security s:mustUnderstand="1" xmlns="http://docs.oasis-open.org/wss/2004/01/ ... xt-1.0.xsd">
<UsernameToken xmlns="http://docs.oasis-open.org/wss/2004/01/ ... xt-1.0.xsd">
<Username>admin</Username>
<Password Type="http://docs.oasis-open.org/wss/2004/01/ ... </Password>
<Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/ ... y"></Nonce>
<Created xmlns="http://docs.oasis-open.org/wss/2004/01/ ... Z</Created>
</UsernameToken>
</Security>
Re: No PTZ control with QB320
Actually I don't know what you mean with SOAP.beliawicker wrote: ↑Thu Oct 24, 2024 3:27 am I think you should testing with Netcat. To test ONVIF commands using Netcat, ensure you’re sending properly formatted SOAP requests. Here’s a basic example of how you might format a PTZ command:
Replace <length> with the length of your SOAP request and <SOAP request here> with the actual SOAP XML for a PTZ command.Code: Select all
bash echo -e "POST /onvif/PTZ HTTP/1.1\r\nHost: 192.168.2.58:8000\r\nContent-Type: application/soap+xml;charset=utf-8\r\nContent-Length: <length>\r\n\r\n<SOAP request here>" | nc 192.168.2.58 8000
-
- Posts: 1335
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: No PTZ control with QB320
A protocol used in ONVIF is Simple Object Access Protocol (SOAP)
Re: No PTZ control with QB320
as it works with ODM I used Wireshark (WS) to get the packets what ODM sends to port 8000 if I use PTZ
First this is sent:
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope ... ><Security s:mustUnderstand="1" xmlns="http://docs.oasis-open.org/wss/2004/01/ ... ><Password Type="http://docs.oasis-open.org/wss/2004/01/ ... ord><Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/ ... e><Created xmlns="http://docs.oasis-open.org/wss/2004/01/ ... er><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ContinuousMove xmlns="http://www.onvif.org/ver20/ptz/wsdl"><P ... LE_000</Pr
But how can help me this in ZM? AT least I can see: /onvif/device_service and /onvif/ptz_service
A usage in ZM has no effect.
First this is sent:
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope ... ><Security s:mustUnderstand="1" xmlns="http://docs.oasis-open.org/wss/2004/01/ ... ><Password Type="http://docs.oasis-open.org/wss/2004/01/ ... ord><Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/ ... e><Created xmlns="http://docs.oasis-open.org/wss/2004/01/ ... er><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ContinuousMove xmlns="http://www.onvif.org/ver20/ptz/wsdl"><P ... LE_000</Pr
But how can help me this in ZM? AT least I can see: /onvif/device_service and /onvif/ptz_service
A usage in ZM has no effect.