Skip to content

Dragino LSN50 Node

IoTThinks.com edited this page May 14, 2020 · 25 revisions

Dragino LSN50

To use Dragino LSN50 as LoRaWAN node

image

image

1. Hardware

1.1 Pin locations

EasyLoRaLowPowerNode-Pinout

1.2 Pin mapping for STM32L072CZT6 (used by LSN50)

Original at https://github.com/dragino/Lora/blob/master/LoRaST/v1.0/LoRa%20ST%20v1.0_Sch.pdf stm32L0

2. Connect to hardware

2.1 Use STLink v2 to upload code / firmware

STLink v2 USB

Driver is at https://www.st.com/en/development-tools/st-link-v2.html#tools-software stlink

Pin mapping

  • LSN50 -> STLink v2
  • PA14 -> SWCLK
  • PA13 -> SWDIO. NOTE: NEXT TO PA13 is PB14. WE NEED PA14!!!
  • VCC -> 3.3+
  • GND -> GND

IMG_5387

Switch of LSN50 is ISP to upload code. It's recommended to remove UART TTL USB before uploading code via STLink

STLink v2 will show up in USB Device, not Ports (COM & LPT) image

2.2 Use UART to debug

uart

  • LSN50 -> CP1202 USB TTL
  • GND -> GND
  • PA2 -> RX
  • PA3 -> TX

3. Update LoRaWAN firmware

image

image

Select the first one.

image

image

image

image

4. Programming guides

3.1 AT Commands

References:

Use UART TTL

  • Speed 9600
  • Data 8 bit, Parity none, Stop bits 1, Flow control none. image

To join ABP into Single channel gateway

  • AT+FDR Reset Parameters to Factory Default, Keys Reserve
  • AT+NJM=0 Set to ABP mode
  • AT+ADR=0 Set the Adaptive Data Rate Off
  • AT+DR=3 Set Data Rate (SF9, 125Khz)
  • AT+TDC=300000 Set transmit interval to 5 minutes
  • AT+CHS=433175000 Single channel mode
  • AT+RX2FQ=433175000 Frequency for RX2
  • AT+DADDR=? Get Device Address to 26 01 1A F1
  • AT+CFM=1 ConfirmedDataUp
  • ATZ Reset MCU

LoRaWAN Frequency - Use Channel 0

  • { 433175000, 125, 7, 12, 433175000, 125, 7, 12}, // Channel 0, 433.175 MHz/125 primary
  • { 433375000, 125, 7, 12, 433375000, 125, 7, 12}, // Channel 1, 433.375 MHz primary
  • { 433575000, 125, 7, 12, 433575000, 125, 7, 12}, // Channel 2, 433.575 MHz primary
  • { 433775000, 125, 7, 12, 433775000, 125, 7, 12}, // Channel 3, 433.775 MHz primary
  • { 433975000, 125, 7, 12, 433975000, 125, 7, 12}, // Channel 4, 433.975 MHz primary
  • { 434175000, 125, 7, 12, 434175000, 125, 7, 12}, // Channel 5, 434.175 MHz primary
  • { 434375000, 125, 7, 12, 434375000, 125, 7, 12}, // Channel 6, 434.375 MHz primary
  • { 434575000, 125, 7, 12, 434575000, 125, 7, 12}, // Channel 7, 434.575 MHz primary
  • { 434775000, 125, 7, 12, 434775000, 125, 7, 12} // Channel 8, 434.775 MHz primary

Data rate - Use DR3

image