Motion - Feature Request 2014x 09x 08x 153335

Feature Request: support for "digest" authentication method?

Description

Hi,

I'm trying to use motion with FI8910W camera.

It looks like this camera used to be supported in the past (http://www.lavrsen.dk/foswiki/bin/view/Motion/WorkingDevices).

However a new firmware has disabled the "Basic authentication" for this camera (http://www.bensoftware.com/forum/discussion/501/foscam-firmware-update/p1).

I believe this is the reason I keep getting 'HTTP/1.1 401 Unauthorized' error (see below).

Still motion gets connected to the camera, but reading the data as a jpeg fails:
[1] [INF] [NET] [Sep 08 11:19:01] netcam_read_first_header: Received first header ('HTTP/1.1 401 Unauthorized')
[1] [INF] [NET] [Sep 08 11:19:01] netcam_read_first_header: HTTP Result code 401
[1] [NTC] [NET] [Sep 08 11:19:01] netcam_read_first_header: Removed netcam Keep-Alive flagdue to apparent closed HTTP connection.
[1] [NTC] [NET] [Sep 08 11:19:01] netcam_setup_html: connected, going on to read image.
[1] [DBG] [NET] [Sep 08 11:19:01] netcam_check_buffsize: expanding buffer from [0/0] to [0/4096] bytes.
[1] [NTC] [NET] [Sep 08 11:19:01] netcam_read_html_jpeg: disconnecting netcam since keep-alive not set.
[1] [NTC] [NET] [Sep 08 11:19:01] netcam_read_html_jpeg: leaving netcam connected.
[1] [DBG] [NET] [Sep 08 11:19:01] netcam_output_message: Not a JPEG file: starts with 0x53 0x65
[1] [INF] [NET] [Sep 08 11:19:01] netcam_error_exit: netcam->jpeg_error 1
[1] [CRT] [NET] [Sep 08 11:19:01] netcam_start: libjpeg decompression failure on first frame - giving up!
[1] [WRN] [ALL] [Sep 08 11:19:01] motion_init: Could not fetch initial image from camera Motion continues using width and height from config file(s)

By looking at the motion docs it seems the digest is only supported to connect to the stream_port, but not to the camera.

Is this correct?

If yes, are there any plans to support the 'digest' authentication method?

If no, how can I enable the digest method?

Here are my settings:

   **************************
      Configure status
      motion trunkREV561
   **************************

OS             :     Linux
pthread support:     Yes
jpeg support:        Yes
V4L support:         Yes
V4L2 support:        Yes
SDL support:         Yes
FFmpeg support:      Yes
SQLite3 support:     Yes
MYSQL support:       No
PostgreSQL support:  No
//...

Here is how I can connect to the camera using curl:

$> curl --digest -u user:pswd http://IP:PORT/video.cgi > stream.avi 
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 140 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 1107k 0 0 294k 0 --:--:-- 0:00:03 --:--:-- 298k^C

This fails:

$> curl -u user:pswd http://IP:PORT/video.cgi
 
<HTML><HEAD><TITLE>401 Unauthorized</TITLE></HEAD> 
<BODY BGCOLOR="#cc9999"><H4>401 Unauthorized</H4> 
Authorization required. 
</BODY></HTML>

Best regards,

Petru

-- PetruMarginean - 08 Sep 2014

Follow up

Comments

-- PetruMarginean - 08 Sep 2014

Topic revision: r2 - 08 Sep 2014, PetruMarginean
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.