Onvif Device Reference Design/Getting Started/Evaluating the Project: Difference between revisions

From RidgeRun Developer Wiki
No edit summary
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
{{Onvif_Device_Reference_Design/Head|previous=Getting Started/Environment Setup|next=Getting Started/Purchasing a License|keywords=}}
{{Onvif_Device_Reference_Design/Head|previous=Getting Started/Environment Setup|next=Getting Started/Supported REST requests|keywords=}}
</noinclude>
</noinclude>


Line 110: Line 110:


<noinclude>
<noinclude>
{{Onvif_Device_Reference_Design/Foot|Getting Started/Environment Setup|Getting Started/Purchasing a License}}
{{Onvif_Device_Reference_Design/Foot|Getting Started/Environment Setup|Getting Started/Supported REST requests}}
</noinclude>
</noinclude>

Revision as of 21:23, 24 June 2022





Previous: Getting Started/Environment Setup Index Next: Getting Started/Supported REST requests





Configure the openssl keys and onvif configuration path

To configure the openssl keys, to allow the project 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 in with this project, these are the oat-openssl 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 where the ONVIF interface is going to run,

the REST server runs in localhost.

mode 0 for no REST server and 1 for REST server Enables or disables the

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/Supported REST requests