JJTech / Gadspot NC1200 W10 - Image capture error

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.
ogm
Posts: 10
Joined: Sun Aug 20, 2006 11:40 am

JJTech / Gadspot NC1200 W10 - Image capture error

Post by ogm »

Hi,

I have recently bought a NC1200 W10 IP Camera. I have installed the software and configured it, tested and it works fine in Windows.

I have tried capturing the image using IE and Firefox, and both works fine using the information I got from http://www.gadget-spot.co.uk/Downloads/ ... NC1200.txt, specifically

http://{USER_ID}:{PASSWORD}@{CAMERA_IP}/cgi-bin/getimage.cgi?motion=1
or
http://{USER_ID}:{PASSWORD}@{CAMERA_IP}/cgi-bin/getimage.cgi?motion=0

I have sucessfully installed zoneminder 1.22.2 on CENTOS 4. I have tested it with a local usb webcam and it works fine. However when I tried to create a remote source type with the corresponding information above, I got the following error messages.

08/20/06 22:01:23.461618 zmwatch[6687].INF [Watchdog starting]
08/20/06 22:01:23.462583 zmwatch[6687].INF [Watchdog pausing for 30 seconds]
08/20/06 22:01:53.467176 zmwatch[6687].ERR [Can't read 'shared_data:size' from shared memory '7a6d2001/950283': Permission denied]
08/20/06 22:01:53.468057 zmwatch[6687].INF [Restarting capture daemon for IPCom01, shared memory not valid]
08/20/06 22:01:53.816511 zmwatch[6687].INF ['zmc -m 1' started at 06/08/20 22:01:53] at /usr/local/bin/zmwatch.pl line 118
08/20/06 22:02:03.847153 zmwatch[6687].ERR [Can't read 'shared_data:size' from shared memory '7a6d2001/950283': Permission denied]
08/20/06 22:02:03.847658 zmwatch[6687].INF [Restarting capture daemon for IPCom01, shared memory not valid]
08/20/06 22:02:04.195777 zmwatch[6687].INF ['zmc -m 1' starting at 06/08/20 22:02:04, pid = 6745] at /usr/local/bin/zmwatch.pl line 118

If anyone has sucessfully installed and captured image (both JPEG and MPEG) from a NC1200 W10 IP Camera to please share your expert knowledge and help me fix my issue.

BTW, ZoneMinder is a great software so Cheers to you all brilliant people who build and supportit!!!

G'day!
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Your problem is that your shared memory is set up such that the applications can't access it. Sometimes this happens when you test a bit as root and then start ZM as apache. It cannot get into the existing shared memory.

If you do 'ipcs -m' you should see a listing of the segments. I would stop ZM, check what segments (if any) are left (these will all have a key that starts 0x7a6d20). Delete them using ipcrm and then restart ZM. Hopefully that will get rid of your problem, which is not directly related to your cameras at all.
Phil
ogm
Posts: 10
Joined: Sun Aug 20, 2006 11:40 am

Post by ogm »

Hi Phil,

Thanks for your advice. It has fixed the initial issue with the shared memory and it is now gone. However there is no picture coming up, it is either white (blank) or plain black, the source info on the webconsole is red. I have provided some information that might be of use to diagnose this other issue.


The zmu result of the NC1200 W10

zmu -q -v -m 1

Monitor 1(IPCom01)
Id : 1
Name : IPCom01
Type : Remote
Host : <user:password>@<camera-ip>
Port : 81
Path : /cgi-bin/getimage.cgi?motion=1
Width : 320
Height : 240
Palette : 4
Colours : 3
Event Prefix : Event-
Label Format : %%s - %y/%m/%d %H:%M:%S
Label Coord : 0,0
Image Buffer Count : 200
Warmup Count : 5
Pre Event Count : 10
Post Event Count : 10
Alarm Frame Count : 1
Section Length : 600
Maximum FPS : 10.00
Alarm Maximum FPS : 5.00
Reference Blend %ge : 7
Track Motion : 0
Function: 3 - Motion Detection
Zones : 1
Id : 1
Label : All
Type: 1 - Active
Shape : 4 points
0: 0,0
1: 319,0
2: 319,239
3: 0,239
Alarm RGB : ff0000
Check Method: 3 - Blobs
Min Pixel Threshold : 25
Max Pixel Threshold : 0
Min Alarm Pixels : 2306
Max Alarm Pixels : 57601
Filter Box : 3,3
Min Filter Pixels : 2306
Max Filter Pixels : 57601
Min Blob Pixels : 1534
Max Blob Pixels : 0
Min Blobs : 1
Max Blobs : 0


Started zmpkg.pl under the apache account and it seems to be running.

ipcs -m

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x7a6d2001 1409025 apache 700 46082244 2
0x7a6d2002 1441808 apache 700 3042244 2


zmdc.log file contains:

08/22/2006 20:24:55.002803 zmdc[26774].INF [Starting pending process, zmc -m 1]
08/22/2006 20:24:55.005310 zmdc[26774].INF ['zmc -m 1' starting at 06/08/22 20:24:55, pid = 27408]
08/22/2006 20:24:55.006774 zmdc[27408].INF ['zmc -m 1' started at 06/08/22 20:24:55]
08/22/2006 20:24:57.276023 zmdc[26774].ERR ['zmc -m 1' exited abnormally, exit status 255]
08/22/2006 20:30:17.039247 zmdc[26774].INF [Starting pending process, zmc -m 1]
08/22/2006 20:30:17.041477 zmdc[27673].INF ['zmc -m 1' started at 06/08/22 20:30:17]
08/22/2006 20:30:17.043322 zmdc[26774].INF ['zmc -m 1' starting at 06/08/22 20:30:17, pid = 27673]
08/22/2006 20:30:19.302466 zmdc[26774].ERR ['zmc -m 1' exited abnormally, exit status 255]

I have throttled down the IP Camera to 1 fps only because I thought that zoneminder could not keep up.

Any idea/solution/advice is very much appreciated.

Thanks,
OGM
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I think it is timing out while waiting for the image to come back from the camera. I think the default http timeout is 2.5 seconds, you could try increasing that.
Phil
Flash_
Posts: 441
Joined: Wed Jan 11, 2006 12:19 pm

Post by Flash_ »

Try these links instead;
(Assuming you're using passwords instead of default non-pass. If you're not using passwords, remove the "user:passwd@" from both strings)

wget http://user:passwd@camera.ip/GetData.cgi

For mjpeg

http://user:passwd@camera.localdomain/Jpeg/CamImg.jpg

For jpg.

In both cases, ensure your ZM sizes are EXACTLY what you've set on the camera.
ogm
Posts: 10
Joined: Sun Aug 20, 2006 11:40 am

Post by ogm »

Thanks Phil, I did what you have suggested and still I'm getting the same error messages in zmdc.log. I think the issue is nothing to do with zoneminder. I have come to this conclusion because capturing the image/picture from Linux does not seem to work. I have used both firefox and wget in windows and they both worked but not in linux... it is strange. Anyway I will keep on testing.


Thanks Flash_, I did what you have suggested before I came to find out from gadspot uk that the NC1200 has a different API (you may find the link in the thread).

G'day
Flash_
Posts: 441
Joined: Wed Jan 11, 2006 12:19 pm

Post by Flash_ »

Fair enough, I'd assumed it was the same as the others.

Odd that it's not working in Linux. Does Firefox work with other sites? Can you ping the camera?

My thoughts are that it could be a deeper routing/network issue, as Firefox and wget pretty much work identically in windows and linux.
ogm
Posts: 10
Joined: Sun Aug 20, 2006 11:40 am

Post by ogm »

Has anyone had any experiance with a Gadspot GS1200 or VCenter/ JJTechs NC1200?

G'day
mycal
Posts: 65
Joined: Tue Nov 09, 2004 6:39 am

Post by mycal »

See my user contrib thread on the zonemider bug that affects passwords on some video servers... It may help.

mycal

Flash_ wrote:Try these links instead;
(Assuming you're using passwords instead of default non-pass. If you're not using passwords, remove the "user:passwd@" from both strings)

wget http://user:passwd@camera.ip/GetData.cgi

For mjpeg

http://user:passwd@camera.localdomain/Jpeg/CamImg.jpg

For jpg.

In both cases, ensure your ZM sizes are EXACTLY what you've set on the camera.
ogm
Posts: 10
Joined: Sun Aug 20, 2006 11:40 am

Post by ogm »

Hi mycal,

I did what you have suggested and still it did not work. Anyway I have add ed more information about the IP cam.

I have done,

telnet myipcam 80

And it returns,

HTTP/1.0 500 Server Error
Date: Sat, 01 Jan 2000 03:00:07 GMT
Server: WYM/1.0
Connection: close
Content-Type: text/html

<HTML><HEAD><TITLE>500 Server Error</TITLE></HEAD>
<BODY><H1>500 Server Error</H1
>
The server encountered an internal error and could not complete your request.
</
BODY></HTML>

Connection to host lost.


Also, the image's html source code when viewed in Internet Explorer.

<tr>
<td bgcolor="#4d5c7f" height="578" width="727">
<div align="center">
<object id="VCView1" data="data:application/x-oleobject;base64,zfblH5B0KESeeYMOjMVbiwADAADYEwAA2BMAAA==" classid="clsid:1FE5F6CD-7490-4428-9E79-830E8CC55B8B" codebase="./control/VCViewAtl.cab#version=1,0,0,6" height="240" width="320">
</object>
</div>
</td>
</tr>


G'day
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

your not getting jpegs of this camera, it looks like your viewing a webpage
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
ogm
Posts: 10
Joined: Sun Aug 20, 2006 11:40 am

Post by ogm »

My mistake, I should have explain what I intend them to do.

The first one, the telnet stuff, I wanted to know what sort of http version is running on it. I found that is it version 1.0.

The second one, I just wanted to know how the PC software that comes along with the IP Camera renders the image. I found VCViewAtl.cab - I don't know if this is a Java or ActiveX file.

I thought that by posting these information would help learn more about the NC1200 W10 or GS 1200 W10 IP cameras.

Anyway I could capture the MPEG/JPEG using wget and firefox through the location below

http://{USER_ID}:{PASSWORD}@{CAMERA_IP}/cgi-bin/getimage.cgi?motion=1
or
http://{USER_ID}:{PASSWORD}@{CAMERA_IP}/cgi-bin/getimage.cgi?motion=0

in Windows but not in Centos 4, Ubuntu 5, and Fedora Core 5.

My next plan is to install WINE and the IP camera's PC software and let latter capture the image and then let Zoneminder pick it up locally.

G'day
ogm
Posts: 10
Joined: Sun Aug 20, 2006 11:40 am

Post by ogm »

Some more log updates

Executing Wget for windows works fine but not in Linux.

wget http://<hostname>/cgi-bin/getimage.cgi?motion=0 -O pic01.jpg -d

DEBUG output created by Wget 1.10.1 on mingw32.

--14:53:22-- http://<hostname>/cgi-bin/getimage.cgi?motion=0
=> `pic01.jpg'
Resolving <hostname>... seconds 0.00, x.x.x.x
Caching <hostname> => x.x.x.x
Connecting to <hostname>... seconds 0.00, connected.
Created socket 740.
Releasing 0x003f61f8 (new refcount 1).

---request begin---
GET /cgi-bin/getimage.cgi?motion=0 HTTP/1.0
User-Agent: Wget/1.10.1
Accept: */*
Authorization: Basic 62N1c2VyOnNob3cwMTI6
Host: <hostname>
Connection: Keep-Alive

---request end---
HTTP request sent, awaiting response...
---response begin---
HTTP/1.0 200 OK
Date: Sat, 01 Jan 2000 02:07:08 GMT
Server: WYM/1.0
Connection: Keep-Alive
Keep-Alive: timeout=1, max=108000
Content-Type: application/x-javascript
Content-Length: 22246
Last-Modified: Sat, 01 Jan 2000 02:07:08 GMT

---response end---
200 OK
Registered socket 740 for persistent reuse.
Length: 22,246 (22K) [application/x-javascript]

100%[====================================>] 22,246 11.48K/s

14:53:24 (11.46 KB/s) - `pic01.jpg' saved [22246/22246]

You will notice that Content-Type is application/x-javascript and I don't know if it is supported by ZoneMinder.



In linux

wget http://<hostname>/cgi-bin/getimage.cgi?motion=0 -O pic01.jpg -d

DEBUG output created by Wget 1.10.2 (Red Hat modified) on linux-gnu.

--15:14:12-- http://<hostname>/cgi-bin/getimage.cgi?motion=0
=> `pic01.jpg'
Resolving ngm.id.au... x.x.x.x
Caching ngm.id.au => x.x.x.x
Connecting to ngm.id.au|x.x.x.x ... connected.
Created socket 4.
Releasing 0x0a010880 (new refcount 1).

---request begin---
GET /cgi-bin/getimage.cgi?motion=0 HTTP/1.0
User-Agent: Wget/1.10.2 (Red Hat modified)
Accept: */*
Authorization: Basic 62N1c2VyOnNob3cwMTI6
Host: <hostname>
Connection: Keep-Alive

---request end---
HTTP request sent, awaiting response... <<<< Control C to stop because it keeps on going >>>>
Flash_
Posts: 441
Joined: Wed Jan 11, 2006 12:19 pm

Post by Flash_ »

That's really odd.

Suggestions:

Something's wrong with the networking on the linux box. Does it work ok in all other regards? (wgetting other various stuff from your intranet and the internet)

Wget's cache is screwy. I saw this recently where curl would get to a domain and wget would not. Give curl a try.

Talk to Gadspot UK. I had a technically competent reply when I asked them a question by email once, got to be worth a go.
Gadspot UK

Tech Support

Post by Gadspot UK »

Hi,

If you pass me some details in an attachment (Text file) as basic as possible, I can contact the designers (China!) and see what we get back.

Sorry that I do not have a dircet answer.

Also, if you log this issue on our support system, we can track it to conclusion.

www.gadget-spot.co.uk/support
Post Reply