Code: Select all
chmod 777 /dev/ttyS0
Code: Select all
[root@zm examples]# ./testvisca /dev/ttyS0
Some camera info:
------------------
vendor: 0x0001
model: 0x0402
ROM version: 0x0005
socket number: 0x02
Zoom value: 0x0000
power status: 0x02
Setting pan tilt home
Setting pan tilt absolute position
Absolute position, Pan value: -500, Tilt value: -200
Setting pan tilt absolute position
Absolute position, Pan value: 500, Tilt value: 200
Setting pan tilt home
Then start zm add a monitor with control enabled and control type Sony VISCA and control device zmcontrol-visca.pl and control address 1 i assume this refers to the VISCA address not the serial port /dev/ttyS0 or /dev/ttyS1 . I have tried a control address of both 0 & 1. When I start zm with debug set to 9 in the log I get
Code: Select all
06/20/06 19:24:41.978744 zmfix[9566].INF-zm_debug.c/304 [New Debug Level = 9, New Debug Log = /tmp/zm_debug.log.09566]
06/20/06 19:24:41.979838 zmfix[9566].DB1-zmfix.cpp/67 [Permissions on /dev/video are ok at 20666]
06/20/06 19:24:41.980968 zmfix[9566].ERR-zmfix.cpp/40 [Can't stat : No such file or directory]
06/20/06 19:24:41.981232 zmfix[9566].ERR-zmfix.cpp/40 [Can't stat zmcontrol-visca.pl: No such file or directory]
Code: Select all
[root@zm examples]# zmcontrol-visca.pl --device=/dev/ttyS0 --panspeed=254 --panstep=9381 --command=move_rel_right
[root@zm examples]#
Code: Select all
[root@zm examples]# zmcontrol-visca.pl --device=/dev/ttyS3 --panspeed=254 --panstep=9381 --command=move_rel_right
can't getattr: Input/output error at /usr/local/bin/zmcontrol-visca.pl line 95
Can't call method "baudrate" on an undefined value at /usr/local/bin/zmcontrol-visca.pl line 96.
[root@zm examples]#
The zm-visc.log gives
Code: Select all
20/06/06 19:32:29.866534 zmctrl-visc-jdh[9980].DBG [--device=/dev/ttyS0 --panspeed=254 --panstep=-7381 --command=move_rel_right]
20/06/06 19:32:29.869339 zmctrl-visc-jdh[9980].DBG [Step Right]
20/06/06 19:33:13.063076 zmctrl-visc-jdh[10011].DBG [--device=/dev/ttyS0 --panspeed=254 --panstep=-7381 --command=move_rel_left]
20/06/06 19:33:13.065851 zmctrl-visc-jdh[10011].DBG [Step Left]
20/06/06 19:40:24.443330 zmctrl-visc-jdh[10315].DBG [--device=/dev/ttyS0 --panspeed=254 --panstep=-200 --command=move_rel_left]
20/06/06 19:40:24.446044 zmctrl-visc-jdh[10315].DBG [Step Left]
20/06/06 20:19:44.482649 zmctrl-visc-jdh[12094].DBG [--device=/dev/ttyS0 --panspeed=254 --panstep=9381 --command=move_rel_right]
20/06/06 20:19:44.485411 zmctrl-visc-jdh[12094].DBG [Step Right]
20/06/06 20:21:00.481432 zmctrl-visc-jdh[12141].DBG [--device=/dev/ttyS3 --panspeed=254 --panstep=9381 --command=move_rel_right]
20/06/06 20:32:58.534860 zmctrl-visc-jdh[12661].DBG [--device=/dev/ttyS0 --panspeed=254 --panstep=10000 --command=move_rel_right]
20/06/06 20:32:58.537448 zmctrl-visc-jdh[12661].DBG [Step Right]
Any further things I should try before giving up & going back to using my trusty axis 2400 to do the serial control?