Page 1 of 1

PTZ control from serial port (RS485 and Pelco P protocol)

Posted: Wed May 29, 2013 6:38 pm
by fruizalonso
Hi.
I'm newbie with zoneminder and I have a little big problem with the PTZ control using a serial port ( /dev/ttyS0 ) with an a RS232-RS485 adapter. It works fine from Windows (tested with 100 meters of cable and PTZController) but do nothing from my Zoneminder installation.

I set the device ( /dev/ttyS0 ), the protocol (Pelco P), ... but it do NOTHING. In the log, when I attempt to move de cámera I get the following records:
COMPONENT PID LEVEL MESSAGE FILE LINE
zmcontrol 4213 INF Starting control server 6/PelcoP zmcontrol.pl 0
zmcontrol 4215 INF Control server 6/PelcoP starting at 13/05/28 19:58:04 zmcontrol.pl 0
zmcontrol 4213 FAT Can't connect: No such file or directory zmcontrol.pl 0
web_php 4094 ERR /usr/bin/zmcontrol.pl --tiltspeed=46 --autostop --command=moveConUp --id=6=> /usr/share/zoneminder/includes/functions.php 2323
web_php 4171 ERR socket_sendto( /tmp/zm/zms-044900s.sock ) failed: No such file or directory /usr/share/zoneminder/includes/functions.php 2323

My OS system is Ubuntu 13.04 desktop 64bit, Zoneminder 1.25
I've tried to another RS485 adapter (USB serial adapter, /dev/ttyUSB0 on my system) and I got the same result.
Any hints or help for me?. What am I doing wrong?. A serial port permissions problem maybe?.

Thanks.

Re: PTZ control from serial port (RS485 and Pelco P protocol

Posted: Fri May 31, 2013 10:19 pm
by fruizalonso
Please, help me to configure serial port for PELCO D or PELCO P protocol.
I'm using Ubuntu 13.04 Desktop(64bit), I configured the PTZ camera with Pelco-P 9600 baud and address 1.
From Windows with PTZController it's works fine, but from Ubuntu ... nothing.
I'm sure the problem is configuration (9600,8,N,1,1) but...
Please, help
help
help
heeeeeelp

Re: PTZ control from serial port (RS485 and Pelco P protocol

Posted: Sat Jun 01, 2013 2:07 pm
by jameswilson
you might want to try the address either side of the actual address in the head.
Im not sure which but one of the pelco protocols p or d, has it +1.

Re: PTZ control from serial port (RS485 and Pelco P protocol

Posted: Sat Jun 01, 2013 2:08 pm
by jameswilson
You caould also put an led on the data line to ensure data is being transmitted

Re: PTZ control from serial port (RS485 and Pelco P protocol

Posted: Sun Jun 02, 2013 1:49 pm
by fruizalonso
jameswilson wrote:you might want to try the address either side of the actual address in the head.
Im not sure which but one of the pelco protocols p or d, has it +1.
Yeeeeeaaaahh!!!

It's move!

Thanks James. On my ptz cam the address is 1, but on ZoneMinder the cam address must be set to 0, and it works!!!
For the baud rate, finally I open the perl script on /usr/share/perl5/ZoneMinder/Control and looking for the baud rate params of the serial, I found 4800 for Pelco-P and 2400 for Pelco-D, then I set the camera with that baud rate and... voilà! ...

Thanks James, I never would have suspected that the parameter settings of pelco device address could be wrong (-1 on ZoneMinder).

Re: PTZ control from serial port (RS485 and Pelco P protocol

Posted: Tue Feb 18, 2014 4:46 am
by JonatanGarces
Hi! I'm configuring a hikvision speed dome camera and the source i tried with are remote rtp/rtsp and ffmpeg with success,
but the ptz won't work , so i connect the camera rs485 to the usb port of my laptop ( between them a usb to serial cable a rs232 to a rs485 converter )
how can i make it work a local control device , with the source ffmpeg or remote?
can both be mixed?
THANKS!