没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
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
- 资源: 15
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Win64OpenSSL-3-3-0.exe
- 课高分程设计-基于C++实现的民航飞行与地图简易管理系统-南京航空航天大学
- 航天器遥测数据故障检测系统python源码+文档说明+数据库(课程设计)
- 北京航空航天大学操作系统课设+ppt+实验报告
- 基于Vue+Echarts实现风力发电机中传感器的数据展示监控可视化系统+源代码+文档说明(高分课程设计)
- 基于单片机的风力发电机转速控制源码
- 基于C++实现的风力发电气动平衡监测系统+源代码+测量数据(高分课程设计)
- 毕业设计- 基于STM32F103C8T6 单片机,物联网技术的太阳能发电装置+源代码+文档说明+架构图+界面截图
- 基于 LSTM(长短期记忆)(即改进的循环神经网络)预测风力发电厂中风力涡轮机产生的功率+源代码+文档说明
- 基于stm32f103+空心杯电机+oled按键+运动算法
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功