Dev Topics
posted: November 20, 2020 

Expanding Anjay-Zephyr integration on a Nordic development board

We expand our Anjay integration using Zephyr OS on nRF9160 Development Kit – the board popular among IoT devices and desired by our clients. It offers two push buttons and switches, four LEDs and a GPS module with both onboard and external antennas. Apart from that, there is also a nanoSIM card slot to let users connect to the LTE network.

First of all, integrating anjay on the next board made us restructure the project directory tree. Separating and moving prj.conf and CMakeLists.txt files to projects/* subdirectories were essential to make the app compatible with two different boards. The CMakeLists.txt file in the root directory is included in CMakeLists.txt files mentioned before and configures the build process depending on the build target (BOARD variable).

During development, we made use of nRF Connect SDK provided by Nordic Semiconductor. It contains Zephyr RTOS and libraries recommended for various devices, including nRF9160.

One of the problems we faced was the entropy driver. CC310 library has the entropy_get_entropy function, which requires an input buffer to be 144 bytes long – it dictates more complex implementation of the entropy_callback function used in the anjay_configuration_t object.

Another challenge was clock synchronization. Using the lte_lc library forced us to add new configuration entries (e.g. CONFIG_BSD_LIBRARY=y). After that modification, the CONFIG_POSIX_API=y entry generated an error so it had to be removed. Because of that, clock_settime used in set_system_time on the STM platform couldn't be reutilized on the nRF9160 platform. This issue led us to the date_time library. The source of the current timestamp is the external NTP server defined in default_config.h. This timestamp is then obtained in the avs_time_real_now function present in compat/time_compat.c using date_time_now. The library updates timestamp periodically by means of internal methods – the update interval is set with the CONFIG_DATE_TIME_UPDATE_INTERVAL_SECONDS option.

The GitHub repository has been updated with described integration. Developers can track changes listed in the CHANGELOG.md file.

Michał Oleksy
Software Engineer

Recommended posts

back icon
Hello! We’re always open.
Let’s start a conversation.

Marketing Consent Opt In Date:
Marketing Consent Opt In Reason:
Marketing Consent Opt Out Date:
Marketing Consent Opt Out Reason:

Thank you!

Your message has been sent. Our team will contact you as soon as possible.


AVSystem sp. j., Radzikowskiego 47D, Cracow is the controller of your personal data. We will process your personal data to contact you in response to your message. If you agree to a specific communication channel, we can also contact you in the future for marketing purposes. You can withdraw your consent at any time or object to data processing. You have the right to r access your personal data, the right to rectification data, the right to erasure data, the right to demand the restriction of the processing of your personal data and the right to object to the processing of your data. More information about processing of your personal data is available here.

Message Btn

Hello!
Contact us!

This website is using cookies

We use cookies for statistical and marketing purposes and to improve the quality of our services. The information stored in cookies usually allow the identification of a specific device or user’s browser, so they may contain personal data. By continuing to use this website with setting the web browser in a way which alows the use of cookies by the website means your’s consent to the use of cookies. You can change your web browser settings at any time.

More information on the processing of personal data and cookies you can find in our Privacy and cookies policy.

Accept