Panasonic WV-Nxxx Series

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.
Post Reply
memone
Posts: 5
Joined: Fri Nov 17, 2006 4:13 pm

Panasonic WV-Nxxx Series

Post by memone »

Hi everybody, I've looked across the board but I can't find a way to get a couple of Panasonic cam (to be precise a WV-NS320 and a WV-NW470) working with ZM

I'm running ZM 1.22.2 on a gentoo system and with my configuration zm is fully functional with:

Local analog cam on a BT878 board
Axis 214PTZ (network cam)
Panasonic BB-HCM381, BB-HCM331 and BL-C10 (same cgi protocol, all IP cam)

What I've tried:
- wget is working

Code: Select all

wget --save-headers -S "http://user:pass@IP/cgi-bin/push?CH=1&UID=661&MODE=START&FRAMERATE=10"
with it I receive a "stream" like:

Code: Select all

HTTP/1.0 200
Content-type: multipart/x-mixed-replace;boundary =--myboundary

--myboundary
Content-type: image/jpeg
Content-length: 6606
..
..
..
--myboundary
Content-type: image/jpeg
Content-length: 6581
..
..
- switching the ZM_NETCAM_REGEXPS on and off
- switching the ZM_HTTP_VERSION on and off
- increasing the ZM_HTTP_TIMEOUT parameter up to 5 secs (with wget the cams are quite responsive)

In every case running zmc results in a log like

Code: Select all

11/17/06 17:36:16.028264 zmc_m18[9833].INF-zm_debug.c/305 [New Debug Level = 9, New Debug Log = /tmp/zmlog]
11/17/06 17:36:16.028829 zmc_m18[9833].DB1-zm_monitor.cpp/1871 [Got 1 monitors]
11/17/06 17:36:16.048511 zmc_m18[9833].DB2-zm_remote_camera.cpp/124 [Request: GET /cgi-bin/push?CH=1&UID=166&MODE=START&FRAMERATE=2 HTTP/1.0
User-Agent: ZoneMinder/1.22.2
Host: xxxxxxxxxxx
Connection: Keep-Alive
Authorization: Basic xxxxxxxxxxxxxxxxxxxxx

]
11/17/06 17:36:16.049131 zmc_m18[9833].DB1-zm_monitor.cpp/235 [monitor purpose=1]
11/17/06 17:36:16.049150 zmc_m18[9833].DB1-zm_monitor.cpp/242 [shm.size=12365764]
.
.
.
.
.
11/17/06 17:36:16.350076 zmc_m18[9833].DB1-zm_monitor.cpp/2008 [Loaded monitor 18(Pana), 1 zones]
11/17/06 17:36:16.350093 zmc_m18[9833].INF-zmc.cpp/183 [Starting Capture]
11/17/06 17:36:16.362924 zmc_m18[9833].DB3-zm_remote_camera.cpp/159 [Connected to host, socket = 6]
11/17/06 17:36:16.362963 zmc_m18[9833].DB3-zm_remote_camera.cpp/180 [Request sent GET /cgi-bin/push?CH=1&UID=166&MODE=START&FRAMERATE=2 HTTP/1.0
User-Agent: ZoneMinder/1.22.2
Host: xxxxxxxxxxxxxx
Connection: Keep-Alive
Authorization: Basic xxxxxxxxxxxxxxxxxxx

]
11/17/06 17:36:21.362896 zmc_m18[9833].ERR-zm_remote_camera.cpp/195 [Select timed out]

Any suggestion? I'm running out of ideas.. I hope I've provided enough information..

Thanks in advance
Vincenzo

ps (for jameswilson): I've seen a thread with similar problems you had with an IQEye cam (or something like that): did you succedeed to make it work?
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

This may be an issue with ZM not always sending the correct line endings. I have fixed this in 1.22.3, which will be out Thursday at the latest. This thread, http://www.zoneminder.com/forums/viewto ... =http+line, explains further and describes a fix.
Phil
memone
Posts: 5
Joined: Fri Nov 17, 2006 4:13 pm

Post by memone »

This may be an issue with ZM not always sending the correct line endings. I have fixed this in 1.22.3, which will be out Thursday at the latest.
Thanks a lot, yesterday I got to the same fix (looking at wget's requests that were working) and now I read your reply just before posting it! :)

Meanwhile I discovered another issue with these Panasonic cams: when in multipart-jpeg mode, they send an header like this (i used * for relevant " " chars):

Code: Select all

HTTP/1.0 200 <-- "OK" missing
Content-Type:*multipart/x-mixed-replace;boundary*=--myboundary

--myboundary
Content-Type:*image/jpeg
Content-Length:*12345
JPEG DATA
ZM doesn't like this kind of header:
when ZM_NETCAM_REGEXPS is disabled I got the error "No content boundary found in header", I think because of the " " char between boundary and "=".

when using the ZM_NETCAM_REGEXPS mode it complained about the missing HTTP status in the header. To get around this issue, I modified the regexp for retrieving the status from

Code: Select all

status_expr = new RegExpr( "^HTTP/(1\\.[01]) +([0-9]+) +(.+?)\r?\n",PCRE_CASELESS );
to

Code: Select all

status_expr = new RegExpr( "^HTTP/(1\\.[01]) +([0-9]+) *(.*?)\r?\n",PCRE_CASELESS )
but can't find a way to make the regexp

Code: Select all

snprintf( subheader_pattern, sizeof(subheader_pattern),"^((?:\r?\n){0,2}?(?:--)?%s\r?\n.+?\r?\n\r?\n)",content_boundary);
match the rest of the header, I think because of a missing blank line between the Content-Length line and JPEG data..

I will keep on trying to make zm working with these cams, but if you have an advice you are really welcome! :)

Vincenzo
henke
Posts: 60
Joined: Thu Nov 10, 2005 8:16 am

Post by henke »

Hi,

Did you get them working?
hrabe
Posts: 47
Joined: Tue Apr 12, 2005 12:01 am

Post by hrabe »

Any Idea for this Panasonic cams works?
Thanks
Post Reply