Jump to content
coco

newbie question, calling PRESET 95 to set camera address

Recommended Posts

hi, please help me understand what i'm doing wrong, it's maybe an easy question but i've spent countless hours searching in google and trying everything and still don't get it. i have a new bosch autodome easy II ptz camera* that shows image but i've been unable to control it so far. i'm trying to first of all set the camera address address on the OSD (since there doesn't seem to be any other way) by calling the PRESET 95 with a cheap PTZ remote controller i got for initial testing like the one in the attached image. both speak pelco D and P protocols and the bosch camera has autobauding (it is actually showing "AutoBauding..." the whole time)

 

well, the first thing that confuses me is that i have to tell the controller/keyboard/cheap remote the camera address i want to talk to when the camera does not have any address set yet, how does this make any sense? but ok, the camera's instructions say that if the address is set to 0 it will respond to commands sent to any address so my first guess is that it will have set address 0 from factory until i assign another one, but i set it to target camera 1, 2, 3..0 and when i try to call preset point 95 nothing happens, it just keeps showing "AutoBauding". i tried with both P and D protocols and different baud rates (1200, 2400, 4800, 9600) and while using pelco P i even tried all possible addresses (0-32) and still don't get the OSD or any response to zoom+/- or move right/up/down/left. per camera's instructions it is connected to the controller +/A to + and -/B to -. i tried to SET preset 95 as well instead of just calling it, but still nothing

 

i know i'm missing something but the camera is sitting here for months and i have tried everything that comes to my mind. maybe i just should keep searching, is there any good introduction into this subject or how did you guys learn what presets are etc, only from the operating instructions? i haven't found anything besides specifications and manuals and still don't understand what i'm doing wrong

 

* http://www.boschsecurity.us/en-us/autodomeeasy/

o_adapter_ptz_dome_controller_01.jpg.1f70751aa911146ca02338e7f03fdb29.jpg

Share this post


Link to post
Share on other sites

You do have an RS485 wire hooked up for communication, correct? And if so, you have it hooed up the same on each end- positive to positive, neg to neg. I've also read along the way that hitting the iris button within the dvr's ptz control sometimes calls up menus. Sorry I can't be of more help, but you're at the right place- someone will help you through. Good luck.

Share this post


Link to post
Share on other sites

hi shockwave199, yes, it is hooked up the same on each end, positive to positive and negative to negative (it's what i meant with +/A to + and -/B to -). the camera supports besides RS485 also biphase, but i didn't connect those wires to anything. and the manual says it is configured from factory for RS-485 operation in pelco protocol mode.

 

i just tried to hit the iris button, short and long press, using pelco D and P at different baud rates and still don't get any response, but thanks for the hint and your feedback! the camara seems to be working fine, the problem is most likely the person operating it when starting up it does initialize and find it's home position but that's all it does, then it just says AutoBauding. what makes it more complicated is that i don't have the background, i don't know if it's possible to talk to a camera without specifying target camera address first - according to the manual if the camera address is zero it should react to all commands no matter which target address you choose, but it looks like it does not react. i've searched for "default address" and couldn't find anything either, i called bosch and they said they don't give support to end users and directed me to the seller that couldn't help me either. and the seller of the remote control didn't even know what i was talking about when i asked about preset 95 and using it to open the OSD (something that seems to be standard to open the on screen menu on PTZ cameras). since i'm completely lost now i wanted to try asking the experts here

 

here is some information about the remote control if anyone is wondering how the thing works: http://www.ebay.co.uk/itm/Pelco-D-P-RS48-Remote-Control-IR-PTZ-Camera-Controller-/130626854682 -no intention to advertise this seller, it's not even where i got mine from, but i will remove the link if anyone feels it's not ok to post it here

 

thanks again shockwave199!

Share this post


Link to post
Share on other sites

I've read lately here there are other presets to try,such as preset 85,90,91,95. Maybe one of them? I'd probably make a cup of joe and sit and try all of them to see which one is the golden ticket. That is, if no one else has the quick answer. Best of luck to you.

Share this post


Link to post
Share on other sites

I apologize, I didnt read through the whole posts so if I miss something, I am sorry. but I once used that same exact controller to try out and 2 out of the 3 I ordered did not work, so that very well could be the problem. I would recommend getting a better controller or using a DVR to control it.

 

Also some things to consider. does the bosch have dip switches in which you can set the baud rate, protocol, and cam ID? If so, make sure the camera and the controller match up. If after matching up those 3 vital elements and it still doesnt work, then please ditch that cheap controller and get a good one.

Share this post


Link to post
Share on other sites

thanks all so much for the responses! SEANHAWG what you said that 2 out of the 3 you ordered didn't work made me suspicious and after some testing it looks like this is the problem here too.

 

since i don't have an oscilloscope i could never verify if the controller was actually working and the multimeter didn't tell me if something was going on either, but i wasn't sure if it's fast enough to notice the couple of bytes that are sent so i just assumed it did work (well, it's new..). now i have tried with an RS485-to-USB adapter and a shareware version of a software PTZ controller i've found and the camera works fine, i've tried with both pelco P and D and at different baud rates and the camera responds perfectly. there is no such thing as preset 95 in the program but directly a "menu" button that made the camera display the OSD

 

Soundy i considered reversing the polarity of the RS485 line more than once but didn't dare since i'm not sure if this can damage the camera, is it safe to do?

 

shockwave199 you are right, there are other presets defined in the manual like autoscan limit stops and preset tours but i was always considering the camera address as the priority, how can you talk to a camera without address that has no dip switches but is configured in the OSD? it looks like the initial address is 0 since it did respond (which makes sense) and the problem was the remote-controller-thing all the time

 

i can continue now learning how zoneminder works and i'm very happy to know the camera works fine. again thanks a lot!

Share this post


Link to post
Share on other sites
now i have tried with an RS485-to-USB adapter and a shareware version of a software PTZ controller i've found and the camera works fine, i've tried with both pelco P and D and at different baud rates and the camera responds perfectly.

Try connecting your controller to the USB serial port, fire up Terminal or a similar app (PuTTy is a good cross-platform open-source terminal app), tell it that it's "connected", and it should display the incoming data from the controller. Even with the wrong baud rate, you should still see gibberish that shows the controller is sending data.

 

Soundy i considered reversing the polarity of the RS485 line more than once but didn't dare since i'm not sure if this can damage the camera, is it safe to do?

Won't harm it a bit. If you know the camera is working, it's possible that the controller is simply mis-labelled.

 

how can you talk to a camera without address that has no dip switches but is configured in the OSD?

Almost all PTZs will display their current configuration on-screen during startup. You should be able to see what settings it has so you can match them on the computer or controller.

Share this post


Link to post
Share on other sites

thanks again for the feedback Soundy, i've found the problem now. i had to order a second rs-485 to usb adapter to compare the data sent by the software PTZ controller against that of the ebay remote controller and it turns out the problem was the remote controller the whole time

 

Try connecting your controller to the USB serial port, fire up Terminal or a similar app (PuTTy is a good cross-platform open-source terminal app), tell it that it's "connected", and it should display the incoming data from the controller. Even with the wrong baud rate, you should still see gibberish that shows the controller is sending data.

 

the remote controller was sending data but it was not matching the pelco d protocol specifications. since i was not sure if i was doing something wrong i made sure the baud rate and protocol are correct in the configuration and compared the data against the one sent by the software controller that matches the specs. i'm now 100% sure that the ebay controller is a useless piece of s***

 

Won't harm it a bit. If you know the camera is working, it's possible that the controller is simply mis-labelled.

 

i tried and it was not the problem but thanks for telling me it's safe to do!

 

Almost all PTZs will display their current configuration on-screen during startup. You should be able to see what settings it has so you can match them on the computer or controller.

 

the settings are displayed but it does not show the address it has configured (and it seems it had none set from factory). but playing with the software controller i've been able to confirm that the camera not only works fine, i could open the menu and change the settings. btw the camera did respond to address 0.

 

to make sure i'm understanding it and that everything is working correctly i also made a small perl script that sends the basic pelco commands from the linux command line and it works without problem, i'll leave it here if anyone wants to play with it. i know it's simple and dirty but i'm not a programmer and it works fine for testing and understanding the protocol

 

again thanks all for the feedback!

 

 


#!/usr/bin/perl

use strict;
use warnings;
use Device::SerialPort;
use Getopt::Std;

my $target='00';
getopt('c:');
our($opt_c); my $cmd = $opt_c;

if (!defined $cmd) { print "Usage: prog -c <up|down|right|left|menu|zoom{0,1}|iris{0,1}|focus{0,1}>\n\n"; exit -1; }

my $serial=Device::SerialPort->new("/dev/ttyUSB0");
$serial->databits("8");
$serial->baudrate("2400");
$serial->parity("none");
$serial->stopbits(1);

print "target is $target\n";

if ($opt_c =~ /menu/) { print "command is menu\n";        &send($target, '00', '03', '00', '5f', '62'); }
elsif ($opt_c =~ /up/) { print "command is up\n";         &send($target, '00', '08', '00', '20', '28'); sleep 1 ; &send($target, '00', '00', '00', '00', '00'); }
elsif ($opt_c =~ /down/) { print "command is down\n";     &send($target, '00', '10', '00', '20', '30'); sleep 1 ; &send($target, '00', '00', '00', '00', '00'); }
elsif ($opt_c =~ /right/) { print "command is right\n";   &send($target, '00', '02', '20', '00', '22'); sleep 1 ; &send($target, '00', '00', '00', '00', '00'); }
elsif ($opt_c =~ /left/) { print "command is left\n";     &send($target, '00', '04', '20', '00', '24'); sleep 1 ; &send($target, '00', '00', '00', '00', '00'); }
elsif ($opt_c =~ /zoom0/) { print "command is zoom0\n";   &send($target, '00', '40', '00', '00', '40'); sleep 1 ; &send($target, '00', '00', '00', '00', '00'); }
elsif ($opt_c =~ /zoom1/) { print "command is zoom1\n";   &send($target, '00', '20', '00', '00', '20'); sleep 1 ; &send($target, '00', '00', '00', '00', '00'); }
elsif ($opt_c =~ /iris0/) { print "command is iris0\n";   &send($target, '04', '00', '00', '00', '04'); sleep 1 ; &send($target, '00', '00', '00', '00', '00'); }
elsif ($opt_c =~ /iris1/) { print "command is iris1\n";   &send($target, '02', '00', '00', '00', '02'); sleep 1 ; &send($target, '00', '00', '00', '00', '00'); }
elsif ($opt_c =~ /focus0/) { print "command is focus0\n"; &send($target, '00', '80', '00', '00', '80'); sleep 1 ; &send($target, '00', '00', '00', '00', '00'); }
elsif ($opt_c =~ /focus1/) { print "command is focus1\n"; &send($target, '01', '00', '00', '00', '01'); sleep 1 ; &send($target, '00', '00', '00', '00', '00'); }
else { print "unknown command\n"; exit -1; }

sleep 1;                                                                                                                                                                           
$serial->close;                                                                                                                                                                    

sub send {                                                                                                                                                                         

  my($adr,$cmd1,$cmd2,$dat1,$dat2,$sum)=@_;
  print "* sending ff $adr $cmd1 $cmd2 $dat1 $dat2 $sum\n";
  $serial->write(pack ('H2' x 7, 'ff', $adr, $cmd1, $cmd2, $dat1, $dat2, $sum));

}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×