Shun can LoRa Quick Start Guide

I. Overview

Lora Shun series modules may be Shun Technology is based SX1278 / SX1276 design and development, mainly LoRa ™ remote modem, for ultra-long distance spread spectrum communication, interference is strong, it is possible to minimize current consumption. SEMTECH patented by the modulation LoRa ™, SX1278 having high sensitivity than -148dBm, the output power of + 20dBm, the transmission distance, and high reliability. At the same time, relatively conventional modulation techniques, LoRa ™ modulation techniques in anti-blocking and selection also has obvious advantages, solves the problems of traditional design not take into account distance, interference and power consumption at the same time.

1.1 Product Features

  • Supports FSK, GFSK, MSK, GMSK, LoRa ™ and OOK modulation
  • Ultra low reception sensitivity of -140 dBm
  • It has excellent anti-blocking properties
  • Support preamble detection
  • SPI supports half-duplex communication
  • Packet engine with CRC, up to 256 bytes
  • A small volume of SMD package double row of stamps hole

1.2 Selection Table

Here Insert Picture Description

II. Wiring

2.1 is as follows Ra-01, Ra-01H, Ra-02 test board 51 corresponding to the terminal:

(8 lines of LoRa test board modules, respectively, shown below)

LoRa module MCU
NSS CSN
DAWDLE DAWDLE
MISO MISO
SCK SCK
RESET THIS
DIO0 IRQ
3.3V VCC
GND GND

Here Insert Picture Description

2.2Ra-06 and comes LoRa modulation MCU program, the other MCU may be used to control it by serial AT commands, the wiring as shown below:

Here Insert Picture Description

three. Burning (test program)

(This test procedure is to use a series of 51 MCU development of reference only test for verification module performance and good purposes, carried out on this program For 2 development, we do not provide the source code written in support)

Example 3.1 firmware burning

示例固件下载地址(https://docs.ai-thinker.com/lora)
Here Insert Picture Description
测试板烧录方法
1.用串口工具连接51测试板RX,TX,GND,连接方法如下图所示(烧录时请对应相应的单片机型号,此程序对应的单片机为为安信可提供的STC15W408AS型号)
Here Insert Picture Description

2.软件下载请到官网上(http://www.stcmcu.com/)下载

3.打开STC-ISP工具,点击检测MCU选项,模块会自动完成软件配置;

4.点击“打开程序文件”,选择MCU的Hex固件,注意输入用户程序运行时的IRC频率为22.1184MHz;

5.点击下载编程后工具会将所选择的固件烧录到单片机里,此时完成下载(注:如果点击监测和下载工具界面无反应,那么请尝试点击以后进行一次复位启动);
Here Insert Picture Description

3.2示例固件测试

固件下载完成后,请重新复位测试板。插上LoRa转接板,此测试必须要两块测试板,一块用来发送,另外一块用来接收。当模块上电时不做任何操作,则LoRa模块进入接收模式。当其中一个测试板按下其中一个按键,模块进入发送模式,模块右边的灯会亮起,另外一个模块处于接收模块,如果收到数据,左边的灯会闪烁
Here Insert Picture Description
按照如图所示在测试板上接入USB转TTL工具打开串口可以收到模块发送的打印信息

四.AT指令

(本次测试基本参数均为出厂默认参数,均采用Ra-06的出厂固件,在测试串口时,需配置串口默认波特率9600,偶校验才能进行数据收发和AT指令测试)
AT 指令采用基于 ASCII 码的命令行,命令格式如下:
请求消息格式为:AT+[OPTION][para, …][\r][\n]。可以不加换行符(\r\n)!

AT指令分为如下几块:
(1)基本执行指令:

(2)系统参数设置指令:

(3)LoRa参数配置设置指令:

(4)数据传输格式指令:

详细的指令语法以及参数调配请参照如下链接中的AT指令文档:
https://docs.ai-thinker.com/_media/ra-06_at_command-20191104.pdf

五.通信测试

(本次测试基本参数均为出厂默认参数,均采用Ra-06的出厂固件,在测试串口时,需配置串口默认波特率9600,偶校验才能进行数据收发和AT指令测试,测试时请加装符合规格参数的天线,否则可能导致数据传输错误或者无法通信)

4.1点对点通信

步骤一(主机):
AT+ADDR=2 //设置本机主机地址为2
AT+TADDR=3 //设置目标地址为3

步骤二(节点1):
AT+ADDR=3 //设置本机主机地址为2
AT+TADDR=1 //设置目标地址为1
AT+RECV=1 //接收数据

步骤三(主机):
AT+MSG=Ai-Tinker //主机发送数据

Here Insert Picture Description

4.2一对多广播通信测试示例

步骤一(主机):
AT+ADDR=1 //设置本机主机地址为1
AT+TADDR=65535 //设置目标地址为广播地址

步骤二(节点1):
AT+ADDR=2 //设置本机主机地址为2
AT+TADDR=1 //设置目标地址为1
AT+RECV=1 //接收数据

Step three (Node 2):
the AT. 3 = ADDR + // set the machine address of the host 2
the AT + = TADDR. 1 // set to the destination address. 1
the AT +. 1 // = the RECV receives data

Step four (host):
the AT + 1234567890 // host sends the MSG = data
Here Insert Picture Description

contact us

Here Insert Picture Description
Official official website: https://www.ai-thinker.com
development information: https://docs.ai-thinker.com/
official forum: http://bbs.ai-thinker.com
business cooperation: sales @ aithinker. com
technical support: [email protected]
address: Guangdong Province, Bao'an District of Shenzhen City streets aviation Road, Huafeng second industrial Park, Block B, on the seventh floor
Tel: 0755-29162996

Released seven original articles · won praise 0 · Views 278

Guess you like

Origin blog.csdn.net/Boantong_/article/details/104549973