Page 1 of 3

edimax IC-1500Wg

Posted: Thu Feb 01, 2007 8:47 am
by unufrii
Has anyone tried to get the EDIMAX IC-1500Wg wireless network cam to work will zone minder?
I am even not able to view camera output in my browser (linux + firefox).

Posted: Thu Feb 01, 2007 9:54 am
by cordel
If you searched the forum you'll find someone claimed to get an earlier model to work but required some special script. It would apprear that it might not really be compatable without the script. Hence it's also not on the compatable hardware list either.

http://www.zoneminder.com/forums/viewto ... ght=edimax

I can't say if it would work with IC-1500Wg.

Posted: Thu Feb 01, 2007 1:07 pm
by unufrii
I found the post you mentioned, but unfortunately the script does not work with 1500Wg and that is why I posted this question here.
Anyway - I am currently writing a script, which at this moment is able to get a frame from the cam, but it still needs some "fine tuning" :)

Posted: Thu Feb 01, 2007 3:44 pm
by cordel
Wish you best of luck 8)

Posted: Sat Mar 17, 2007 10:56 am
by robi
Hi! Any news about this Edimax model?

I have the Edimax IC-1500, which is the same as Wg, except it doesn't have the Wireless port, it has only a wired 10/100 port. The rest is the same - help to connect this one to the system would be much appreciated.

Thanks.

Posted: Fri Mar 23, 2007 8:05 am
by robi
hi unufrii, any news? It it working yet? There are lots of people that are anxiously waiting for your script :D

Posted: Thu Mar 29, 2007 6:57 am
by robi
After googling a bit, I found that this camera runs under different brand names, sold in different parts of the world. The camera is available with or without the wireless module. The Wireless version costs about 20% more than the wired-only model. See some examples, there may be more:

Edimax IC-1500 (Central + Eastern Europe)
Image

Hawking HNC230G (US) (this one seems that internally matches with Edimax IC-1000 - not sure)
Image

AmberTek GC-J15W (Asia)
Image

IP Camera Roline, RWIC-54, W-LAN54 (21.18.1675) (Russia)
Image

Logilink WC0001 (Germany, Western Europe)
Image

Some technical data, this may also help:
Image

Posted: Thu Mar 29, 2007 7:00 am
by robi
It uses a javascript to grab the pictures to the browser, so it should be possible to make it work with ZM. Any help would be greatly appreciated.

Posted: Fri Mar 30, 2007 8:17 am
by robi
Found something for the Hawking model, made by Tim Haynes:
http://spodzone.org.uk/packages/hawking-HNC230G.txt
8)

Code: Select all

#!/usr/bin/env ruby

# Script to extract images from the Hawking HNC230G
# 
# Copyright (C) Tim Haynes 
# HNC230G{at}stirfried.vegetable.org.uk    http://pig.sty.nu/
#
# Redistributable under the terms of the GNU Public License: see
# <http://www.gnu.org/copyleft/gpl.html>
#
# Requires ruby, imagemagick
#

nopics=ARGV[1] || "1"
nopics=nopics.to_i

require 'socket'
require 'RMagick'

xsize,ysize=640,480

puts "Connecting"

s=TCPSocket.new('buffalo', 4321)

nopics.times { |n|

  puts "Requesting data"
  s.puts("0110")

  len=s.read(2).reverse.unpack("v")[0]
  2.times {s.getc }

  puts "Len: #{len}"
  jpeg=s.read(len)

  puts "Getting image"

  img=Magick::Image.from_blob(jpeg)[0];

  puts "Saving image"
  img.write("foo-#{n}.jpg")

}
Any idea how to implement it into ZM?

Posted: Fri Mar 30, 2007 8:49 am
by robi
Some other URL I found, that may be interesting:
http://www.darkwet.net/darkboard2/topic ... IC_ID=4862

Posted: Sat Mar 31, 2007 8:08 am
by robi
The camera uses an ActiveX control to display image in browser.
I downloaded it from the camera (the url is http://xxx.xxx.x.xx/IPCamPluginMJPEG.cab), unpacked it with WinRAR, registered the IPCamPluginMJPEG.ocx with regsvr32.

Then, I created a new webpage with a Html editor. Added this ActiveX control to the page, like this:

Code: Select all

<html>

<head>
<title>EdimaxTest</title>
</head>

<body>
<p>
<object classid="clsid:B015B944-7316-49AE-AC84-ACCA9379EA32" id="IC1500PlugIn1" width="611" height="585">
<PARAM name="IP" value="xxx.xxx.x.xx">
<PARAM name="Port" value="4321">
<PARAM name="Code" value="A99EDF974454ADE3674A">
</object>
</p>

</body>

</html>
And guess what? It works! No username or password required. :shock:

Please note the "Code" parameter. I found this by right-click-ing near the picture (camera_right frame) in the camera's viewer page and selecting view source.
Without this parameter the html won't work. Wonder if the code is the same for the other Edimax owners.
Is it possible that this code is actually the one that corresponds to '0110' at the older Edimax 1000 or the Hawking model?

Is there a way to know what this ActiveX actually does (beside applying the viewer's current time and date on the picture :lol: )? To make a new script with the same tasks.

Any help would be greatly appreciated.

Posted: Sat Mar 31, 2007 9:16 am
by robi
Tried with an IP sniffer, it's plain to see that it sends periodically packets to the camera, but it's not clear what. :(

Posted: Sat Mar 31, 2007 9:22 am
by robi
I really feel lonely with this thing going on... :( Is this topic visible to others? I get absolutely no reaction from anybody. Is it just me, or what?

Posted: Sat Mar 31, 2007 9:35 am
by cordel
Yes it's visable (if you can see it then any one else can as well), if someone had an answer they certainly would. There are few users of this cam I am aware of and have yet to hear a report of success.

Posted: Sat Jul 07, 2007 6:32 pm
by sala2001
Hello!

You can get images from your camera with my PHP script and a web server in the following form:
http://webserver/Edimax_IC1500.php

I think, ZM likes this.

Sorry for my english. :)

Code: Select all

<?

    $login = "admin";
    $pass = "xxxxxxx";
    $ip = "aa.bb.cc.dd";
    $port = "4321";

    // 120 byte
    // 3x 0x00,
    // 1x 0x01,
    // user name
    // 1x 0x00,
    // password,
    // Nx 0x00,
    $logincmd = pack(
	    "x3H*a*xa*x" . 
		    (120 - 3 - 1 - strlen($login) - 1 - strlen($pass)), 
	    "01", $login, $pass);
    // 120 byte
    // 3x 0x00,
    // 1x 0x0e,
    // Nx 0x00,
    $framecmd = pack("x3H2x116", "0e");

    $login_ok_reply = "0c";

    function error($msg)
    {
	global $sock;

	if ($sock) {
	    fclose($sock);
	}
	die($msg);
    }

    function request($sock, $cmd, $len)
    {
	$ret = fwrite($sock, $cmd, $len);
	if (!$ret) {
	    error("request()/fwrite()==FALSE");
	}
	if ($ret != $len) {
	    error("request()/fwrite(): written: {$len}/{$ret}");
	}
	fflush($sock);
    }

/*
    function dump($data, $file)
    {
	$f = fopen($file, "wb");
	if (!$f) {
	    error("dump()/fopen()");
	}
	$ret = fwrite($f, $data);
	if (!$ret) {
	    error("dump()/fwrite()");
	}
	fclose($f);
    }
*/

    $sock = fsockopen("tcp://$ip", $port);
    if (!$sock) {
	error("fsockopen(tcp://$ip:$port)");
    }
    // 350ms
    stream_set_timeout($sock, 0, 350000);

    request($sock, $logincmd, 120);
    //echo("login request sent\n");

    $ret = stream_get_contents($sock, 120);
    //echo("login reply received\n");
    if (strlen($ret) != 120) {
	error("Error in reply for login. size:120/" . strlen($ret));
    }
    //dump($ret, "0.dump");
    $reply = unpack("H*", $ret[3]);
    if ($reply[1] != $login_ok_reply) {
	error("Login incorrect!");
    }
    //echo("OK\n");

    request($sock, $framecmd, 120);
    //echo("get frame request sent\n");

    // 6 fix byte
    $ret = fread($sock, 6);
    if (!$ret) {
	error("Frame signature fread()==FALSE");
    }
    //dump($ret, "1.dump");
    $sig = unpack("H*", $ret); 
    if ($sig[1] != "000700060000") {
	error("Frame signature incorrect");
    }
    //echo("frame signature ok\n");

    // 2 byte: jpeg size.
    $ret = fread($sock, 2);
    if (!$ret) {
	error("Frame size fread()==FALSE");
    }
    //dump($ret, "2.dump");
    $unpacked = unpack("H*", $ret);
    sscanf($unpacked[1], "%04x", $frame_size);
    //echo("frame_size = $frame_size\n");

    // 20 byte ???.
    $ret = fread($sock, 20);
    if (!$ret) {
	error("Skip before frame fread()==FALSE");
    }

    // JPEG: $frame_size byte.
    $ret = stream_get_contents($sock, $frame_size);
    if (!$ret) {
	error("Frame data stream_get_contents()==FALSE");
    }
    if (strlen($ret) != $frame_size) {
	error("Frame data stream_get_contents() size: " .
		"{$frame_size}/" . strlen($ret));
    }

    header("Content-Type: image/jpeg");
    header("Content-Length: $frame_size");
    header("Content-Disposition: inline; filename=current.jpg");
    echo($ret);

    fclose($sock);
?>