Skip to content

Files

Latest commit

 

History

History
 
 

01_quick_start_guide

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Quick Start Guide

"Wireless Made Easy!" - Control SAM R34 IC or WLR089U0 Module with ASCII commands over UART

Back to Main page

A la carte

  1. Hardware Setup
  2. Software Setup
  3. Plug In
  4. Link Up
  5. Send Data
  6. Standby mode
  7. Secure Authentication

Hardware Setup

Device RF Transceiver Supported Evaluation Kit Supported IDEs
SAMR34J18B SX1276 (in SIP) SAMR34 XPRO Microchip Studio v7.0
WLR089U0 SX1276 (in SIP) WLR089U0 Module XPRO Microchip Studio v7.0

Software Setup

Notice that Network Servers supporting LoRaWAN 1.04 will only be compatible with this sample code which use Microchip LoRaWAN Stack MLS_SDK_1_0_P_5 (The Things Industries server supports LoRaWAN 1.0.4).

In LoRaWAN 1.0.4 Specification, DevNonce is an incrementing 16-bit value. Make sure DevNonce values are aligned between end device and network/join server to pass successfully the join procedure. DevNonce is incremented on each join request tentative from the end device and the value is tracked by the server. DevNonce is stored in Persistent Data Storage in the Microchip LoRaWAN Stack.

Plug In

  • Connect your board (EDBG USB) to your computer with a micro USB cable. Your personal computer will recognize the board as a Virtual COM port.
  • Open the virtual COM port in a terminal emulator

Link Up

Connect to Network Server using pre-programmed provisioning keys

  1. Open TeraTerm. Choose the EDBG Virtual COM port and enable local echo
  2. The default settings for the UART interface are 115200 bps, 8-bit, no parity, one stop bit and no flow control (115200 8 N 1)
  3. Press RESET button to reboot the board
Last reset cause: External Reset
LoRaWAN Stack UP
USER BOARD MLS_SDK_1_0_P_5 Oct 29 2020 16:10:55
  1. Initialize the LoRaWAN stack using mac reset <band> command. Check out the MAC Command User's Guide for more details.
mac reset 868
ok
  1. Provision the device for OTAA with your own keys
mac set deveui 000425191801d748
mac set joineui 0004251918010000
mac set appkey 000425191801d748000425191801d748
  1. Join the network
mac join otaa
ok
accepted

Send Data

  1. Transmit unconfirmed message on port 1
mac tx uncnf 1 AABBCCDDEEFF
ok
mac_tx_ok

  1. Transmit confirmed message on port 1
mac tx cnf 1 0011223344556688
ok
mac_tx_ok

Standby mode

  1. Place jumper J102 in MEAS position to measure MCU current
  2. Place jumper J101 in BY-PS position to bypass I/Os current
  3. Initialize the stack with mac reset <band> command
  4. Put the device in standby mode for 60 seconds

Example:

mac reset 868
sys sleep standby 60000
..
sleep_ok 59991 ms

Secure Authentication

To enable secure LoRaWAN Authentication, check out the links below for guidance on Hardware Setup and instructions to claim and activate end device to the Join Server:

  1. Initialize the LoRaWAN stack
mac reset 868
ok
  1. Enable crypto device
mac set cryptodevenabled on
ok
  1. Print crypto device info
// print crypto serial number
sys get cryptosn
01236e0a6ded6e6827

// print crypto dev eui
sys get cryptodeveui
0004A310001FFA2B

// print crypto join eui
sys get cryptojoineui
70b3d57ed0000000

// print crypto tkm info (used for Actility)
sys get cryptotkminfo
aa2301236e0a6ded6e68
  1. Join the network
mac join otaa
ok
accepted
  1. Transmit unconfirmed message on port 1
mac tx uncnf 1 AABBCCDDEEFF
ok
mac_tx_ok

Secure element is loaded with unique EUI-64 which is stored in DEV_EUI_SLOT memory. By default in the code, DEV_EUI_SLOT is used as deveui key. If required this settings can be changed in conf_sal.h.

#define SERIAL_NUM_AS_DEV_EUI 0 // Value is 1 if ECC608 Serial number is used as DEV_EUI otherwise DEV_EUI will be read from DEV_EUI_SLOT

Back to top