Skip to content

Basic Deployment Guide

The following guide utilises the Connect CLI however the procedure should work with the Sigma API also. Please ensure that you have setup your client ID and secret as described here.

Terminology

Term Definition
AppKey AES128 encryption key for LoRaWAN device
Deployment Unique name of the location where your K-Cell is deployed
DevEUI ID in the IEEE EUI64 address space used to identify a LoRaWAN device
Device Profile ID in the IEEE EUI64 address space used to identify a LoRaWAN device

Find your K-Cell serial numbers

Before you can create a a deployment you will need to know the K-Cell serial number. This will be on the unit and you can fetch a list of K-Cell serial numbers with the following commands.

connect-cli validate-krucial-client
connect-cli k-cell get

Expected output:

$ connect-cli validate-krucial-client
Token successfully obtained - you can run commands now.

$ connect-cli k-cell get
[C02-1234567-01]

Create a deployment

Next we shall create a deployment for our K-Cell and store the data on the Krucial Connect servers:

connect-cli deployment post --name "my deployment" --serialNumber "C02-1234567-01" --dataStoreKrucialServers

Add a device to your organisation

The presumption here is that you have a LoRaWAN sensor with the appropriate devEUI and appKeys using OTAA. You may create your own device profile and add it to the deployment. However, for now we will first fetch a list of pre-defined profiles and use the OTAA for adding a device.

connect-cli device-profile get

Then we will add our new device

 connect-cli device post --name "My test device" --devEui <value>  --appKey <value> --deviceProfileName "Krucial OTAA Default" 

Add a device to a deployment

Now that we have a device available to add to our deployment we can associate it with the K-Cell by running:

connect-cli deployment post-device --devEui <value> --name <deployment-name> --deviceProfileName "Krucial OTAA Default"
Now your device is configured you will need to wait for the K-Cell to communicate synchronise your changes and data to arrive from your sensor.

Fetch data

As data was configured to be stored on the krucial servers you can fetch your data by running:

connect-cli deployment get-device-data --deploymentName "my deployment"