ONVIF Device Reference Design - Evaluating the Project

From RidgeRun Developer Wiki





Previous: Getting Started/Environment Setup Index Next: Getting Started/REST API





Introduction

RidgeRun provides an evaluation version of the project, limited to 10 min of execution of web page and ONVIF device support. This evaluation includes all the dependencies in their evaluation version. These dependencies are libonvif and rtsp-sink.

Configure the openssl keys and ONVIF configuration path

To configure the secure connection with the webpage, and allow the project in the mode with webpage support to run, you should create the following directory:

mkidir /usr/share/openssl/

Now you need to copy the key files that were given to you with this project, these are example keys. You can create new keys if you want to.

#give access rights to the directory
sudo chmod -R +777 /usr/share/openssl/
cp cert.crt /usr/share/openssl/
cp key.pem /usr/share/openssl/
cp dhparams.pem /usr/share/openssl/

If you are not running the server as root, you need to give access rights to the directory where the configurations are created:

#in case the directory doesn't exists
mkdir /usr/share/onvif_settings/
sudo chmod +777 -R /usr/share/onvif_settings/

How to run

Arguments

Argument Values What it does
interface Present Network interfaces This indicates in which network interface the project is going to run,

the REST server runs in localhost in the device.

mode 0 for webpage support and 1 for webpage support Enables or disables the webpage support

Now that the project has been installed, you can run this command to start the ONVIF device

onvif-server-reference-design-0.1.0 --interface wlo1 --mode 1

This command runs the ONVIF server on the interface given, the mode 1 is the one that enables the REST server that can communicate with the webpage. This should be enough to make the server run.

Common Issues

Missing certificates

If the log below appears when running the web server page, that means that certificates are not stored in the correct location.

Creating stream...
Pipeline created successfully!
Opening in BLOCKING MODE
Opening in BLOCKING MODE 
Pipeline played successfully!
Encoder configuration already exist
Encoder configuration already exist
Source configuration already exist
Profile already exist
Finished setting base server
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
Configuration already exist
Configuration already exist
The auto-discovery add-on is enabled.
Discovery:: send Hello
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 5 
   Output Stream W = 1280 H = 720 
   seconds to Run    = 0 
   Frame Rate = 120.000005 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
H264: Profile = 100, Level = 0 
(Argus) Error InvalidState: Argus client is exiting with 1 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 357)
WARNING Argus: 6 client objects still exist during shutdown:
	547416508752 (0x7f58001930)
	547421634176 (0x7f580016c0)
	547421634528 (0x7f58001a30)
	547421640352 (0x7f58001b40)
	547421641648 (0x7f580035c0)
	547421649736 (0x7f580036d8)

To solve it, store the .pem and .crt certificate files in the following path: usr/share/openssl.



Previous: Getting Started/Environment Setup Index Next: Getting Started/REST API