Page 2 of 3

Error: Frame signature incorrect

Posted: Tue Jul 17, 2007 6:22 pm
by chrisslybear
I got an error when I first run this script: I could resolved by installing "pear" on my linux ubuntu workstation via synaptic. Then I set "safe_mode = Off" and "upload_tmp_dir=./home/{user}/" in php.ini

Voila - no errors. BUT

When I run this script now, I got the following result
(i reactivated echo-comments):

login request sent! login reply received! OK! get frame request sent! Frame signature incorrect!

What does that mean - is there a solution for that?
Will I ever get a Still-Picture out of my webcam?

@roby - the link to darkwet is very interesting, thank you!
they show a long description of commands and cgi-urls for the hawk webcam. unfortunately they don't work on a logilink wc0002... does anybody know, where such an information for wc0002 can be found?

=========
Linux Ubuntu Feisty 7.04
Local Apache Webserver, php5
Logilink wc0002 IP WLAN Camera

Posted: Wed Jul 18, 2007 8:27 am
by sala2001
Hello!

echo("login request sent!");, echo("OK");, etc lines are commented out in my code, with // . Didn't you erased the comments?

"Frame signature incorrect" is harder problem. Try comment out the following lines:

Code: Select all

$sig = unpack("H*", $ret);
if ($sig[1] != "000700060000") {
  error("Frame signature incorrect");
}
[/url][/list]

Posted: Mon Jul 23, 2007 6:48 pm
by chrisslybear
hi again,

@sala2001: no i didn't erase the comments, i just deleted the "//" before the commands. i tried what you said. the result of the former frame signature incorrect error is now:

login request sent! login reply received! OK! get frame request sent! frame signature ok! frame_size = 38513!
Warning: Cannot modify header information - headers already sent by (output started at /var/www/webcam.php:57) in /var/www/webcam.php on line 105
...

After i erased all "echo"-command before line 105 IT WORKED!!!
The current image is shown in the browser. i replaced
> echo($ret)
with
> dump($ret, "/home/{user}/webcam.jpg")

at the end of the php script.

it works-> when i call http://localhost/webcam.php the webcam.jpg is created. cool!

Now i created a bash command script file ("wcupl.sh"):

Code: Select all

#!/bin/sh
cd /home/{user}
>???<
ftp -n myhost.com <<EOT
user ftpuser ftppass
put webcam.jpg
quit
EOT
And a crontab file (wcupl.cron) containing:

Code: Select all

*/30 * * * * wcupl.sh
In the Terminal i run

crontab -u {user} wcupl.cron

Now the "last question": Which command opens http://localhost/webcam.php from bash command line (it should replace >???< above)?

Thanks for help.

Posted: Mon Jul 23, 2007 9:30 pm
by Lee Sharp

Code: Select all

wget http://localhost/webcam.php

periodic ftp-upload of single webcam jpeg *resolved*

Posted: Tue Jul 24, 2007 9:12 am
by chrisslybear
thank you. i have now a working system on my linux system, uploading a single image from the webcam every 30 minutes.

i am currently programming an additional php file for timestamping the webcam.jpg. I post it when finished.

besides, there is no way to get out an uncompressed frame from the webcam, isn't it? in my opinion i don't think that this is possible because of the mjpeg stream, but maybe the manufacturer will provide a better firmware and image quality settings in future, who knows...

but the real question is: does anyone know, why cheaper network webcams don't come out with this essential function "periodic ftp upload of single jpeg file"?

timestamping webcam image

Posted: Tue Jul 24, 2007 3:51 pm
by chrisslybear
okay, here the final result:

I created a directory /webcam with rights for "root" and "www" to read and write.

ins salas script i added/replaced the following lines:

Code: Select all

header("Content-Type: image/jpeg");
//header("Content-Length: $frame_size"); <-comment out, causes error
//header("Content-Disposition: inline; filename=current.jpg"); <- comment out, is not needed
dump($ret,'current.jpg');
fclose($sock);

//Timestamping current Webcam Image
$img = ImageCreateFromJPEG('current.jpg');
$timestamp = time();
$text = date("d.m.Y H:i",$timestamp);
$ttf = $_SERVER['DOCUMENT_ROOT'].'FreeSans.ttf';
$ttfsize = 11;
$angle = 0;
$text_x = 5;
$text_y = 15;
$color1 = ImageColorAllocate($img,0,0,0);
$color2 = ImageColorAllocate($img,255,255,255);
imagettftext($img,$ttfsize,$angle,$text_x,$text_y,$color1,$ttf,$text);
imagettftext($img,$ttfsize,$angle,$text_x-1,$text_y-1,$color2,$ttf,$text);
imagejpeg($img);
imagedestroy($img);
The Crontab File (wcupl.cron) contains:

Code: Select all

*/15 * * * * /webcam/wcupl.sh
The wcupl.sh file contains:

Code: Select all

#!/bin/sh
cd /webcam
ftp -n myhost.com <<EOT
user login pass
put webcam.jpg
quit
EOT
wget http://localhost/webcam.php
mv webcam.php webcam.jpg
It is a little hack, because of a some-seconds-delay between creating the jpeg and ftp-uploading, which causes the script not running correctly. so i just reversed it: First upload the "latest" webcam image, then enough time to create an new one for the next upload. not very clean, i know, but for me it works!

Excellent work

Posted: Fri Aug 24, 2007 12:26 am
by stu22
Sala,

Fantastic bit of work. I picked this cam up for £54 - thanks for investing your time...

stu

URLs

Posted: Tue Aug 28, 2007 6:19 pm
by stu22
Hello,

I emailed the tech support at Edimax. The camera does provide direct JPG url.

http://ip.address/snapshot.jpg
http://ip.address/snapshot.cgi

I have configured the jpg link in ZM. Just include the login credentials as described in the zoneminder tutorial. I am managing to get 8 or 9 fps on a P900. Quite impressive for a £50 cam.

stu

Password:

Posted: Fri Nov 02, 2007 10:31 am
by Bod.h33
Hello, what about login/password? In my case login:password@server/snapshot.jpg does not work in MS IE. If I try, i get "Access Denied". I hope that its MSIE problem, not camera (LCS 717 with 1.29 fw).
Did they sent any info about snapshot.cgi, parameters or something :)?
Sorry for my english.
Dave

IC-1500 camera config

Posted: Mon Jan 07, 2008 2:31 pm
by discoverlinux
Finally got this working so here is my camera config.
ICS-1500 IP 192.168.1.2, port 80, username admin, password 1234

Changes only shown to each tab setting :-

General
Name IC1500
Source type remote
Max FPS 1.00
alarm max FPS 1.00

Source
Remote host name admin:1234@192.168.1.2
Remote host port 80
Remote host path /snapshot.jpg
Capture width 640 (same as set in admin on the IC-1500)
Capture height 480

Buffers
Image buffer size 10
warmup 1
Pre event image 10
Post event image 10


If you want to test the camera prior to this set up use

wget --user admin --password 1234 192.168.1.2/snapshot.jpg

Output should be
--14:35:15-- http://192.168.1.2/snapshot.jpg
=> `snapshot.jpg'
Connecting to 192.168.1.2:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 29,439 (29K) [image/jpeg]

100%[====================================>] 29,439 --.--K/s

14:35:15 (374.41 KB/s) - `snapshot.jpg' saved [29439/29439]

Ic-1500 Linux Source Code

Posted: Fri Feb 15, 2008 8:34 am
by techmundial
Here is the URL from the EDIMax website:

http://www.edimax.com/images/Image/Open ... 65X.tar.gz

Enjoy!

Config with HTML strings

Posted: Fri Feb 15, 2008 9:09 am
by techmundial
Well, after a bit of hacking around with page source on the camera, I put together a string that let me change the settings using the Safari browser or FireFox:

http://admin:1234@192.168.2.3/form/came ... a_left.asp

Options are as follows:

Resolution:
0 = 640x480

Quality:
3 = Highest

Frame Rate:
30 = 30 frames per second (FPS)
25 = 25 FPS
20 = 20 FPS
15
10
5
3
1


Frequency:
60 = 60hz
50 = 50 hz
0 = "Outdoor" mode

Auto Exposure:
ON /OFF

Others are Black, White, Brightness - defaults *should* work ok, but you can tweak for your environment. For me, the defaults worked ok.


I hope this is helpful.

Anyhow, this thing is Linux based, we ought to be able to make a new firmware and Open Source it, RIGHT? The reason I am asking you all about this is because I have problems with my camera freezing after about 14 hours every day. The ethernet works, but the camera stops producing JPG images. VERY STRANGE. Anyone else having this problem? Have you found a fix to it besides power cycling? Firmware is already the latest version. Thanks in advance.
-TechMundial

Posted: Fri Feb 15, 2008 9:42 am
by cordel
Thats is awesome, Thanks for taking a poke, I'm sure several people will be happy with this.
You might take a peek at a suggestion by another forum user that I'm considering:
http://www.zoneminder.com/forums/viewtopic.php?t=11122

new wiki about IC-1500 EdiMax IP camera

Posted: Mon Oct 06, 2008 10:54 am
by techmundial
I just opened up a wiki about the EdiMax IC-1500 IP camera if anyone is interested. We plan on getting other users to help develop a firmware or custom OS to go on it. We hope this will stop the camera from freezing and give us some extra features:

http://ic1500.wikispaces.com


8)

Posted: Mon Oct 13, 2008 12:14 am
by majost
Just out of curiosity, what would you say the the average FPS with the IC-1000 and IC-1500?