LogoLogo
  • KPN THINGS USER GUIDE
    • Introduction
    • Getting started
      • Registration and setup
      • Device simulator app
      • Connect devices
        • SIM cards
        • Supported devices and KPN Devices
        • SODAQ R412M
        • Smartrak
        • Marvin development board
        • LoPy5
        • Arduino MKR WAN 1300/1310
        • Arduin MKR NB 1500
    • All videos
    • Tutorials
      • Configure a flow
      • Connect a HTTPs destination
      • Create a simple IoT web applicationPage
      • Send instruction to LoRa DevicePage
      • Send your data to Azure SQL
      • Technical overview
        • Management data model
        • Uplink communication
        • Downlink communication
        • Location data
      • Accounts and projects
        • Customer accounts and users
        • Projects
        • Customer management
        • Cost overview and contract
    • Frequently asked
      • Multi Factor Authentication
  • GENERAL FUNCTIONS
    • Quick reference videos
    • APIs
  • THE PORTAL EXPLAINED
    • Things Manager
      • Devices
        • Bulk operations
      • Data
        • Device data graph
      • Connectivity
        • LoRa connectivity configuration
      • Bulk reports
    • Things Creator
    • Support
      • News
      • Release notes
      • Real-time status
      • Service reports
      • Documents
      • Support tickets
      • Invoices
      • Contact info
    • Shop
  • BUILDING BLOCKS
    • Devices
      • Sensors
        • KPN Conditionsensor CO2 II
        • KPN Conditionsensor CO2 III
        • KPN Conditionsensor CO2 III motionPage 1
        • KPN FillTag I
        • KPN FillTag II
        • 1M2M ED1608
        • Elsys ERS
        • Device Simulator (Mobile Phone app)
        • Generic Device (Internet connected)
        • Generic LoRa device (preset connectivity)
        • Generic LoRa device (programmable)
        • Generic M2M device
        • Generic M2M device (with Internet connection)
      • Trackers
        • KPN Global Tracker Autonomous
        • KPN Global Tracker Wired
        • KPN LocationTag I
        • KPN LocationTag II
        • KPN LocationTag II v2
        • KPN LocationTag II v2 Expert Mode
        • KPN LocationTag II v3
        • KPN LocationTag III (with GPS)
        • KPN LocationTag III (without GPS)
        • KPN LocationTag III v2
        • KPN LocationTag III v2 Buffer
        • KPN LocationTag III v3
        • KPN LocationTag III v4
        • KPN LocationTag V
        • KPN LocationTag VI
        • KPN LocationTag WS
        • Streamline LoRa
        • Streamline M2M
        • Viloc
      • Routers
      • Gateways
        • KPN FSK Basestation
      • Device SDK
    • Connectivity
      • Connecting LoRa devices
        • LoRa connectivity configuration
      • Connecting M2M devices
      • Connecting Internet devices
      • Connecting MQTT Devices
    • Data Processing
      • ThingsML and SenML
        • ThingsML
        • SenML
          • Understanding and Interpreting SenML Data
          • Changes in KPN SenML
      • Device Twin
      • Decoders and encoders
        • Common measurements list
        • Decoder migrations
        • DIY Decoder
          • DIY decoder scripts
      • Merger
      • Device data
      • Devices
    • Destinations
      • HTTPS destination
      • MQTT broker
      • Cumulocity IoT Platform
      • Azure Event Hubs
      • Azure IoT Hub
      • Test Endpoint
      • ThingsBoard
      • Datacake
      • AWS Lambda
      • Google Cloud Run functions
  • IOT LINE UP
    • Freemium
      • Test SIM cards
    • Explorer
    • Modular
    • Tailored
    • Terms and Conditions
Powered by GitBook

© 2024 KPN - All rights reserved.

On this page
  • 1. Setup your Arduino MKR WAN 13X0
  • Setup your Arduino environment
  • Test your Arduino MKR WAN 13X0 device
  • Test the LoRa module on the Arduino MKR WAN 13X0
  • 2. Register your Arduino MKR WAN 13X0 to KPN Things
  • Add device
  • Provide network information
  • Check your newly created Device
  • 3. Program your device to send a LoRa message
  • Download the ThingsML library
  • Make a sketch
  • Run the sketch
  • 4. Check incoming data in the Portal

Was this helpful?

Export as PDF
  1. KPN THINGS USER GUIDE
  2. Getting started
  3. Connect devices

Arduino MKR WAN 1300/1310

PreviousLoPy5NextArduin MKR NB 1500

Last updated 6 months ago

Was this helpful?

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

1. Setup your Arduino MKR WAN 13X0

To connect the Arduino MKR WAN 13X0 to the computer you must use a USB cable.

Setup your Arduino environment

  • 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.

Test your Arduino MKR WAN 13X0 device

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!

Test the LoRa module on the Arduino MKR WAN 13X0

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.

2. Register your Arduino MKR WAN 13X0 to KPN Things

Add device

  1. Select the Own LoRa device (preset connectivity) device type

  2. Enter a name for your Arduino MKR WAN 13X0 device

  3. Click Add Device to continue

Provide network information

  1. DevEUI: the value you retrieved from the LoRa module in the step Test your Arduino MKR WAN 13X0 device

  2. AppEUI: you can use the following value: 0059AC00000FFFFF

  3. 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.

Check your newly created Device

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.

3. Program your device to send a LoRa message

Download the ThingsML library

  • 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.

Make a sketch

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.

Run the sketch

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:

Your module version is: ARD-078 1.2.3
Your device EUI is: a8610a………….
Connected!
Sending message...
Message sent correctly!
Sending message...
Message sent correctly!

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.

4. Check incoming data in the Portal

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

Download the and follow the installer. We'll use it later on to program the Arduino MKR WAN 13X0.

Open the . Go to the All Devices page and click on Add new Device.

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:

Arduino IDE
KPN Things Portal
https://www.loratools.nl/#/keys