Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Let's get started
Follow the steps to create your Freemium account.
Open https://portal.kpnthings.com/ and click on Register for free.
Please enter a valid E-mail you like to create your account on
Please enter your First Name. No special characters allowed
Please enter your Last Name. No special characters allowed
Please enter your Company Name. The company name cannot contain a hyphen character (-) or a question mark (?)
Please enter a valid Phone Number. Make sure the country code is included. A phone number is not mandatory
Please check the box to agree with the general Terms and Conditions
Please check the box when you would like to stay informed. This is not mandatory
Click on Register to create your account
If you intend to upgrade your account later, it is advised to enter the company name correctly and use your business email address. This way you have an account that can be upgraded later with the same data.
As soon as you created your password you will be forwarded to the KPN Things portal.
When visiting the KPN Things Portal in the future, you can access the portal via https://portal.kpnthings.com.
In some cases you land in the KPN Developer Portal or in the MijnKPN Zakelijk portal. In this case you can go to the KPN Things Portal by clicking on the KPN Things icon.
We would like to advice you to start testing using our free Device Simulator app. This way you know for sure that you have configured the portal correctly.
You know how to start and want to use an actual device? Perhaps one of the explanation pages about some of the most used test devices will be useful to you.
Build your first IoT Solution in KPN Things
Our KPN Things platform is your environment to start working on IoT Solutions and manage in a single environment. This guide will help you get started. Before we dive in, make sure you have a subscription and you're able to sign in.
There are two types of accounts. For both types the authentication is managed in our GRIP platform developed by KPN. This provides you with a secure and easy access to your KPN applications. With the GRIP portal you can manage your subscriptions and perform user management.
KPN Things Freemium
Once you have registered you have a developer account. With this account you get a Freemium project. Here you can test LoRa and M2M connectivity for a limited number of devices for free.
Follow our step-by-step guide to further set up the environment.
Of course we offer solutions for both small and large applications within the account types below. We do recommend to start testing our Freemium subscription first to get a good idea of the possibilities.
KPN Things Explorer
You can easily upgrade this registration to a paid subscription later. This is our low threshold Explorer solution and suitable for even a couple of devices.
KPN Things Modular
An account will be created for you and you will receive an email to create a password. This is out dynamic solutions based on standard building blocks suitable for high-volumes.
KPN Things or Tailored
Accounts will be created for you and you will receive an email to create a password. This is our customized connectivity focussed solutions suitable for high-volumes.
KPN Things is available in four distinct propositions.
Our KPN Things Device simulator app for or allows you to test KPN Things with your own mobile phone as a device. If you do not yet have a suitable device, you can use the app to still build a working data flow.
Mobile as a device - Easily add the app as a Device in your KPN Things account.
Choose sensors - The app allows you to choose which phone metrics to use as Device data
Choos your interval - Send the data once or at a regular interval
Follow the steps to add your mobile as a device.
On your computer go to the KPN Things portal.
Click on All Devices to show the device overview on the Things Manager tab
Click on Add new Device to add your mobile phone
Click on Device Simulator
Give your device a recognizable name
You can add a description, this is useful when you have multiple devices and want to provide context. This is not a mandatory field.
Click Add Device to finish this step
Now you should see the DvnUUID and Shared secret. Those are the credentials for you Device simulator app. This information is added in the next step by scanning the QR code with the app.
This is the only time the Shared Secret will be visible, so save the info in a secure place.
Or connect your own test devices with out other device templates.
You will need asmartphone (iOS or Android) and a computer. Each step of this article ses the smartphone or computer icon to tell you on what apparatus you should be taking those steps.
The Smartrak M2M GPS tracker is a device produced by Streamline and used for demo purposes. When you push the button the device will send its location to KPN Things.
The first step is to check if everything is present in the box:
Contents:
Battery (1)
Logic board (2)
Bottom part of the casing (3)
Top part of the casing (4)
KPN M2M SIM card (5)
Wireless Charger (not shown)
Step 1: Insert the SIM-card and write down the IMEI (1), we need that later.
Step 2: Connect the battery.
Step 3: Connect the vibration motor. This can be a bit of challenge, but you can do this. The connector has to be pushed on the terminal from above instead of sliding
Step 4: Connect the bottom part. This is the wireless charging circuit.
Step 5: Put everything together.
Step 6: Rotate the two parts as shown. The on/off button has to be on the side of the vibration motor.
Step 7: Click two parts of the casing together.
Plug in your QI charging device.
Place the device on the QI charging device and allow it to charge for a few hours.
You should hear a beep when the device starts charging.
Open the KPN Things Portal, and log in with the credentials you received in the mail. Go to the All Devices page and click on Add new Device.
Select the Streamline M2M device device type
Enter a name for your test device
Click Add Device to continue
Now enter the Streamline M2M specific information of your Device.
IMEI of your Device. This value is printed on the logic board. If you followed the assembly instructions in step 1, you have written this value down.
2. ICCID of your SIM card. This value is printed on your SIM card. Select the correct SIM card from the drop down.
3. Click Add Network Info to save the network information and then Finish to continue.
If you want, you can learn more about M2M in KPN Things.
Push the button on the device and it will send its location to KPN Things! After the push the LEDs start blinking:
Lightning icon: GPS location is being searched
Battery icon: Device is turned on / charging
Waving person icon: indicates the button is pressed
The first time after connecting the battery it can take up to 5 minutes to receive a message. If the LEDs do not start blinking try to push and hold the on / off button for 10 seconds. The battery LED in the middle should start blinking. If still nothing happens, try to charge the device for at least 2 hours.
You should now visit the Device Detail Page in the Portal of this Device. In the connectivity block, you should see that the last message time indicates that KPN Things just received a message from your Device!
Continue to the next step:
This is an old development board which is no longer available for purchase and should not be used for new designs.
A nifty, industry standard IoT developer board that allows you to utilize LTE-M networks with integrated GPS, Accelerometer and Magnetometers, Grove Connectors, JST connectors and Arduino compatible open source software that allows for low-power applications.
This getting started targets the SODAQ SARA Arduino Form Factor (AFF) R412M device. Probably other AFF and SFF SODAQs with an R41xM module will work, but we did not test them (yet). If you share your experiences with one of these devices, we can update this manual!
This getting started will give you step by step instructions to get your KPN Things M2M developer kit connected to KPN Things!
Before we start, you should check if have all necessary components:
KPN Things SIM card
SODAQ SARA AFF R412M Board
PCB Antenna
LiPo Battery
After registration there is another step in order to receive test SIM cards, since we don't know your home address yet to send them to! After registering and logging in for the first time, click on the link in the M2M is now available in KPN Things! notification box on the home page and follow the directions.
You will receive your test SIM cards in a couple of days. The SIM cards will be added to your Portal account already, ready to go!
This part of the manual is based on the Getting Started of SODAQ.
With the Arduino IDE we will write our code and program it on the Device.
Download the Arduino IDE and follow the installer.
Open your freshly installed Arduino IDE.
When your IDE is all started, execute the following steps to install the Sodaq board configuration files.
Click on File > Preferences
At the bottom you should see Additional Boards Manager URLs. This is where you need to paste the following URL:
After adding the URL, your preferences screen should look like this:
Close the preferences screen with OK
Click on Tools > Board:… > Boards Manager…
Search for SODAQ.
Click on SODAQ SAMD Boards and an install button will appear.
Click Install to install the latest version of your selected board collection.
When the installation is done, click Close.
Step 1: Insert the KPN Things SIM card.
Step 2: Connect the antenna. Push the connector straight on the board.
Step 3: Connect the battery to the right terminal on the board, the one stating BATT.
Step 4: Connect the USB cable to the left USB port, the one next to the SIM card slot.
Make sure you connect your battery when using the board, else the module won't work correctly!
From the Tools menu, under Board, select the correct board type:
Device
Board type
SODAQ SARA Arduino Form Factor (AFF) R412M
SODAQ SARA
Also from the Tools menu, under Port, make sure the correct COM port is selected. If you have multiple options, select the one stating SODAQ SARA.
If none of your ports is labelled that way, disconnect your SODAQ, reopen the menu, check which COM port disappeared, reconnect the SODAQ and choose the previously identified COM port.
With this test sketch we are going to check whether your Device works.
Copy the passthrough example code from the following SODAQ documentation page:
Paste the passthrough example code in you Arduino IDE.
Uncomment the third line, since you have a u-blox R4xx module
From the Sketch menu, click Upload to send the software to your SODAQ.
If all went well it will say the following in the bottom of the Arduino IDE:
Meanwhile, from the Tools menu, open the Serial Monitor
In the Serial Monitor, select Both NL & CR and set the baud rate to 115200 baud (#1 in the screenshot below).
#2 in the screenshot above illustrates where you can enter commands to be sent to the u-blox module that sits on your Development board.
#3 shows where you will see the responses from the module.
Use the command AT+GSN
to get the IMEI of your module.
You will be needing this value when registering your Device in the next step of this getting started.
Additionally, with the command ATI9
you can check your firmware version.
The latest firmware version for the R412 is M0.10.00,A.02.14
(as of November 2020)
Command
Description
Expected response
AT
Communication test
OK
ATI9
Firmware version
Some ID.
AT+CSQ
Check signal quality
No connection: +CSQ: 99,99
Good connection: value around 20
AT+GSN
Fetch IMEI of module
The SODAQ passthrough documentation gives some more available commands. All available commands can be found in the SARA-R4 AT commands manual of u-blox.
Open the KPN Things Portal. Go to the All Devices page and click on Add new Device.
Select the Own M2M device device type.
Enter a name for your SODAQ device.
Click Add Device to continue.
Now enter the M2M specific information of your Device.
IMEI of your Device. This value is printed on your u-blox module:
2. ICCID of your SIM card. This value is printed on your SIM card. Select the correct SIM card from the drop down.
If you have an Early access SIM, you choose the option "Add early access SIM" and enter the ICCID of the SIM manually in the newly appeared input field.
3. Shared secret - a kind of password for the future data coming from your Device. Here you should come up with a unique password containing at least:
One lower case character.
One upper case character.
One number.
One special character.
32 characters in total.
The shared secret should also be programmed into your Device in step 5.
4. Click Add Network Info to save the network information and then Finish to continue.
Learn more about M2M in KPN Things.
In this step we are going to flash the Device with a program to send data to KPN Things.
The ThingsML library will provide code for your Device to communicate with KPN Things. The SODAQ libraries will provide code to interface with the components on the development board.
From the Tools menu in your Arduino IDE click on Manage Libraries...
Now, in the Library Manager, wait for all libraries to load.
Then search and install the following libraries:
ThingsML
Sodaq_LSM303AGR
Sodaq_R4X
Sodaq_wdt
When the installations are finished, click Close.
This example will read the board temperature from the onboard thermometer and send it to KPN Things every 60 seconds.
From the File menu, click on Examples. Now find ThingsML, then select sodaq, and within that choose sara_aff_temperature.
Look for the following part in the example code and fill in the missing values:
Device URN should be completed with the IMEI of your Device.
Make sure you leave the trailing colon :
in place in the DEVICE_URN
variable!
Device Key should be filled with the Shared secret of your Device.
APN should be filled with one the following value two values. Your SIM card is one of two types, which you can see in the Connectivity list in KPN Things.
For M2M Easy use kpnthings.iot
For M2M Advantage use kpnthings2.m2m
Roughly: If you received your SIM card after June 2023, it's most likely an M2M Advantage.
Upload the sketch to your Device and open the Serial Monitor. The device will report some of the setup steps it will perform:
This means your Device is trying to connect to our LTE-M network. After some seconds the following lines will appear:
This means your Device has join our network and has sent its first uplink message to KPN Things!
Now your Device has connected to the network and is sending data, you should visit the Device Detail Page in the Portal of the Device you created in step 4.
In the connectivity block, you should see that the last message time indicates that KPN Things just received a message from your Device!
You now successfully connected your M2M device to KPN Things! To further setup your data flow in KPN Things, you should can go to the next step:
Interested in expanding the example sketch to make the Device do exactly what you want? Use the following references to find more information on Things code and SODAQ code:
The ThingsML library contains another SODAQ example that reads out the GPS module and sends latitude and longitude to KPN Things.
The SODAQ Support pages contain several examples to read out the sensors you can find on the SODAQ boards: https://support.sodaq.com/Boards/Sara_SFF/examples/.
Additional documentation on the ThingsML library can be found in Github: https://kpn-iot.github.io/thingsml-c-library/
Arduino MKR WAN 1300/1310 is the fastest start with LoRa and the Internet of Things. It’s the perfect introduction to IoT for your organization, and is also used in education. Arduino MKR WAN 1300/1310 uses its LoRa connectivity to connect to the internet from anywhere in the world where there is LoRa coverage.
When ordering the Arduino MKR WAN 1300/1310 make sure that an antenna is included in the order since it's not delivered with the board
To connect the Arduino MKR WAN 13X0 to the computer you must use a USB cable.
Download the Arduino IDE and follow the installer. We'll use it later on to program the Arduino MKR WAN 13X0.
Connect your Arduino MKR WAN 13X0 to your computer.
From the Tools menu, under Board, under Arduino SAMD boards (32-bits ARM Cortex M0+), select Arduino MKR WAN 1300 or 1310.
If the board is not available go to Tool menu, under Board select Board Manager and search for the Arduino SAMD boards (32-bits ARM Cortex M0+). Click install to install the board.
Also from the Tools menu, under Port, make sure the correct COM port is selected. If you have multiple options, select the one stating Arduino MKR WAN 13X0. If nonee of your ports is labelled that way, disconnect your Arduino MKR WAN 13X0, reopen the menu, check which COM port disappeared, reconnect the Arduino MKR WAN 13X0 and choose the previously identified COM port.
We will now test whether the Arduino MKR WAN 13X0 device is working by letting a LED blink.
In the Arduino IDE go to File, under Examples, under 01. Basics, select Blink
From the Sketch menu, click Upload or select the big arrow on the left of the Arduio IDE to send the software to the Arduino MKR WAN 13X0. If all went well it will say Uploading complete in the bottom of the Arduino IDE and the LED on the Arduino MKR WAN 13X0 board will blink!
The LoRa connectivity on your Arduino MKR WAN 13X0 device is managed by the Murata CMWX1ZZABZ module. With the following steps we check whether this module works correctly.
In the Arduino IDE select from the sketch menu, under Include Library select Manage Libraries. Search for MKRWAN and select the 1.1.0 version.
After the library is downloaded go to File, under Examples, under MKRWAN select FirstConfiguration.
Upload the sketch to the Arduio MKR WAN 13X0
Meanwhile, from the Tools menu, open the Serial Monitor. Here we will find the unique Device EUI. Store the value in a text file. You'll need it when adding the device to KPN Things.
If your device has not the latest firmware version you can load the MKRWANFWUpdate_standalone.ino sketch via File, under Examples, MKRWAN to update the device firmware.
Open the KPN Things Portal. Go to the All Devices page and click on Add new Device.
Select the Own LoRa device (preset connectivity) device type
Enter a name for your Arduino MKR WAN 13X0 device
Click Add Device to continue
DevEUI: the value you retrieved from the LoRa module in the step #test-your-arduino-mkr-wan-13x0-device
AppEUI: you can use the following value: 0059AC00000FFFFF
AppKey: Every device should have its own unique AppKey, since it is the root security key of your device. You can generate a unique AppKey here: https://www.loratools.nl/#/keys
Click Add Network Info to save the network information and then Finish to continue.
Store these three values somewhere, because you will be needing them to program your device later on.
You are now on the Device Detail Page. In the LoRa tab you will see the network status. This can temporarily be Pending creation, but if you refresh the page it should switch to Active. This means your device is correctly registered to the network.
If the network status sticks to Pending creation, you could try to delete the Device and and provision again (Restart at step #add-device)
If the Network Status ended up in Failed, something has gone wrong. Most likely the DevEUI is already registered through another application or account. Please make sure you remove the device registration from the other application or account and re-add the device in the Things Portal.
From the Sketch menu in your Arduino IDE click on Include Library, Manage Libraries...
Now, in the Library Manager, search for ThingsML and click Install. When the installation is finished, click on the Library manager icon to close the left window.
From the File menu, click on Examples.
Now find ThingsML, then select Arduino, MKR_WAN_1300, and within that choose Arduino_mkr_wan_1300_example.
A sketch will open. Now update the values for the variables AppEUI
, and AppKey
in the code with the values you entered earlier in the Portal. The DevEUI
is automatically filled in on the background.
Upload the sketch to your Arduino MKR WAN 13X0 and open the Serial Monitor. You will see your module version and if your device is successfully connected and joined the network. At some point you will see the following:
If you see something else instead of connected
, move closer to your window or walk out into the garden to improve reception from the LoRa network. Then disconnect and reconnect the Arduino MKR WAN 13X0 to your computer. You probably need some more coverage to be able to join the network.
After joining, your Arduino MKR WAN 13X0 will send a message every 300 seconds containing a fixed temperature “measurement” in ThingsML format. Read more about ThingsML.
Now your Arduino MKR WAN 13X0 has joined and is sending data, you could visit the LoRa Data tab on your Device Detail Page in the Portal. You should see your Join request and Join accept appear like in the screenshot below and at this point you will see more data as well.
You now successfully connected your Arduino MKR WAN 1
Arduino MKR NB 1500 is the fastest start with LTE-M and the Internet of Things. It’s the perfect introduction to IoT for your organization, and is also used in education. Arduino MKR NB 1500 uses its LTE-M connectivity to connect to the internet from anywhere in the world where there is LTE-M coverage.
When ordering the Arduino MKR WAN 1300/1310 make sure that an antenna is included in the order since it's not delivered with the board
Before you can start you need a KPN simcard. You can order 2 free cards via https://portal.kpnthings.com/home
On this page you will find the window below to order a simcard.
To connect the Arduino MKR NB 1500 to the computer you must use a USB cable.
Download the Arduino IDE and follow the installer. We'll use it later on to program the Arduino MKR NB 1500.
Connect your Arduino MKR NB 1500 to your computer.
From the Tools menu, under Board, under Arduino SAMD boards (32-bits ARM Cortex M0+), select Arduino MKR NB 1500.
If the board is not available go to Tool menu, under Board select Board Manager and search for the Arduino SAMD boards (32-bits ARM Cortex M0+). Click install to install the board.
Also from the Tools menu, under Port, make sure the correct COM port is selected. If you have multiple options, select the one stating Arduino MKR NB 1500. If non of your ports is labelled that way, disconnect your Arduino MKR NB 1500, reopen the menu, check which COM port disappeared, reconnect the Arduino MKR NB 1500 and choose the previously identified COM port.
We will now test whether the Arduino MKR NB 1500 device is working by letting a LED blink.
In the Arduino IDE go to File, under Examples, under 01. Basics, select Blink.
From the Sketch menu, click Upload or select the big arrow on de left of the Arduio IDE to send the software to the Arduino MKR NB 1500. If all went well it will say Uploading complete in the bottom of the Arduino IDE and the LED on the Arduino MKR NB 1500 board will blink!
The LTE-M connectivity on your Arduino MKR NB 1500 device is managed by the uBlox SARA-R410M-02B module. With the following steps we check whether this module works correctly.
In the Arduino IDE select from the sketch menu, under Include Library select Manage Libraries or click on the library icon on the left side of the IDE. Search for MKRNB and select the 1.6.0 version.
After the library is downloaded go to File, under Examples, under MKRNB select Tools and select TestModem.
Upload the sketch to the Arduio MKR NB 1500.
Meanwhile, from the Tools menu, open the Serial Monitor. Here we will find the unique IMEI. Store the value in a text file. You'll need it when adding the device to KPN Things.
Open the KPN Things Portal. Go to the All Devices page and click on Add new Device.
Select the Own M2M device device type
Enter a name for your Arduino MKR NB 1500 device
Click Add Device to continue
IMEI: the value you retrieved from the Ublox module in the step Test the LTE-M module on the Arduino MKR NB 1500
ICCID: you must use the ICCID form the simcard you ordered via KPNThings:
Shared secret: Every device should have its own unique shared secret You can generate a unique secret by pressing Generate:
Store these three values somewhere, because you will be needing them to program your device later on.
You are now on the Device Detail Page. On this page you can see the network status. If everything is done the status should be Activated. This means your device is correctly registered to the network.
To receive data in the KPNThings portal you must create a flow. Click on Flows and then on Link to another Flow.
Select My first Flow.
The flow is now created and you must add a decoder to the flow to decode the payloads from the device.
Click on My first flow.
Click on Data Processing
Enable the switch Decoded ThingsML and raw SenML data (v2).
The decoder is now enabled and device data send by the Arduino MKR NB 1500 will be decoded and visible in the Device twin.
The decoded data can be send to a destination. For testing you can use the KPN Test Endpoint destination.
Click on Destination on the left side on the screen, next click on Add new Destination in the upper right side of the screen.
Select the Test Endpoint destination. Give it a name and click on Create Test Endpoint. The endpoint is created and there is a button and link to view the destination. Later the endpoint can always be accessed via the destination menu option on the left side of the main screen.
· From the Sketch menu in your Arduino IDE click on Include Library, Manage Libraries... or click on the library icon on the left side of the IDE.
Now, in the Library Manager, search for ThingsML and click Install.
Search for TemperatureZero and click install. When the installation is finished, click on the Library manager icon to close the left window.
From the File menu, click on Examples.
Now find ThingsML, then select Arduino, MKR_NB_1500, and within that choose mkr_nb_1500_uplink_example.
A sketch will open. Now update the values for the variables IMEI
, and shared secret
in the code with the values you get earlier from the device and the KPNThings.
Upload the sketch to your Arduino MKR NB 1500 and open the Serial Monitor. You will see the AT commands and some other information. Check incoming data in the Portal.
Now your Arduino MKR NB 1500 is sending data, you could visit the Device twin tab on your Device Detail Page in the Portal. You should see the measured temperature.
If the Test endpoint was setup the data from de device is also visible there.
Connect your device to KPN Things
Choose one of the below device types to continue setting up your IoT solution.
You can request KPN M2M sim cards at https://portal.kpnthings.com. Register for free and find the link in the M2M is now available notification to order your SIM cards.
Continue configuring your SIM cards.
We recommend starting with connecting the KPN Things device simulator app. You can use this app to simulate a device and send messages whenever your want.
Continue with the Device simulator app.
KPN Things supports commonly used IoT devices out of the box. If you want to get started with one of these devices, continue with Supported devices & KPN devices.
Start experimenting and discover the wide range of possibilities with these developer devices.
These development boards are no longer available for purchase and should not be used for new designs.
To connect other devices head over to the Device SDK.
Continue to the next step:
For more information about the devices that are supported in Things portal head over to IoT devices. Would you like to add your own device, head over to the Device SDK documentation.
Head to the Devices in the left menu. Click the Add new device button in the left top corner. This is the place where you register new Devices and add them to KPN Things and our networks.
If you have more than one Project, you will have to select to which Project you would like to add your Device.
Depending on your Project subscription, available Device types may vary.
Name: Typically can be a Device ID or the name of a physical asset which the device is linked to.
Barcode (optional): Barcode or serial number used to identify a device.
Description (optional): Any additional device information.
When done, click Add Device to continue.
This step will look differently, depending on the type of network information.
If you selected Own LoRa device (programmable) device type in the previous step, the Portal will give you the OTAA join information (DevEUI, AppEUI and AppKey). Make sure to copy-paste or write down the provided identifiers. For security reasons the secret values will not be retrievable through the Portal after closing this page.
Click Finish to continue.
If you selected Own LoRa device (preset connectivity) or a supported device type, you should provide the LoRa network information for your device in this step.
Click Add network info to save the network information and then Finish to continue.
IMEI of your Device.
ICCID of your SIM-card - select the correct SIM card from the drop down. If you have an Early access SIM, you choose the option "Add early access SIM" and enter the ICCID of the SIM manually in the newly appeared input field (see A in the screenshot below).
Shared secret
After entering the values, click Add network info to save the information, or click Finish without adding Network to continue without adding network information to your Device object.
DvnUUID - the unique number to identify incoming data from your Device. Your Device UUID is prefilled, but you can enter any UUID you like.
Shared secret
You can visit the LoRa data or M2M data tab on your Device Detail Page in the Portal. You should see messages here as soon as the device has activity on the network.
You're ready for the next step:
This is an old development board which is no longer available for purchase and should not be used for new designs.
Marvin is the fastest start with LoRa and the Internet of Things. It’s the perfect introduction to IoT for your organization, and is also used in education. Marvin uses its LoRa connectivity to connect to the internet from anywhere in the world where there is LoRa coverage.
This part of the getting started is based on the .
Download the and follow the installer. We'll use it later on to program the Marvin.
Connect your Marvin to your computer.
We will now test whether the Marvin device is working by letting a LED blink.
Download and open it in the Arduino IDE, or copy-paste the code into an empty Arduino IDE sketch.
From the Tools menu, under Board, select Arduino Leonardo
Also from the Tools menu, under Port, make sure the correct COM port is selected. If you have multiple options, select the one stating Arduino Leonardo. If non of your ports is labelled that way, disconnect your Marvin, reopen the menu, check which COM port disappeared, reconnect the Marvin and choose the previously identified COM port.
From the Sketch menu, click Upload to send the software to the Marvin. If all went well it will say Uploading complete in the bottom of the Arduino IDE and the second LED on the Marvin board will blink!
The LoRa connectivity on your Marvin device is managed by the Microchip RN2483 module. With the following steps we check whether this module works correctly.
Upload the sketch to your Marvin.
Meanwhile, from the Tools menu, open the Serial Monitor
In the Serial Monitor, set the baud rate to 57600 baud (same as detailed in the sketch) and select Both NL & CR (#1 in the screenshot below).
Now you can directly speak to the LoRa module and get a response! #2 in the screenshot above shows you where to enter commands you want to send, and #3 highlights where answers from the module will be shown.
If you for instance send sys get ver
, the module will return its firmware version back. This will be 1.0.1 with some historic date.
Now execute the command sys get hweui
to retrieve the DevEUI that is stored in the module. Store the value in a text file. You'll need it when adding the device to KPN Things.
Select the Own LoRa device (preset connectivity) device type
Enter a name for your Marvin device
Click Add Device to continue
AppEUI: you can use the following value: 0059AC00000FFFFF
Store these three values somewhere, because you will be needing them to program your device later on.
4. Click Add Network Info to save the network information and then Finish to continue.
You are now on the Device Detail Page. In the LoRa tab you will see the network status. This can temporarily be Pending creation, but if you refresh the page it should switch to Active. This means your device is correctly registered to the network.
From the Tools menu in your Arduino IDE click on Manage Libraries...
Now, in the Library Manager, search for ThingsML and click Install. When the installation is finished, click Close.
From the File menu, click on Examples.
Now find ThingsML, then select marvin, and within that choose marvin_example, as such:
A sketch will open. Now update the values for the variables DevEUI
, AppEUI
, and AppKey
in the code with the values you entered earlier in the Portal.
Upload the sketch to your Marvin and open the Serial Monitor. You will see a lot of commands being send to the LoRa module to configure it and to join the network. At some point you will see the following:
This means your Marvin is trying to join the network. After some seconds the following line will appear
This means the device has joined our network!
If you see denied
instead of accepted
, move closer to your window or walk out into the garden to improve reception from the LoRa network. Then disconnect and reconnect the Marvin to your computer. You probably need some more coverage to be able to join the network.
You now successfully connected your Marvin device to KPN Things! To further setup your data flow in KPN Things, you can go to the next step:
First, let us check if you received everything correctly. There should be two KPN Things SIM cards in the package.
Then, the SIM cards should be visible in your KPN Things Portal on the All Connectivity page.
If you don't see your SIM cards, please contact us on iot@kpn.com and we will check if everything is correctly configured.
You now have a KPN Things SIM card in your possession, a SIM card that can be put in a programmable device to grant it direct access to KPN Things through a secure channel.
This SIM card supports connection to the following networks of KPN:
LTE-M
2G
3G
4G
5G
Don't you have a programmable M2M Device yet? You should get one! We have some tips for you:
Other SODAQ SARA devices, like the SFF R412M or devices with a different modem should also work with our developer kit guide. You should only take into account some different settings.
For instance for SARA SFF devices, you should use Board type SODAQ SFF.
This is an old development board which is no longer available for purchase and should not be used for new designs.
The LoPy4 is a quadruple bearer MicroPython enabled development board (LoRa, Sigfox, WiFi, Bluetooth) perfect enterprise grade IoT platform for your connected Things. With the latest Espressif chipset the LoPy4 offers a perfect combination of power, friendliness and flexibility.
Select the Own LoRa device (preset connectivity) device type
Enter a name for your LoPy4
Click Add Device to continue
You are now on the Device Detail Page. In the LoRa tab you will see the network status. This can temporarily be Pending creation, but if you refresh the page it should switch to Active. This means your device is correctly registered to the network.
If the network status sticks to Pending creation, you could try to delete the Device and register the device again.
Now your LoPy4 has joined and is sending data, you could visit the LoRa data tab on your Device Detail Page in the Portal. You should see your Join request and Join accept appear like in the screenshot below and at this point you will see more data as well.
You now successfully connected your LoPy5 device to KPN Things! To further setup your data flow in KPN Things, you can go to the next step:
Download and open it in the Arduino IDE, or copy-paste the code into an empty Arduino IDE sketch. With this program we can communicate directly with the LoRa module.
Possible other commands can be find in the module or in .
Open the . Go to the All Devices page and click on Add new Device.
DevEUI: the value you retrieved from the LoRa module in the step .
AppKey: Every device should have its own unique AppKey, since it is the root security key of your device. You can generate a unique AppKey here:
If the network status sticks to Pending creation, you could try to delete the Device and and provision again (Restart at step ).
If the Network Status ended up in Failed, something has gone wrong. Most likely the DevEUI is already registered through another application like Thingpark or the LoRa Developer Portal. Please make sure you remove the device registration from the other application and re-add the device in the Things Portal. For more information consult our .
After joining, your Marvin will send a message every 30 seconds containing an empty temperature measurement in ThingsML format. Read more about .
Now your Marvin has joined and is sending data, you could visit the LoRa Data tab on your Device Detail Page in the Portal. You should see your Join request and Join accept appear like in the screenshot below and at this point you will see more data as well. Learn more about .
We have the most elaborate documentation on getting the SODAQ SARA AFF R412M to work with KPN Things, so getting such a device will provide you the that we have.
Our also contains example code for the Arduino MKR GSM 1400, laying the basics for all Arduino based M2M devices.
If you want to use non-Arduino based devices, you would need to write your own code to interface with KPN Things. This M2M interface is explained in the .
Use the from the Pycom documentation to get started with your LoPy4. Make sure you setup both the and . You should be able to when continuing this getting started.
The LoPy4 is a LoRa device, and to register a LoRa-device to a network you need three values: DevEUI, AppEUI and AppKey. These values must be registered in KPN Things and in the device. For more information on these three values you can read in the LoRa documentation.
Open the . Go to the All Devices page and click on Add new Device.
Fill in the three values you determined in the previous step . Then click Add Network Info to save the network information and then Finish to continue.
If the Network Status ended up in Failed, something has gone wrong. Most likely the DevEUI is already registered through another application like Thingpark or the LoRa Developer Portal. Please make sure you remove the device registration from the other application and re-add the device in the Things Portal. For more information consult our .
Use the example from Pycom to get your device connected with our LoRa network and have it send data to KPN Things.
Read more information about what you see on the tab.
Value
How to get it
DevEUI
Use this code snippet from the Pycom documentation to retrieve the pre-programmed EUI from your LoPy4. You can use that one as DevEUI.
AppEUI
You can use this general purpose AppEUI: 0059AC00000FFFFF
AppKey
Every device should have its own unique AppKey, since it is the root security key of your device. You can generate a unique AppKey here: https://www.loratools.nl/#/keys.
Arduino MKR NB 1500
a LTE-M device
Arduino MKR WAN 1300/1310
a An Arduino device for LoRa
SODAQ R412M
a LTE-M device
Smartrak GPS Tracker
a M2M location tracker
Marvin dev board
a Arduino device for LoRa
LoPy4
Micropython development board with LoRa