Step 11 - Send and Receive LoRaWAN® Packages

In this step, you will:

– use LoraSendAndReceive sketch.

-Edit Arduino_secrets.h to enter the Device credentials that you had decided at Step10

-Going to run the sketch to observe that your LoRaWAN® message send to TPC

-Now, your environment is ready to send your 1st LoRaWAN® message to TPC. For this purpose, you going to use example* sketch supplied by MKRWAN library.

In order to be able to receive and view the LoRaWAN® messages that you send with your device should be registered to TPC.


Please select the LoRaSendAndReceive sketch supplied by the MKRWAN library, which can be found under the Examples Menu of Files main menu.


Please verify that the LoraSendAndReceive sketch is loaded onto IDE.


Please edit to Arduino_secrets.h file by cliking to the 2nd TAB on the IDE.


Please replace

“xxxxxxxxxxxxxxxx” by the JoinEUI  and “yyyyyyyyyyyyyyyy” with the AppKey

that you had choose at STEP10


Finally, your Arduino_secrets.h file should look similar to this.


Please select upload by clicking on the arrow, or alternatively, you can use ctrl+U for sketches to:

2)Upload to Device
3)And run


Please observe the CPU reset. Message that shows that your sketch has been compiled, uploaded, and started to run on your device.


Please click to Serial Monitor icon to view the messages printed by the device as result Of The run.


Please ensure that Both NL & CR selected.


Please type some text and press ENTER.


If you observe Message sent correctly! It means followings:

– your sketch compiled, uploaded to the device. i.e., your development environment is working perfectly!

-Your LoRaWAN® message was delivered correctly. i.e., your message arrived at TPC, your TPC definitions are correct, and as a result, your message was accepted by TPC.

As a result of this step, it confirms that you have successfully performed all the steps of this activity. Congratulations !