edimax IC-1500Wg

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.
unufrii
Posts: 2
Joined: Thu Feb 01, 2007 8:37 am

edimax IC-1500Wg

Post 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).
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post 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.
unufrii
Posts: 2
Joined: Thu Feb 01, 2007 8:37 am

Post 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" :)
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Wish you best of luck 8)
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Post 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.
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Post by robi »

hi unufrii, any news? It it working yet? There are lots of people that are anxiously waiting for your script :D
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Post 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
Last edited by robi on Fri Mar 30, 2007 9:20 pm, edited 1 time in total.
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Post 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.
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Post 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?
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Post by robi »

Some other URL I found, that may be interesting:
http://www.darkwet.net/darkboard2/topic ... IC_ID=4862
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Post 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.
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Post 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. :(
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Post 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?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post 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.
sala2001
Posts: 2
Joined: Sat Jul 07, 2007 6:21 pm

Post 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);
?> 
Post Reply