Toshiba IK-WB15A , __Live.jpg issue

Post here to ask any questions about hardware suitability, configuration in ZoneMinder, or experiences. If you just want to know if something works with ZoneMinder or not, please check the Hardware Compatibility sections in the forum, and the Wiki first. Also search this topic as well.
Post Reply
paperstreet
Posts: 82
Joined: Thu May 18, 2006 7:45 pm

Toshiba IK-WB15A , __Live.jpg issue

Post by paperstreet »

hi again.

briefly:

Just got a IK-WB15A in. Trying to add it to my zoneminder install which has a IKWB11A. Both cameras have a __live.jpg shot which works well with zoneminder.

Example: If i go to

http://192.168.100.98/admin/__live.jpg? ... =&aWt3Yg==

(the last part is base 64 encoding, thats the stock user/pass for these cams (root,ikwb)

I get a live shot from the camera in my browser

strangely this has always worked with the toshiba cams of this style. I put this info in Zoneminder, and I get no image. Below is log output pertinent to this event, as well as my zm.conf.

I noticed a shared memory reference issue in zmwatch.log, although i have set the memory as instructed in the FAQ. (Basically added the lines to my sysctl.conf) I think this is the issue, as it specifically complains about the Toshiba IKWB15A. I will continue perusing the forums for a solution until someone smarter than me sees this.

ZM Version: 1.22.3
Ubuntu 6.10 Edgy Eft installed via Wiki (fresh install)
2 cameras ATM: IK-WB11A (low bandwidth cam) and IK-WB15A (labeled as such)

zmdc.log

Code: Select all


05/01/07 19:17:54.203046 zmdc[7398].ERR ['zmc -m 2' exited abnormally, exit status 255]
05/01/07 19:18:15.971250 zmdc[7398].ERR ['zmc -m 1' exited abnormally, exit status 255]
05/01/07 19:18:15.971619 zmdc[7398].INF [Starting pending process, zmc -m 1]
05/01/07 19:18:15.976780 zmdc[7398].INF ['zmc -m 1' starting at 07/05/01 19:18:15, pid = 7714]
05/01/07 19:18:28.007071 zmdc[7398].INF [Starting pending process, zmc -m 3]
05/01/07 19:18:28.011237 zmdc[7398].INF ['zmc -m 3' starting at 07/05/01 19:18:28, pid = 7720]
05/01/07 19:18:28.023004 zmdc[7398].ERR ['zmc -m 3' exited abnormally, exit status 255]
05/01/07 19:19:21.207178 zmdc[7398].ERR ['zmc -m 1' exited abnormally, exit status 255]
05/01/07 19:19:21.207550 zmdc[7398].INF [Starting pending process, zmc -m 1]
05/01/07 19:19:21.212770 zmdc[7398].INF ['zmc -m 1' starting at 07/05/01 19:19:21, pid = 7765]
05/01/07 19:19:58.174496 zmdc[7398].ERR ['zmc -m 1' exited abnormally, exit status 255]
05/01/07 19:20:03.075692 zmdc[7398].INF [Starting pending process, zmc -m 1]
05/01/07 19:20:03.079831 zmdc[7398].INF ['zmc -m 1' starting at 07/05/01 19:20:03, pid = 7787]
05/01/07 19:21:20.416472 zmdc[7398].ERR ['zmc -m 1' exited abnormally, exit status 255]
05/01/07 19:21:24.703121 zmdc[7398].INF ['zmc -m 1' starting at 07/05/01 19:21:24, pid = 7822]
05/01/07 19:23:14.033396 zmdc[7398].INF [Starting pending process, zmc -m 2]
05/01/07 19:23:14.037568 zmdc[7398].INF ['zmc -m 2' starting at 07/05/01 19:23:14, pid = 7864]
05/01/07 19:23:14.132855 zmdc[7398].ERR ['zmc -m 2' exited abnormally, exit status 255]
05/01/07 19:23:48.000158 zmdc[7398].INF [Starting pending process, zmc -m 3]
05/01/07 19:23:48.005719 zmdc[7398].INF ['zmc -m 3' starting at 07/05/01 19:23:48, pid = 7880]
05/01/07 19:23:48.014641 zmdc[7398].ERR ['zmc -m 3' exited abnormally, exit status 255]
05/01/07 19:26:19.296345 zmdc[7398].ERR ['zmc -m 1' exited abnormally, exit status 255]
05/01/07 19:26:19.296722 zmdc[7398].INF [Starting pending process, zmc -m 1]
05/01/07 19:26:19.301893 zmdc[7398].INF ['zmc -m 1' starting at 07/05/01 19:26:19, pid = 7953]
05/01/07 19:26:33.611290 zmdc[7398].ERR ['zmc -m 1' exited abnormally, exit status 255]
05/01/07 19:26:38.025521 zmdc[7398].INF [Starting pending process, zmc -m 1]
zwatch.log

Code: Select all

05/01/07 18:21:24.681514 zmwatch[4708].INF [Restarting capture daemon for Toshiba-IKWB15A, shared memory not valid]
05/01/07 18:21:24.840613 zmwatch[4708].INF ['zmc -m 2' starting at 07/05/01 18:21:24, pid = 5793]
05/01/07 18:21:34.844832 zmwatch[4708].ERR [Can't get shared memory id '7a6d2002', 2: No such file or directory]
05/01/07 18:21:34.845207 zmwatch[4708].INF [Restarting capture daemon for Toshiba-IKWB15A, shared memory not valid]
05/01/07 18:21:35.035637 zmwatch[4708].INF ['zmc -m 2' starting at 07/05/01 18:21:35, pid = 5834]
05/01/07 18:21:45.042493 zmwatch[4708].ERR [Can't get shared memory id '7a6d2002', 2: No such file or directory]
05/01/07 18:21:45.042813 zmwatch[4708].INF [Restarting capture daemon for Toshiba-IKWB15A, shared memory not valid]
05/01/07 18:21:45.213939 zmwatch[4708].INF ['zmc -m 2' starting at 07/05/01 18:21:45, pid = 5855]
05/01/07 18:22:05.224312 zmwatch[4708].ERR [Can't get shared memory id '7a6d2002', 2: No such file or directory]
05/01/07 18:22:05.224679 zmwatch[4708].INF [Restarting capture daemon for Toshiba-IKWB15A, shared memory not valid]
05/01/07 18:22:05.390993 zmwatch[4708].INF ['zmc -m 2' starting at 07/05/01 18:22:05, pid = 5872]
05/01/07 18:22:15.395230 zmwatch[4708].INF [Restarting capture daemon for Toshiba-IKWB15A, shared memory not valid]
05/01/07 18:22:15.552539 zmwatch[4708].INF ['zmc -m 2' starting at 07/05/01 18:22:15, pid = 5885]
05/01/07 18:42:56.251411 zmwatch[4708].ERR [Can't get shared memory id '7a6d2002', 2: No such file or directory]
05/01/07 18:42:56.251636 zmwatch[4708].INF [Restarting capture daemon for Toshiba-IKWB15A, shared memory not valid]
05/01/07 18:42:56.382903 zmwatch[4708].INF ['zmc -m 2' starting at 07/05/01 18:42:56, pid = 6460]
05/01/07 19:13:13.959475 zmwatch[7430].INF [Watchdog starting]
05/01/07 19:13:13.959863 zmwatch[7430].INF [Watchdog pausing for 30 seconds]
05/01/07 19:13:43.966830 zmwatch[7430].INF [Restarting capture daemon for Toshiba-IKWB15A, shared memory not valid]
05/01/07 19:13:44.148856 zmwatch[7430].INF ['zmc -m 2' starting at 07/05/01 19:13:44, pid = 7466]
05/01/07 19:13:54.153910 zmwatch[7430].ERR [Can't get shared memory id '7a6d2002', 2: No such file or directory]
05/01/07 19:13:54.154336 zmwatch[7430].INF [Restarting capture daemon for Toshiba-IKWB15A, shared memory not valid]
05/01/07 19:13:54.304687 zmwatch[7430].INF ['zmc -m 2' starting at 07/05/01 19:13:54, pid = 7491]
05/01/07 19:21:24.550361 zmwatch[7430].INF [Restarting capture daemon for lowBandwidth, time since last capture 6 seconds ($
05/01/07 19:21:24.705905 zmwatch[7430].INF ['zmc -m 1' starting at 07/05/01 19:21:24, pid = 7822]
05/01/07 19:27:44.938483 zmwatch[7430].INF [Restarting capture daemon for lowBandwidth, time since last capture 8 seconds ($
05/01/07 19:27:45.110239 zmwatch[7430].INF ['zmc -m 1' starting at 07/05/01 19:27:45, pid = 8002]



[/code]
paperstreet
Posts: 82
Joined: Thu May 18, 2006 7:45 pm

Post by paperstreet »

Ok so after more searching, I assume that:

1.) this watch shared memory issue is part of a bigger problem. It is only saying that it can't get the image, not why.

2.) zmdc.log is the best source for further info. I have seen ALOT of these in the logs.


05/01/07 19:18:28.007071 zmdc[7398].INF [Starting pending process, zmc -m 3]
05/01/07 19:18:28.011237 zmdc[7398].INF ['zmc -m 3' starting at 07/05/01 19:18:28, pid = 7720]
05/01/07 19:18:28.023004 zmdc[7398].ERR ['zmc -m 3' exited abnormally, exit status 255]

(this is the second install here.)

Going to head home and think about what else it could be. I'll be back in the morning to download the CTU cd (my old method) and see what happens using that. Not normally in a hurry,but i have a demo that involves selling ALOT of cameras and hardware to the town here. I need to have something working by 9 am thursday. Any advice from here on out is appreciated. I will say this is my 3rd install on ubuntu edgy and I am wondering is this is either distro or hardware issues, as I don't recall seeing this on the last install I did.

Scott
paperstreet
Posts: 82
Joined: Thu May 18, 2006 7:45 pm

Post by paperstreet »

Ha. Got it.

2 things:

1.) new IKwb15a is user:pass@ipaddress, the base64 garbage was for the old ikwb11a and

2.) you have to turn regular expressions off in ZM for this cam.


hope this helps someone. going to make a PTZ script tomorrow, will post it here.

Scott
whosbob
Posts: 9
Joined: Tue Dec 18, 2007 4:49 pm
Location: San Jose, Ca.

IKWB15a

Post by whosbob »

I also have purchased a new IKwb15a, And was very happy to hear that it works with zm. I have yet however got it to work properly ( blank screen)

Ok so,
http://user:pass@ipaddress/admin/__live.jpg works fine for a single shot in my windows firefox browser. I also have disable regexp as per previous post,

under General heading for camera setup:

Source type: Remote
Enabled: checked

Under Source Heading:

Remote Host Name: root:ikwb@xxx.xxx.xxx.xxx
Remote Host Port: 80
Remote Host Path: /admin/__live.jpg
Remote Image Colours: 24
Capture Width (pixels): 640
Capture Height (pixels): 480
Orientation: Normal

Is this setup wrong? also is there any ptz code out there?

Thanks in advance for any help.
whosbob
Posts: 9
Joined: Tue Dec 18, 2007 4:49 pm
Location: San Jose, Ca.

Post by whosbob »

Ok it ended up being the shared memory thing , modifing the sysctl.conf file following instructions in the faq. .

Thanks
deadsoulz
Posts: 12
Joined: Tue Jan 20, 2009 6:55 pm

Post by deadsoulz »

Did you ever post this control script?
promethiusan
Posts: 9
Joined: Mon Sep 21, 2009 7:53 pm

Post by promethiusan »

Ok, figured I might jump in here for two reasons. One to share the script I have written and the other to see if anybody else has had better luck with the Preset functions which I haven't been able to figure out, even though the following command works:

Code: Select all

wget http://10.69.7.115/admin/cgi-bin/pt_preset.cgi --post-data 'DEFonoff=0\&preset_ID=1\&preset_name_sub=Test\&preset_name=Test' --http-user=USERNAME --http-password=PASSWORD
I have not figured out how to get the post to work from the perl module. I'm using ZM 1.24.2 and the PTZ sections work fine.
Anyways, here its:

Code: Select all

# ==========================================================================
#
# ZoneMinder Toshiba IK-WB15A IP Control Protocol Module
# Copyright (C) 2001-2008  Philip Coombes
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
# ==========================================================================
#
# This module contains the implementation of the Toshiba IK-WB15A camera control
# protocol
#
package ZoneMinder::Control::IKWB15A;

use 5.006;
use strict;
use warnings;

require ZoneMinder::Base;
require ZoneMinder::Control;
our @ISA = qw(ZoneMinder::Control);

our $VERSION = $ZoneMinder::Base::VERSION;

# ==========================================================================
#
# Toshiba IK-WB15A Control Protocol
#
# ==========================================================================

use ZoneMinder::Debug qw(:all);
use ZoneMinder::Config qw(:all);

use Time::HiRes qw( usleep );

sub new
{
    my $class = shift;
    my $id = shift;
    my $self = ZoneMinder::Control->new( $id );
    bless( $self, $class );
    srand( time() );
    return $self;
}

our $AUTOLOAD;

sub AUTOLOAD
{
    my $self = shift;
    my $class = ref($self) || croak( "$self not object" );
    my $name = $AUTOLOAD;
    $name =~ s/.*://;
    if ( exists($self->{$name}) )
    {
        return( $self->{$name} );
    }
    Fatal( "Can't access $name member of object of class $class" );
}

sub open
{
    my $self = shift;

    $self->loadMonitor();

    use LWP::UserAgent;
    $self->{ua} = LWP::UserAgent->new;
    $self->{ua}->agent( "ZoneMinder Control Agent/".ZM_VERSION );

    $self->{state} = 'open';
}

sub close
{
    my $self = shift;
    $self->{state} = 'closed';
}

sub printMsg
{
    my $self = shift;
    my $msg = shift;
    my $msg_len = length($msg);

    Debug( $msg."[".$msg_len."]" );
}

sub sendCmd
{
    my $self = shift;
    my $cmd = shift;

    my $result = undef;

    printMsg( $cmd, "Tx" );

    my $req = HTTP::Request->new( GET=>"http://".$self->{Monitor}->{ControlAddress}."/$cmd" );
    my $res = $self->{ua}->request($req);

    if ( $res->is_success )
    {
        $result = !undef;
    }
    else
    {
        Error( "Error check failed: '".$res->status_line()."'" );
    }

    return( $result );
}

sub sendpostCmd
{
    my $self = shift;
    my $cmd = shift;

    my $result = undef;

    printMsg( $cmd, "Tx" );

    my $req = HTTP::Request->new( POST=>"http://".$self->{Monitor}->{ControlAddress}."/admin/cgi-bin/pt_preset.cgi" );
    my $res = $self->{ua}->request($req);

    if ( $res->is_success )
    {
        $result = !undef;
    }
    else
    {
        Error( "Error check failed: '".$res->status_line()."'" );
    }

    return( $result );
}

sub moveRelUp
{
    my $self = shift;
    Debug( "Move Up" );
    my $cmd = "/user/cgi-bin/pantiltapi.cgi?cont_2=4";
    $self->sendCmd( $cmd );
}

sub moveRelDown
{
    my $self = shift;
    Debug( "Move Down" );
    my $cmd = "/user/cgi-bin/pantiltapi.cgi?cont_2=8";
    $self->sendCmd( $cmd );
}

sub moveRelLeft
{
    my $self = shift;
    Debug( "Move Left" );
    my $cmd = "/user/cgi-bin/pantiltapi.cgi?cont_2=1";
    $self->sendCmd( $cmd );
}

sub moveRelRight
{
    my $self = shift;
    Debug( "Move Right" );
    my $cmd = "/user/cgi-bin/pantiltapi.cgi?cont_2=2";
    $self->sendCmd( $cmd );
}

sub zoomRelTele
{
    my $self = shift;
    my $params = shift;
    my $step = $self->getParam( $params, 'step' );
    Debug( "Zoom Tele" );
    my $cmd = "/user/cgi-bin/wbsetzoom.cgi?type=Set&Zoom=Tele";
    $self->sendCmd( $cmd );
}

sub zoomRelWide
{
    my $self = shift;
    my $params = shift;
    my $step = $self->getParam( $params, 'step' );
    Debug( "Zoom Wide" );
    my $cmd = "/user/cgi-bin/wbsetzoom.cgi?type=Set&Zoom=Wide";
    $self->sendCmd( $cmd );
}
###############################################################
#  Haven't been able to get the preset stuff to work yet.     #
###############################################################
sub presetSet
{
    my $self = shift;
    my $params = shift;
    my $preset = $self->getParam( $params, 'preset' );
    Debug( "Set Preset $preset" );
    my $cmd = "/admin/cgi-bin/pt_preset.cgi?DEFonoff=0&preset_ID=$preset&preset_name_sub=test&preset_name=test";
#    $self->sendpostCmd( $cmd );
    $self->sendCmd( $cmd );
}

sub presetGoto
{
    my $self = shift;
    my $params = shift;
    my $preset = $self->getParam( $params, 'preset' );
    Debug( "Goto Preset $preset" );
    my $cmd = "/admin/cgi-bin/presetapi.cgi?cont_4=$preset";
    $self->sendCmd( $cmd );
}

sub presetHome
{
    my $self = shift;
    Debug( "Home Preset" );
    my $cmd = "/user/cgi-bin/pantiltapi.cgi?cont_2=16";
    $self->sendCmd( $cmd );
}

1;
__END__
Last edited by promethiusan on Tue Feb 09, 2010 8:35 pm, edited 6 times in total.
promethiusan
Posts: 9
Joined: Mon Sep 21, 2009 7:53 pm

Post by promethiusan »

Ok, looks like cut and paste lost all of the perl indentions. Sorry about that. I probably need to figure out a better way to put scripts up.

Update: lorsungcu was kind enough to tell me how to properly display code in the forums. Seems I hadn't noticed the big Code button on my screen. It should display properly now,
Last edited by promethiusan on Tue Feb 09, 2010 8:34 pm, edited 2 times in total.
lorsungcu
Posts: 23
Joined: Mon Jun 23, 2008 3:56 pm

Post by lorsungcu »

promethiusan wrote:Ok, looks like cut and paste lost all of the perl indentions. Sorry about that. I probably need to figure out a better way to but scripts up.
Can you provide some more details as to how you configured this? I'm having trouble with PTZ on my 15As. Also, use the 'code' tags to publish scripts, should preserve formatting.
promethiusan
Posts: 9
Joined: Mon Sep 21, 2009 7:53 pm

Post by promethiusan »

lorsungcu wrote:
promethiusan wrote:Ok, looks like cut and paste lost all of the perl indentions. Sorry about that. I probably need to figure out a better way to but scripts up.
Can you provide some more details as to how you configured this? I'm having trouble with PTZ on my 15As. Also, use the 'code' tags to publish scripts, should preserve formatting.
Hey, that worked great! I added the "CODE" tags, thank you.

Not sure what details you need, but I'd be happy to provide them if you can tell me.

Basically, I snagged another persons control script then changed it up and added in the PTZ commands for the IK-WB15A. I found the commands by using a web browser to control the camera and capturing the HTTP traffic in Wireshark and analyzing the HTTP payloads that are sent to the camera when clicking on each of the PTZ buttons.

hope that helps


I also stumbled across this link for a Toshiba Developer's doc:

http://www.toshibasecurity.com/support/ ... .00.SC.pdf

some folks might find that handy
jthuck
Posts: 1
Joined: Thu Jul 15, 2010 5:52 am

Post by jthuck »

I've created a new Control Type (unsure if I used the right settings there too), but what settings did you use on the Control tab for your camera?
Post Reply