monitor setup for control is:
Control Type: Pelco-D
Control Device: /dev/ttyS0
Control Address: 2
Auto Stop Timeout: 0.25
no track or return
If I attach a terminal to the serial port and do the following:
Code: Select all
$ stty -F /dev/ttyS0 9600
$ echo "command" > /dev/ttyS0
I may be barking up the wrong tree, but I've found that /usr/bin/zmcontrol.pl does not continue after line 200
I added line 199 to output value of $message
If I uncomment the Debug statement, it is never reached.
Code: Select all
188 while( 1 )
189 {
190 my $nfound = select( my $rout = $rin, undef, undef, $timeout );
191 if ( $nfound > 0 )
192 {
193 if ( vec( $rout, fileno(SERVER), 1 ) )
194 {
195 my $paddr = accept( CLIENT, SERVER );
196 my $message = <CLIENT>;
197
198 next if ( !$message );
199 Info( $message );
200 my $params = jsonDecode( $message );
201 #Debug( Dumper( $params ) );
202
203 my $command = $params->{command};
204 $control->$command( $params );
205 close( CLIENT );
206 }
207 else
208 {
209 Fatal( "Bogus descriptor" );
200 }
201 }
Code: Select all
/var/log/zm/zmcontrol.log
01/27/12 14:07:08.227570 zmcontrol[29239].INF [Starting control server 1/PelcoD]
01/27/12 14:07:08.228560 zmcontrol[29240].INF [Control server 1/PelcoD starting at 12/01/27 14:07:08]
01/27/12 14:07:09.228698 zmcontrol[29240].INF [{"autostop":1,"tiltstep":null,"tiltspeed":null,"ycoord":null,"panspeed":26,"step":null,"panstep":null,"speed":null,"xcoord":null,"preset":null,"command":"moveConRight"}]
2) When I get this working, how is the baud rate set?
Thank you in advance for any assistance yo may be able to provide.