Dafang-Hacks / Main

138 stars 63 forks source link

Onvif Service #41

Closed Sian-Lee-SA closed 4 years ago

Sian-Lee-SA commented 4 years ago

Onvif Service added and cleaned up. This compiled locally and should be ready for dist

nik0 commented 4 years ago

Now missing gsoap :-)

Sian-Lee-SA commented 4 years ago

gsoap is in there under packages

Sian-Lee-SA commented 4 years ago

It's probably not unzipping because it see's the generated files, if so then just manually extract gsoap into the libs path. I can do the check in the makefile to be independent from other soap checks if this is the case.

nik0 commented 4 years ago

Yeah ! It is compiling. I will test it tonight How did you test that ?

Sian-Lee-SA commented 4 years ago

You can look through the compile_release_upload.sh or compile_debug.sh to find out where the files should be place or you can simply run that script like compile_debug.sh {ip} {ftp_username} {ftp_password} for it to place the files for you.

If using release, then it can be started through the web-ui under onvif-server. The debug version would need to be started manually through ssh but will output more relevant information and provide .log files to inspect the received / sent onvif calls

nik0 commented 4 years ago

Can you redo a PR with the binaries, I won't have time to do it. I didn't manage to test the binaries. They are compiling ... or maybe @jmtatsch you can do it ?

jmtatsch commented 4 years ago

I will do, will take a couple of days though.

jmtatsch commented 4 years ago

Any recipes for crosscompiling libboost_regex-mt-d-m32.so.1.72.0 ?

Sian-Lee-SA commented 4 years ago

To be honest, I can't really remember the process to compile boost.regex BUT i do recall just following following the compiling guide at https://www.boost.org/doc/libs/1_72_0/more/getting_started/unix-variants.html.

Lastly I also recall changing the project-config.jam file to match the toolset...

# Boost.Build Configuration
# Automatically generated by bootstrap.sh

import option ;
import feature ;

# Compiler configuration. This definition will be used unless
# you already have defined some toolsets in your user-config.jam
# file.
if ! gcc in [ feature.values <toolset> ]
{
    using gcc : mips : mips-linux-uclibc-gnu-g++ ; 
}

project : default-build <toolset>gcc ;

# List of --with-<library> and --without-<library>
# options. If left empty, all libraries will be built.
# Options specified on the command line completely
# override this variable.
libraries =  --with-regex ;

# These settings are equivalent to corresponding command-line
# options.
option.set prefix : /usr/local ;
option.set exec-prefix : /usr/local ;
option.set libdir : /usr/local/lib ;
option.set includedir : /usr/local/include ;

# Stop on first error
option.set keep-going : false ;

notice the using gcc : mips : mips-linux-uclibc-gnu-g++ ; and libraries = --with-regex ;. This ensures using the right toolchain and only compiling the regex lib.

After changing that, then b2 install should work and generate the binaries...

With that said, I did remove all need for boost.regex and shouldn't be needed anymore.

Sian-Lee-SA commented 4 years ago

b2 --build-dir=/tmp/build-boost toolset=gcc-mips stage is the command to compile from memory and you'll need the compiler bin in your PATH

jmtatsch commented 4 years ago

Thanks, I tried without the lib then. Executable runs and opens up port 8080, can't get my "IP Camera Viewer 2" or "NX-V" app to connect though. Can you have a look at the current fw and see whether you can connect?