AVSystem / Anjay

C implementation of the client-side OMA LwM2M protocol
Other
188 stars 68 forks source link

Alternate clients #16

Closed yogapreethi closed 5 years ago

yogapreethi commented 5 years ago

Is there any other client to run instead of demo-client?

dextero commented 5 years ago

If by "any other client" you mean specifically Anjay-based clients, you may also check examples described in tutorials. Their sources can be found under examples/ subdirectory in the project. The easiest way to compile them is to call CMake for the Anjay library and then run make examples.

Note that these examples are extremely simplified, unlike the demo client with is supposed to present all the functionality implemented in the library.

yogapreethi commented 5 years ago

vagrant@vagrant:~/Anjay/examples/tutorial/AT1$ cmake . CMake Error at /home/vagrant/Anjay/avs_commons/git/avs_commons-config.cmake:28 (include): include could not find load file:

/home/vagrant/Anjay/avs_commons/git/avs_commons-targets.cmake

Call Stack (most recent call first): /home/vagrant/Anjay/output/cmake/anjay-config.cmake:19 (find_package) CMakeLists.txt:4 (find_package)

CMake Error at /home/vagrant/Anjay/output/cmake/anjay-config.cmake:21 (include): include could not find load file:

/home/vagrant/Anjay/output/cmake/anjay-targets.cmake

Call Stack (most recent call first): CMakeLists.txt:4 (find_package)

-- Configuring incomplete, errors occurred! See also "/home/vagrant/Anjay/examples/tutorial/AT1/CMakeFiles/CMakeOutput.log".

We could not find the below files in the mentioned path as well as any of the subdirectory inside Anjay folder /home/vagrant/Anjay/avs_commons/git/avs_commons-targets.cmake /home/vagrant/Anjay/output/cmake/anjay-targets.cmake

Please let me how to go about this cmake compilation without error.

dextero commented 5 years ago

The error is displayed because Anjay library is not installed in the system.

Compile and install the Anjay library first:

# run in Anjay project directory
cmake .
sudo make install

After that, CMake will be able to find avs_commons-targets.cmake and anjay-targets.cmake when trying to compile examples.

Alternatively, if you do not want to install Anjay in the system, you may also compile all examples alongside Anjay by running

# run in Anjay project directory
cmake .
make examples
yogapreethi commented 5 years ago

Thanks, I have complied all examples. But could not find help to how to use the example client. Could you please provide any help link?

krwc commented 5 years ago

Actually all examples were made to illustrate different implementation techniques described in the tutorial for standard data model entities.

They are not meant to be treated as separate and complete LwM2M Clients.