Here is a quick tutorial showing how to add any LoRaWAN device through a Tektelic NS. By following this tutorial, your setup will be ready to perform uplink and downlink operations (data from and to your end-point devices). For this, you need to access your account at Tektelic Administrator console.
1. First go to your TagoIO account, and if this is your first device connected between Tektelic and TagoIO, you will need to create an Authorization here . Copy it to use at Tektelic later.
Note : you just need to create one Authorization for all your devices.
2. Tektelic provides a few Data Converters for you, which mean it will send the data already converted to TagoIO if you use one of them.
If you wish to use the data converter from TagoIO, if Tektelic doesn’t have the one for you for example, you must follow this step.
Go to your Tektelic console > Data Converter > Click in the plus button.
Fill the fields accordingly:
Decoder:
// Do not decode anything, just put it into AS as is var arr = []; for (var i = 0; i < bytes.length; ++i) { arr.push(bytes[i]); } return {"bytes": JSON.stringify(arr), "port": port, "payload length": bytes.length};
Encoder:
// Encode downlink messages sent in // Base64 format as an array or buffer of bytes. function atob(input) { var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; var str = String(input).replace(/[=]+$/, ''); // #31: ExtendScript bad parse of /= if (str.length % 4 === 1) { throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded."); } for ( var bc = 0, bs, buffer, idx = 0, output = ''; buffer = str.charAt(idx++); ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0 ) { buffer = chars.indexOf(buffer); } return output; } function base64ToArray(base64) { var binary_string = atob(base64); var len = binary_string.length; var result = []; for (var i = 0; i < len; i++) { result.push(binary_string.charCodeAt(i)); } return new Int8Array(result); } if (data.params) { var bytes = base64ToArray(data.params.data); return {"port": data.params.port, "bytes": bytes}; } return {"port": 0, "bytes": [0x00]};
3. Go to your Tektelic console and create a new Integration. You can create a new integration configuration under the menu Applications > Select your Application > Integrations > + Button.
Fill the fields accordingly:
Don’t forget to copy the HTTP URL path.
4. Go back to your Authorization page at TagoIO, edit your previously created authorization by clicking in the pencil button. Paste the HTTP URL path copied from Tektelic along with your Tektelic API address.
Depending on the region of your server, it may be something like:
https://lorawan-ns-na.tektelic.com/ or
https://lorawan-ns-eu.tektelic.com/
The result must be like this:
https://lorawan-ns-na.tektelic.com/api/v1/integration/http/xxxx
5. Now, you just need to start adding Device in your TagoIO account.
Go to Devices/LoraWaN Tektelic, and choose the device connector from the list. Enter your device EUI - you can use the QR code to capture the EUI.
Note: if the device that you are looking for connecting with TagoIO is not in the list, you can always select the Custom Tektelic option and you can add the Parser for it later.
Done! Just turn your device on, and you will see data arriving in your account (data bucket of the device). Start building your dashboards, analysis, and actions!
If data doesn’t show up in your TagoIO account (use the Live Inspector tab in your Device to see data arriving), make sure you can see data in your Tektelic portal first, and check the keys and the configuration.