没有合适的资源?快使用搜索试试~ 我知道了~
首页ST-LoRa AT指令.pdf
资源详情
资源评论
资源推荐

July 2018 AN4967 Rev 4 1/37
1
AN4967
Application note
Examples of AT commands on I-CUBE-LRWAN
Introduction
I-CUBE-LRWAN is a LoRaWAN™ software expansion for STM32Cube. This expansion
package consists of a set of libraries and application examples for microcontrollers of the
STM32L0 Series, STM32L1 Series and STM32L4 Series acting as end devices.
The I-CUBE-LRWAN main features are:
• Easy add-on of the low-power LoRa
®
solution
• Extremely low CPU load
• No latency requirements
• Small STM32L0 Series memory footprint
This application note describes the set of AT commands for the B-L072Z-LRWAN1
Discovery board embedding the CMWX1ZZABZ-091 LoRa
®
module.
This document explains how to interface with the LoRaWAN™ to manage the LoRa
®
wireless link using AT commands.
For more information on the LoRa
®
embedded expansion software (I-CUBE-LRWAN)
implementation on the STM32Lx Series, refer to the user manual STM32 LoRa™ software
expansion for STM32Cube (UM2073), available at www.st.com.
www.st.com

Contents AN4967
2/37 AN4967 Rev 4
Contents
1 Acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 Reference documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4 AT commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.1 General commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
4.1.1 AT: attention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.1.2 AT?: short help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.1.3 ATZ: MCU reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2 Keys, IDs and EUIs management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2.1 AT+APPEUI: application identifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2.2 AT+APPKEY: application key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2.3 AT+APPSKEY: application session key . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2.4 AT+DADDR: device address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2.5 AT+DEUI: device EUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.2.6 AT+NWKID: network ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.2.7 AT+NWKSKEY: network session key . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.3 Joining and sending data on LoRa
®
network . . . . . . . . . . . . . . . . . . . . . . 16
4.3.1 AT+CFM: confirm mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.3.2 AT+CFS: confirm status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.3.3 AT+JOIN: join LoRa
®
network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.3.4 AT+NJM: LoRa
®
network join mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.3.5 AT+NJS: LoRa
®
network join status . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.3.6 AT+RECV: last received text data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.3.7 AT+RECVB: last received binary data . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.3.8 AT+SEND: send text data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3.9 AT+SENB: send binary data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.4 LoRa
®
network management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.4.1 AT+ADR: adaptive rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.4.2 AT+CLASS: LoRa
®
class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.4.3 AT+DCS: duty cycle settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.4.4 AT+DR: data rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

AN4967 Rev 4 3/37
AN4967 Contents
3
4.4.5 AT+JN1DL: join delay on RX window 1 . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.4.6 AT+JN2DL: join delay on RX window 2 . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.4.7 AT+PNM: public network mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.4.8 AT+RX1DL: delay of the received window 1 . . . . . . . . . . . . . . . . . . . . . 24
4.4.9 AT+RX2DL: delay of the received window 2 . . . . . . . . . . . . . . . . . . . . . 24
4.4.10 AT+RX2DR: data rate of the received window 2 . . . . . . . . . . . . . . . . . . 25
4.4.11 AT+RX2FQ: frequency of the received window 2 . . . . . . . . . . . . . . . . . 25
4.4.12 AT+TXP: transmit power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.5 Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.5.1 AT+BAT: battery level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.5.2 AT+RSSI: RSSI on reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.5.3 AT+SNR: signal noise ratio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.5.4 AT+VER: version of the firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.6 RF tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.6.1 AT+TRSSI: Start Radio Frequency RSSI Tone test . . . . . . . . . . . . . . . . 28
4.6.2 AT+TTONE: Start Radio Frequency Tone test . . . . . . . . . . . . . . . . . . . . 28
4.6.3 AT+TTLRA: Start RF Tx LoRa
®
test . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.6.4 AT+TRLRA: Start RF Rx LORA test . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.6.5 AT+TCONF: Config LoRa
®
RF test . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.6.6 AT+TOFF: Stop ongoing Radio Frequency test . . . . . . . . . . . . . . . . . . . 30
4.6.7 AT+CERTIF: Set the module in LoRaWAN™ Certification Mode . . . . . 30
5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.1 Join and send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.2 Confirmation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.3 Receiving data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
6 Embedded software description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.1 Firmware overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.2 LPUART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.3 Compilation switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.3.1 Debug switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
6.4 Footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

List of tables AN4967
4/37 AN4967 Rev 4
List of tables
Table 1. List of acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Table 2. Link check command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Table 3. Short help command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Table 4. MCU reset command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Table 5. Application identifier command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Table 6. Application key command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Table 7. Application session key command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Table 8. Device address command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Table 9. Device EUI command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Table 10. Network ID command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Table 11. Network session key command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Table 12. Confirm mode command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Table 13. Confirm status command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Table 14. Join LoRa
®
network command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Table 15. LoRa
®
network join mode command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Table 16. LoRa
®
network join status command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Table 17. Last received text data command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Table 18. Last received binary data command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Table 19. Send text data command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Table 20. Send binary data command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Table 21. Adaptive rate command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Table 22. LoRa
®
class command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 23. Duty cycle settings command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 24. Data rate command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Table 25. Join delay on RX window 1 command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Table 26. Join delay on RX window 2 command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Table 27. Public network mode command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Table 28. Delay of the received window 1 command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Table 29. Delay of the received window 2 command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Table 30. Data rate of the received window 2 command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Table 31. Frequency of the received window 2 command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Table 32. Transmit power command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Table 33. Battery level command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Table 34. RSSI on reception command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Table 35. Signal noise ratio command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Table 36. Version of the firmware command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Table 37. Start Radio Frequency RSSI Tone command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Table 38. Start Radio Frequency Tone test command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Table 39. Start RF Tx LoRa
®
test command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Table 40. Start RF Rx LoRa
®
test command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Table 41. Config LoRa
®
RF test command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Table 42. Stop Radio Frequency test command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Table 43. Set the module in LoRaWAN™ Certification Mode command . . . . . . . . . . . . . . . . . . . . . . 30
Table 44. Compilation switch options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Table 45. AT_slave footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Table 46. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

AN4967 Rev 4 5/37
AN4967 List of figures
5
List of figures
Figure 1. Terminal emulation mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 2. AT master mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 3. Tera Term port setup example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 4. Tera Term terminal setup example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
剩余36页未读,继续阅读














glsoft2006
- 粉丝: 53
- 资源: 16
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
最新资源
- Xilinx SRIO详解.pptx
- Informatica PowerCenter 10.2 for Centos7.6安装配置说明.pdf
- 现代无线系统射频电路实用设计卷II 英文版.pdf
- 电子产品可靠性设计 自己讲课用的PPT,包括设计方案的可靠性选择,元器件的选择与使用,降额设计,热设计,余度设计,参数优化设计 和 失效分析等
- MPC5744P-DEV-KIT-REVE-QSG.pdf
- 通信原理课程设计报告(ASK FSK PSK Matlab仿真--数字调制技术的仿真实现及性能研究)
- ORIGIN7.0使用说明
- 在VMware Player 3.1.3下安装Redhat Linux详尽步骤
- python学生信息管理系统实现代码
- 西门子MES手册 13 OpcenterEXCR_PortalStudio1_81RB1.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制

评论0