{"id":13343766,"url":"https://github.com/AVSystem/Anjay-zephyr-client","last_synced_at":"2025-03-12T06:30:29.018Z","repository":{"id":45990521,"uuid":"277484108","full_name":"AVSystem/Anjay-zephyr-client","owner":"AVSystem","description":"Anjay Zephyr LwM2M client.","archived":false,"fork":false,"pushed_at":"2025-02-28T13:55:36.000Z","size":8682,"stargazers_count":19,"open_issues_count":3,"forks_count":7,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-08T12:42:29.622Z","etag":null,"topics":["embedded","iot","lwm2m","lwm2m-client","zephyr","zephyr-rtos"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AVSystem.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-06T08:22:12.000Z","updated_at":"2025-02-28T13:55:27.000Z","dependencies_parsed_at":"2024-10-24T07:03:10.928Z","dependency_job_id":"d6560cf4-5499-4f4e-89a7-d6815aba3e50","html_url":"https://github.com/AVSystem/Anjay-zephyr-client","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AVSystem%2FAnjay-zephyr-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AVSystem%2FAnjay-zephyr-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AVSystem%2FAnjay-zephyr-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AVSystem%2FAnjay-zephyr-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AVSystem","download_url":"https://codeload.github.com/AVSystem/Anjay-zephyr-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243171368,"owners_count":20247876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embedded","iot","lwm2m","lwm2m-client","zephyr","zephyr-rtos"],"created_at":"2024-07-29T19:32:00.725Z","updated_at":"2025-03-12T06:30:29.007Z","avatar_url":"https://github.com/AVSystem.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Anjay-zephyr-client [\u003cimg align=\"right\" height=\"50px\" src=\"https://avsystem.github.io/Anjay-doc/_images/avsystem_logo.png\"\u003e](http://www.avsystem.com/)\n\n## Overview\n\nThis repository contains LwM2M Client samples based on open-source\n[Anjay Zephyr Module](https://github.com/AVSystem/Anjay-zephyr) and\n[Zephyr OS](https://github.com/zephyrproject-rtos/zephyr).\n\nMore information and step-by-step instruction can be found in [the Anjay integration IoT Developer Zone](https://iotdevzone.avsystem.com/docs/Anjay_integrations/Getting_started/).\n\nThe following examples are present:\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eDirectory\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003edemo/\u003c/td\u003e\n      \u003ctd\u003e\n        Showcase example implementing all features and sensors available on board. Supports experimental \u003cstrong\u003efactory provisioning\u003c/strong\u003e feature of Anjay 3. Supported boards:\u003cbr\u003e\n        \u003ca href=\"https://www.st.com/en/evaluation-tools/b-l475e-iot01a.html\"\u003eB-L475E-IOT01A Discovery kit\u003c/a\u003e\u003cbr\u003e\n        \u003ca href=\"https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF9160-DK\"\u003enRF9160 Development kit\u003c/a\u003e\u003cbr\u003e\n        \u003ca href=\"https://www.nordicsemi.com/Products/Development-hardware/Nordic-Thingy-91\"\u003eNordic Thingy:91 Prototyping kit\u003c/a\u003e\u003cbr\u003e\n        \u003ca href=\"https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF9151-DK\"\u003enRF9151 Development kit\u003c/a\u003e\u003cbr\u003e\n        \u003ca href=\"https://www.espressif.com/en/products/devkits/esp32-devkitc\"\u003eESP32-DevKitC\u003c/a\u003e\u003cbr\u003e\n        \u003ca href=\"https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dk\"\u003enRF52840 Development kit\u003c/a\u003e\u003cbr\u003e\n        \u003ca href=\"https://www.nordicsemi.com/Products/Development-hardware/nRF7002-DK\"\u003enRF7002 Development kit\u003c/a\u003e\u003cbr\u003e\n        \u003ca href=\"https://store.arduino.cc/products/arduino-nano-33-ble-sense\"\u003eArduino Nano 33 BLE Sense Lite\u003c/a\u003e\u003cbr\u003e\n        \u003ca href=\"https://devedge.t-mobile.com/solutions/iotdevkit\"\u003eDevEdge\u003c/a\u003e\u003cbr\u003e\n        any other board of your choice (by adding appropriate \u003ccode\u003e*.conf\u003c/code\u003e/\u003ccode\u003e*.overlay\u003c/code\u003e files). FOTA support for selected boards.\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eminimal/\u003c/td\u003e\n      \u003ctd\u003e\n        Minimalistic client samples which may serve as a base for specific application. Supported boards/targets:\u003cbr\u003e\n        \u003ca href=\"https://docs.zephyrproject.org/latest/boards/x86/qemu_x86/doc/index.html\"\u003eqemu_x86\u003c/a\u003e\u003cbr\u003e\n        \u003ca href=\"https://www.st.com/en/evaluation-tools/b-l475e-iot01a.html\"\u003eB-L475E-IOT01A Discovery kit\u003c/a\u003e\u003cbr\u003e\n        \u003ca href=\"https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF9160-DK\"\u003enRF9160 Development kit\u003c/a\u003e\u003cbr\u003e\n        \u003ca href=\"https://www.nordicsemi.com/Products/Development-hardware/Nordic-Thingy-91\"\u003eNordic Thingy:91 Prototyping kit\u003c/a\u003e\u003cbr\u003e\n        \u003ca href=\"https://www.espressif.com/en/products/devkits/esp32-devkitc\"\u003eESP32-DevKitC\u003c/a\u003e\u003cbr\u003e\n        \u003ca href=\"https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dk\"\u003enRF52840 Development kit\u003c/a\u003e\u003cbr\u003e\n        \u003ca href=\"https://store.arduino.cc/products/arduino-nano-33-ble-sense\"\u003eArduino Nano 33 BLE Sense Lite\u003c/a\u003e\u003cbr\u003e\n        \u003ca href=\"https://devedge.t-mobile.com/solutions/iotdevkit\"\u003eDevEdge\u003c/a\u003e\u003cbr\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eei_demo/\u003c/td\u003e\n      \u003ctd\u003e\n        An example containing motion recognition model, built with Edge Impulse. Supported boards/targets:\u003cbr\u003e\n        \u003ca href=\"https://www.nordicsemi.com/Products/Development-hardware/Nordic-Thingy-91\"\u003eNordic Thingy:91 Prototyping kit\u003c/a\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003ebubblemaker/\u003c/td\u003e\n      \u003ctd\u003e\n        An interactive example containing integration of water meters and different sensors with LwM2M protocol.  Supported boards:\u003cbr\u003e\n        \u003ca href=\"https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF9160-DK\"\u003enRF9160 Development kit\u003c/a\u003e\u003cbr\u003e\n        \u003ca href=\"https://www.nordicsemi.com/Products/Development-hardware/nRF7002-DK\"\u003enRF7002 Development kit\u003c/a\u003e\u003cbr\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## Getting started\n\nFirst of all, get Zephyr, SDK and other dependencies, as described in Zephyr's\n[Getting Started Guide](https://docs.zephyrproject.org/latest/getting_started/index.html)\n(first 4 steps).\n\nAfter navigating to Zephyr workspace (`~/zephyrproject` is default after following Getting Started Guide), clone Anjay Zephyr client repository.\n```\ngit clone https://github.com/AVSystem/Anjay-zephyr-client\n```\n\nIf you want to compile for nRF91 targets, additional GNU Arm Embedded Toolchain is necessary, to install it follow\n[installing the toolchain for NCS guide](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_installing.html#install-the-toolchain). Also for flashing [nRF Command Line Tools](https://www.nordicsemi.com/Products/Development-tools/nrf-command-line-tools) have to be installed.\n\nFor further instructions, check `README.md` in the folder with the example in which you are interested.\n\n### Setting up Visual Studio Code (for nRF91 targets)\n\nThe nRF Connect SDK has a set of plugins for Visual Studio Code (VSC). They can\nbe used to simplify the build process for the nRF boards. To do that we need to\nset up VSC first.\n\n\u003e **__NOTE:__**\n\u003e On a Linux system, first make sure that `GNUARMEMB_TOOLCHAIN_PATH` variable is\n\u003e set in the scope that Visual Studio Code is run.\n\u003e\n\u003e You can set this permanently by adding a line similar to the following\n\u003e (adjusted to your toolchain installation directory) to your `~/.profile` file\n\u003e (or `~/.bash_profile` or `~/.zprofile` etc., depending on your shell and\n\u003e preferences):\n\u003e\n\u003e ```\n\u003e export GNUARMEMB_TOOLCHAIN_PATH=\"$HOME/gcc-arm-none-eabi-10.3-2021.10\"\n\u003e ```\n\nOpen VSC and, on the Extensions tab, install the \"nRF Connect for VS Code\"\nplugin or the \"nRF Connect Extension Pack\" (which includes the former). After\nthe installation, the \"Welcome to nRF Connect\" window should appear. In case it\ndoesn't, you can open it from the nRF Connect tab -\u003e Welcome -\u003e Open Welcome\npage. Set nRF Connect SDK to the folder where `west` initialized Zephyr\n(`~/zephyrproject` is the default suggested in the Getting Started Guide). The\n\"nRF Connect Toolchain\" setting should point to the gnuarmemb toolchain\ninstallation folder, or in case of Linux, it should be set as \"PATH\" (it will\nuse the setting from `GNUARMEMB_TOOLCHAIN_PATH` to find it).\n\nIf the environment was not set up earlier, go to the Source Control tab, open\nthe Terminal tab (\u003ccode\u003eCtrl+Shift+\u0026grave;\u003c/code\u003e). In case it opens in a wrong\ndirectory, navigate to where you have initialized Zephyr and its dependencies\n(e.g. `~/zephyrproject`). Then run:\n\n```\nwest config manifest.path Anjay-zephyr-client/demo\nwest config manifest.file west-nrf.yml\nwest update\n```\n\n\u003e **__NOTE:__**\n\u003e If building a project other than `demo`, please adjust the path in the above\n\u003e commands accordingly.\n\n\u003e **__NOTE:__**\n\u003e West manifest folder can be changed in Source Control by clicking \"Select\n\u003e manifest\" on the root of the Zephyr repository and choosing a different\n\u003e folder. If the manifest is different a \"west update\" icon will show up next to\n\u003e the manifest file name. Clicking it will update the repository. If the\n\u003e manifest you want to change to has a different name (and not only a different\n\u003e path) then it must be changed directly using the `west config` command in the\n\u003e terminal.\n\u003e\n\u003e This is why using the command line is necessary to choose the manifest for\n\u003e this project - the nRF-specific manifests are called `west-nrf.yml`, which is\n\u003e not supported by the plugin's GUI at the moment.\n\nNow we can add the application to VSC workspace. Click on nRF Connect tab -\u003e\nApplication -\u003e Add Application. Open the folder containing the `prj.conf` file\n(e.g. `Anjay-zephyr-client/demo`). In the Application section the demo\napplication should show up. Click on \"No build configuration\" to add a\nconfiguration for the desired target, e.g. `nrf9160dk/nrf9160/ns` (you can have\nmultiple configurations for different targets). Choose your target and click\n\"Build Configuration\" in order to build the application. Next builds can be\nstarted by choosing Actions -\u003e Build.\n\n### Enabling GPS implementation (for nRF91 targets)\n\nAnjay-zephyr-client has the support for GPS implementation for nRF91 targets\nwhich can be enabled using `Kconfig` options. Some of the available options are:\n- `CONFIG_ANJAY_ZEPHYR_GPS` - enables/disables support for GPS\n- `CONFIG_ANJAY_ZEPHYR_GPS_NRF_A_GPS` - enables/disables A-GPS using Nordic\nLocation Services over LwM2M\n- `CONFIG_ANJAY_ZEPHYR_GPS_NRF_PRIO_MODE_PERMITTED` - enables/disables support\nfor allowing temporary activation of the GPS priority mode\n  - if set, Anjay Zephyr will temporarily activate the GPS priority over LTE\n  idle mode **which shuts down LTE completely** and attempts to acquire the fix\n  in case GPS fix cannot be produced\n  - by default, this option is disabled and can be enabled using `Kconfig` or\n  shell commands (`anjay config set gps_prio_mode_permitted`)\n- `CONFIG_ANJAY_ZEPHYR_GPS_NRF_PRIO_MODE_COOLDOWN` - determines (in seconds) how\nmuch time must pass after a failed try to produce a GPS fix to enable GPS\npriority mode again\n\n## Connecting to the LwM2M Server\n\nTo connect to [Coiote IoT Device\nManagement](https://www.avsystem.com/products/coiote-iot-device-management-platform/)\nLwM2M Server, please register at https://eu.iot.avsystem.cloud/. Then have\na look at the example configuration to configure security credentials and other\nnecessary settings (like Wi-Fi SSID etc.).\n\n[Guide showing basic usage of Coiote DM](https://iotdevzone.avsystem.com/docs/IoT_quick_start/Device_onboarding/)\nis available on IoT Developer Zone.\n\n\u003e **__NOTE:__**\n\u003e You may use any LwM2M Server compliant with LwM2M 1.0 TS. The server URI can\n\u003e be changed in the example configuration options.\n\n## Updating es-WiFi module firmware on B-L475E-IOT01A Discovery kit to make FOTA work\n\nThere are known issues with the older es-WiFi firmware, particularly in handling\nmultiple socket connections, which manifest during pull FOTA operations. To get\nrid of these problems, a WiFi module firmware update is required.\n\nPlease download `Inventek ISM 43362 Wi-Fi module firmware update` package from\n[ST website](https://www.st.com/en/evaluation-tools/b-l475e-iot01a.html#tools-software).\nIf you are using Windows you can simple follow instructions from `readme.txt`.\nFor Linux, please install the appropriate version of\n[STM32CubeProgrammer](https://www.st.com/en/development-tools/stm32cubeprog.html).\nThen follow steps 2 through 5 in `readme.txt`. Next, go to the\n`en.inventek_fw_updater.2.0/bin` directory, but do not run the `update_Wifi.bat`\nscript. Instead, run (please update the path to `STM32_Programmer_CLI` and\n`/dev/ttyACM0` device port if necessary):\n\n```bash\n~/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI -c port=SWD -e all -d ./InventekBootloaderPassthrough.bin 0x08000000 -v -hardrst\nsleep 10\n~/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI -c port=/dev/ttyACM0 br=115200 p=EVEN db=8 sb=1 fc=OFF -e all\n~/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI -c port=/dev/ttyACM0 br=115200 p=even db=8 sb=1 fc=OFF -d ./ISM43362_M3G_L44_SPI_C3.5.2.7.STM.bin 0x08000000 -v\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAVSystem%2FAnjay-zephyr-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAVSystem%2FAnjay-zephyr-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAVSystem%2FAnjay-zephyr-client/lists"}