nRF7002 DK#
Integrate your Nordic nRF7002 DK board.
Prerequisites#
- The nRF7002 DK board with a USB cable.
- Installed minicom (for Linux) or RealTerm or PuTTy (for Windows) or other serial communication program.
- Installed nrfjprog from Nordic Semiconductor page.
- A user with access to the Coiote IoT Device Management platform.
Prepare binaries#
Use an already built binary#
To get the latest binary file and flash the board:
- Go to Anjay-zephyr-client.
- Download the
demo_nrf7002dk.hex
file. - Run
nrfjprog -f NRF53 --program demo_nrf7002dk.hex --verify --reset
Go to the Connect to the LwM2M Server.
Start development using samples#
Note
This step is optional. If you've gone through the Use an already built binary step, you can jump to Connect to the LwM2M Server.
Part 1: Getting Zephyr and Python dependencies#
To get the Zephyr SDK and dependencies follow the first 4 steps of the instruction provided by the Zephyr Project (from the set up the OS to installing the Zephyr SDK).
Part 2: Cloning the Anjay zephyr repository#
Enter the command line interface on your machine and change the directory to the one where you set up the Zephyr project (usually, it's ~/zephyrproject
), then paste and run the following command:
git clone https://github.com/AVSystem/Anjay-zephyr-client
Part 3: Compiling the example#
- Connect the nRF7002 DK board to a USB port of your machine.
- Set West manifest path to
Anjay-zephyr-client/demo
, manifest file towest-nrf.yml
, and dowest update
:west config manifest.path Anjay-zephyr-client/demo west config manifest.file west-nrf.yml west update
- Compile and flash the project for nRF7002 DK:
cd Anjay-zephyr-client/demo west build -b nrf7002dk_nrf5340_cpuapp west flash
Connect to the LwM2M Server#
To connect to Coiote IoT Device Management platform, please register at https://eu.iot.avsystem.cloud.
To connect the board:
- Log in to Coiote IoT DM and from the left side menu, select Device Inventory.
- In Device Inventory, click Add device.
- Select the Connect your LwM2M device directly via the Management server tile.
- In the Device credentials step:
- In the Device ID enter your board endpoint name, e.g.
test_device
. - In the Security mode section, select the PSK (Pre-Shared Key) mode:
- In the Key identity field, type the same name as in the
Endpoint name
field - In the Key field, type the shared secret used in the device-server authentication.
- In the Key identity field, type the same name as in the
- In the Device ID enter your board endpoint name, e.g.
- Click the Add device button and Confirm in the confirmation pop-up.
- In the Connect your device step, follow the next section to run the client and connect it to the server.
- In the Device credentials step:
Configuring the Client#
- With the board still connected to a serial port interface, open a serial communication program.
-
Use the
anjay
command to list possible options:uart:~$ anjay anjay - Anjay commands Subcommands: start :Save config and start Anjay stop :Stop Anjay config :Configure Anjay params
Tip
To show available subcommands, use the Tab key.
-
Check your default credentials by following the instructions in the program:
Note
Use the
anjay stop
command to stop LwM2M Client if you are going to change credentials.If your default credentials are different from device credentials provided in Coiote IoT DM, change them using the
anjay config set <possible_option> <value>
command.
-
The nRF7002 DK connects to the Internet via a Wi-Fi network. Remember to set the credentials of your network using
anjay config set wifi_ssid <value>
andanjay config set wifi_password <value>
. -
Use the
anjay start
command to run the Client. - Go to Coiote IoT DM to check if your device is connected. Click Next, then Go to Summary, then Finish. You should see your device registered.