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.

1

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

2

Please verify that the LoraSendAndReceive sketch is loaded onto IDE.

3

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

4

Please replace

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

that you had choose at STEP10

5

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

6

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

1)Compile
2)Upload to Device
3)And run

7

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

8

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

9

Please ensure that Both NL & CR selected.

10

Please type some text and press ENTER.

11

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 !

*https://docs.arduino.cc/tutorials/mkr-wan-1310/mkr-wan-library-examples#mkr-wan-lora-send-and-receive