Page 2 of 2

Posted: Fri Mar 07, 2008 3:36 am
by barkeep8
batnator wrote:
cordel wrote:I'm not sure if it would be proper to set the incorrect mime type in ZM code.
it's only a quick and dirty fix for some setups but not for the mainstream sources of zm, I have contacted the vendors Trendnet and Sparklan for a fix in firmware, but no response yet.
Thanks. I updated the firmware on my trendnet cam to the latest one, and it's still not working. I am going to try to recompile my ZM with the patch next.

Does anyone have any helpful links or a tutorial on how to include the patched source code to re-compile? This is something I've never done before.

Thanks!

I'm stuck

Posted: Thu Mar 13, 2008 4:15 am
by barkeep8
It looks like other people have the Trendnet TV-IP301 working with zoneminder.

My ZM setup(s) is 1.22.3 and 1.23.1. Some on virtual hardware, some on physical. The host OS is ubuntu dapper LTS 6.06 with latest patches. I have several servers polling local and IP cams, both virtual and physical. The VM servers are slightly slower to respond to motion events, but fast enough to capture most things.

ANYWAY, I've been following this thread, and trying to implement a trendnet tv-ip301 cam into a ZM server.

When the camera first arrived, it had firmware 1.08 or so. I could pull up

http://camip/goform/video? ('? being 1,2,3 or whatever') in a web browser (firefox or IE) and have a live pic available anytime i hit the refresh button.

I read this forum and implemented the suggestions.

I upgraded my TN TV-IP301 to firmware 1.22

Now when I query the "http://camip/goform/video? ('? being 1,2,3 or whatever')" in a web browser i get a dialog to save the file, but no image in my browser. I can save the file as a JPG and open it fine.

I've attempted to include the above mentioned source code in a re-compile on a functional ZM server. I failed, i think because I don't know how to add addtional source code to a build.

I would be thank ful if someone could:

1. Show an easy way to get images from a Trendnet TV-IP301 with firmware at or above 1.22 to zoneminder.

2. Show me, or send links to how to include 3rd party source code into a recompile of the application in question.

thanks in advance.


barkeep8 wrote:
batnator wrote:
cordel wrote:I'm not sure if it would be proper to set the incorrect mime type in ZM code.
it's only a quick and dirty fix for some setups but not for the mainstream sources of zm, I have contacted the vendors Trendnet and Sparklan for a fix in firmware, but no response yet.
Thanks. I updated the firmware on my trendnet cam to the latest one, and it's still not working. I am going to try to recompile my ZM with the patch next.

Does anyone have any helpful links or a tutorial on how to include the patched source code to re-compile? This is something I've never done before.

Thanks!

Posted: Fri Apr 04, 2008 7:00 am
by batnator
save the patch somewhere, unpack the latest zm sources an go into zm source directory, then:

Code: Select all

patch -p0 < path/to/patch/filename
then follow the existing instructions from http://www.zoneminder.com/wiki/index.ph ... n#Building

Trendnet tv-ip301 cam

Posted: Fri Apr 04, 2008 3:55 pm
by barkeep8
I finally got it working today. Thanks everyone for your helpful hints.

Posted: Tue Jul 29, 2008 9:16 pm
by robee
apoullion wrote:using the script to fix JPG:
host:server1
port:80
path:/fix.php?host=cameraip&path=/goform/video

without using script prove:
host:cameraip
port:80
path:/goform/video

luck good.
and what if the camera has login and password configured?

Re: Trendnet tv-ip301 cam

Posted: Tue Jul 29, 2008 9:33 pm
by barkeep8
I should also mention now that I've given up on the Trendnet IPTV-301 cam and zoneminder. I was able to get ZM to connect and retrieve images from the camera. This seemed to work well, and I was capturing motion events just as I could with any other IP cam.

I found out after a few days that ZM polling the Trendnet camera in this manner would cause the CAMERA to crash, and it was inaccessable, even through the built in web interface. The only way to bring the camera back online was to disconnect the power for a few seconds and plug it back in.

Occasionally I check Trendnet's site to see if they have corrected the MIME type in thier firmware. Apparently, they are still offering only V 1.22 and it's dated 4/08. I am basically giving up using this camera with Zoneminder for now. The steps required to implement the patch and other hoops to jump though just were not worth it to me. Hopefully, Trendnet will someday fix thier firmware.
barkeep8 wrote:I finally got it working today. Thanks everyone for your helpful hints.

Posted: Tue Jul 29, 2008 9:46 pm
by batnator
Hi, I have these problems too, but following snippet running for each cam every 3 hours via cron makes me happy

Code: Select all

wget -q -O /tmp/cams_restart --http-user=admin --http-passwd=admin http://192.168.71.71/system_reboot.cgi > /dev/null 2> /dev/null
greets Frank

Posted: Tue Jul 29, 2008 9:53 pm
by batnator
robee wrote:
apoullion wrote:using the script to fix JPG:
host:server1
port:80
path:/fix.php?host=cameraip&path=/goform/video

without using script prove:
host:cameraip
port:80
path:/goform/video

luck good.
and what if the camera has login and password configured?
replace in fix.php

Code: Select all

$x = file_get_contents("http://".$host.$path); 
with

Code: Select all

$x = file_get_contents("http://username:password@".$host.$path); 
but using the php fixscript produced unnecessary load on your server, with one cam ok, but with 4 or more it's better using the patch from this thread.

greets Frank

Posted: Tue Jun 23, 2009 4:36 pm
by Ryu
Very insightful post!

Unfortunately the "proper" patching didn't work for me :/

I'm trying to get ZM to work with Micronet SP5520 IP Cameras with no success. I recompiled 1.22.3 on my Ubuntu 8.04 server (64bit), but problem persists. I get a blank image.

Source camera has been set with:

Remote Host Name: admin:admin@192.168.1.30
Remote Host Port: 80
Remote Host Path: /goform/video2

Am I doing something wrong?

Micronet confirmed that there is no firmware upgrade to solve the incorrect MIME problem. I'm running out of ideas/patience with this issue. :x

Any ideas if this patch is included in the newer versios of ZM?

Thanks

Posted: Tue Jun 23, 2009 6:44 pm
by batnator
@Ryu

the patch works fine with latest zm and the Trendnet TV-IP301 and the Sparklan CAS-861 (tested). Keep sure that mpeg4 output of the cam is disabled, mpeg4 output from this cams does not work with zm.

regards
Frank

Posted: Mon Sep 14, 2009 9:01 pm
by barkeep8
batnator wrote:@Ryu

the patch works fine with latest zm and the Trendnet TV-IP301 and the Sparklan CAS-861 (tested). Keep sure that mpeg4 output of the cam is disabled, mpeg4 output from this cams does not work with zm.

regards
Frank
Also, I don't recommend upgrading the firmware on your TV IP301 cam if you've gotten any of the above fixes to work. I upgraded my firmware today, and now even the /goform/video# path is broken. I'm running version 1.23-66 on my trendnet TV IP301.

I wish I had seen the suggestion earlier for resetting the cam from my ZM server cron jobs. That's a neat work around.

I doubt I'll try to downgrade my firmware, but maybe.

Thanks everyone.

Posted: Wed Jan 13, 2010 9:48 pm
by antx
Here's the patch for 1.24.2 (basically a rip-off of batnator's work). No tests have been done with other 1.24.X releases.

On a side note, TrendNet sucks major leather cherio.

Anyway, enjoy the patch.

Code: Select all

--- zm_remote_camera_http.cpp.orig      2009-05-28 04:47:59.000000000 -0400
+++ zm_remote_camera_http.cpp   2010-01-13 16:12:48.000000000 -0500
@@ -302,6 +302,13 @@
                                                        format = JPEG;
                                                        state = CONTENT;
                                                }
+                                               else if ( !strcasecmp( content_type, "image/mpeg" ) )
+                                                {
+                                                        // Single image
+                                                        mode = SINGLE_IMAGE;
+                                                        format = JPEG;
+                                                        state = CONTENT;
+                                                }
                                                else if ( !strcasecmp( content_type, "image/x-rgb" ) )
                                                {
                                                        // Single image
@@ -399,6 +406,10 @@
                                        {
                                                format = JPEG;
                                        }
+                                        else if ( !strcasecmp( content_type, "image/mpeg" ) )
+                                        {
+                                                format = JPEG;
+                                        }
                                        else if ( !strcasecmp( content_type, "image/x-rgb" ) )
                                        {
                                                format = X_RGB;
@@ -735,6 +746,13 @@
                                                        format = JPEG;
                                                        state = CONTENT;
                                                }
+                                               else if ( !strcasecmp( content_type, "image/mpeg" ) )
+                                                {
+                                                        // Single image
+                                                        mode = SINGLE_IMAGE;
+                                                        format = JPEG;
+                                                        state = CONTENT;
+                                                }
                                                else if ( !strcasecmp( content_type, "image/x-rgb" ) )
                                                {
                                                        // Single image
@@ -899,6 +917,10 @@
                                        {
                                                format = JPEG;
                                        }
+                                        else if ( !strcasecmp( content_type, "image/mpeg" ) )
+                                        {
+                                                format = JPEG;
+                                        }
                                        else if ( !strcasecmp( content_type, "image/x-rgb" ) )
                                        {
                                                format = X_RGB;


TV-IP301

Posted: Mon Feb 22, 2010 6:26 pm
by bounder
I have the patch where do i put it?

Firmware Upgrade...

Posted: Sat Dec 11, 2010 10:46 am
by guitarsolopro
heyy guys
i am new i have tryed webcam xp but that has failed i did try zoneminder 1.22 with firmware 1.08 (not to sure but it was 1. sumthing) I looked at the trendnet website and i saw a firmware 2.0 and i downloaded and upgraded it i will be trialing the trendnet camera out and i will tell you if it needs to be patched

oh btw i dont know about anyone else but i would never by a trendnet camera ever ever again