Page 1 of 1

Hawking HNC210

Posted: Sun Mar 25, 2007 9:23 pm
by donutboy
Does anyone know how to get this camera working with zoneminder?

Thanks

DB

Posted: Thu Mar 29, 2007 3:20 am
by donutboy
It requires java to be loaded on the workstation. Where it runs a camera applet. It has a streaming video port at 4321, but I am unable to get it to do anything interesting. Also been told it supports mjpeg.

Any ideas?

Thanks again,

DB

Posted: Thu Mar 29, 2007 6:28 am
by robi
Hm. After Googling a bit, found this:

Hawking HNC210:
Image

Edimax IC-1000:
Image

AmberTek GC-J15:
Image

It looks like they are similar OEM versions, actually may be the same camera running under different brand names.

For Edimax 1000 there is a solution: http://www.zoneminder.com/forums/viewto ... ght=edimax
Try it and see, may work for you! Let us know how you get along.

Posted: Tue Apr 24, 2007 12:21 pm
by tipok
This script can get jpeg pictures from Hawking HNC210 camera.
Maybe later i wrote mjpeg relay script.

Code: Select all

#!/usr/bin/perl

use IO::Socket;
#SET WHERE CAMERA IS
$sock = new IO::Socket::INET (PeerAddr => '10.11.0.101',
                                PeerPort => 4321,
                                Proto    => 'tcp',
                                Timeout  => 1);



#do it again forever
while (1){
#sleep timeout (this value give us 1fps)
select(undef, undef, undef, 0.5);

$sock->send("0110\n");
$sock->read($size, 2);
$sock->read($j1, 1);
$sock->read($j2, 1);
$j1=oct("0x".unpack("H*", $j1));
$j2=oct("0x".unpack("H*", $j2));
#print "J1_USERS:".$j1."\n";
#print "J2:".$j2."\n";
$size=oct("0x".unpack("H*", $size));
#print "SIZE:".$size."\n";
if ($size != 0) {
$sock->read($data, $size);
open OUTF, "> /var/www/hawking.jpg" or die "Can't open $outfile : $!";
print OUTF $data;
close OUTF;
}

}
For testing this script write how many users connected to this camera and size in bytes of jpeg image from camera.

Posted: Wed Jul 11, 2007 2:33 am
by donutboy
Thank you! It is pulling the images!

Posted: Thu Jul 26, 2007 9:13 pm
by shibadoo
Hi,

as a bloody beginner with no clue about perl: what exactly do i have tro do? I have some webspace which permits perl-scripts, but what now? thanks so much for your help!!!!!

Posted: Wed Sep 05, 2007 9:33 am
by Antimon
Create a file named cam.pl (or whatever you want), paste the code above to it and modify it according to your preferences.
Save and close the file and chmod it "chmod 755 cam.pl" so that you can execute the script.
Run it with "./cam.pl" and test if it grabs the images correctly - if that works you can start the script in the background with "./cam.pl &"

But, as long as you can't connect from your webspace directly to your cam it won't help you very much...

perl script error

Posted: Sat Apr 05, 2008 8:25 pm
by sloan949
I get this error when I run this script.

Can't call method "send" on an undefined value at ./hawking.pl line 17.

line 17 is this


$sock->send("0110\n");

does anyone know what this might be changed to for my implementaion.

Posted: Thu Jan 22, 2009 5:49 pm
by skerit
Very nice, the script works great. Increasing the fps is even possible.

I'm just curious: is there a way to stream the content? So, the end result wouldn't be a jpg, but the script would continuously serve what it's getting as a video?