当前位置:网站首页>【BW16 应用篇】安信可BW16模组/开发板AT指令实现MQTT通讯
【BW16 应用篇】安信可BW16模组/开发板AT指令实现MQTT通讯
2022-07-07 06:51:00 【安信可科技】
前言
本文主要介绍安信可BW16模组/开发板运行combo AT固件,借助EMQ服务器实现MQTT通讯的操作过程。
1 固件烧录
固件烧录部分参考文档:安信可BW16模组与开发板更新固件烧录说明,这里不在赘述。
combo固件获取链接:https://docs.ai-thinker.com/rtl87xx

2 EMQ服务器搭建
2.1 软件获取
EMQX软件获取链接:https://www.emqx.com/en/try?product=broker,用户可根据安装的系统类型,以及版本号下载安装包。
2.2 启动EMQ服务
解压安装包,将文件夹放置到指定路径,打开bin文件夹的路径,运行指令:emqx start

浏览器访问url:localhost:18083
打开 WebSocket Client 界面,点击 connect,连接成功以后,便可开始调试

3 设备端联网配置
3.1 AT指令配置
AT+WMODE=3,1 #设置wifi模式为AP_STA
AT+WJAP="SSID","PASSWORD" #配置连接室内wifi
AT+MQTT=1,mqtt_url #配置访问的MQTT服务器url
AT+MQTT=2,1883 #配置服务器访问端口号
AT+MQTT=3,1 #配置MQTT连接方式,默认1:表示TCP
AT+MQTT=4,001 #配置MQTT用户ID号
AT+MQTT=5,admin #配置MQTT用户名
AT+MQTT=6,public #设置MQTT用户密码
AT+MQTT #连接MQTT
AT+MQTTSUB=pub_topic,0 #订阅指导主题
AT+MQTTPUB=pub_topic,0,0,123456 #向指导主题发布数据
效果如下:
3.2 信息交互
在Dashboard界面上,配置好sub以及pub的各项参数:
这里模组订阅主题为 “sub_topic” 的消息,而Dashboard终端则订阅主题为 “pub_topic” 的消息,之后,模组发布主题为 “pub_topic” 的消息,Dashboard终端则则发布主题为 “sub_topic” 的消息,效果如下:
联系我们
以上就是本期分享的内容,目的在于让大家快速适应新品方案的开发,更多资料可从我们官网上获取。
官方官网:https://www.ai-thinker.com
开发资料:https://docs.ai-thinker.com/
官方论坛:http://bbs.ai-thinker.com
技术支持:[email protected]
边栏推荐
- What is the use of PMP certificate?
- Pytest+request+allure+excel interface automatic construction from 0 to 1 [familiar with framework structure]
- 数据库多表关联查询问题
- 战略合作|SubQuery 成为章鱼网络浏览器的秘密武器
- Entity of cesium data visualization (Part 1)
- Unity shader (to achieve a simple material effect with adjustable color attributes only)
- 信息安全实验三 :PGP邮件加密软件的使用
- 牛客网——华为题库(61~70)
- STM32 clock system
- Locust performance test 2 (interface request)
猜你喜欢

Sublime Text4 download the view in bower and set the shortcut key

12、 Sort

答案在哪里?action config/Interceptor/class/servlet

浏览器中如何让视频倍速播放

Dynamics 365Online ApplicationUser创建方式变更

如何使用clipboard.js库实现复制剪切功能

Information Security Experiment 1: implementation of DES encryption algorithm

Binary tree high frequency question type

Netease Cloud Wechat applet

Kubernetes cluster capacity expansion to add node nodes
随机推荐
Huawei HCIP - datacom - Core 03 jours
Storage of data in memory
【云原生】DevOps(一):DevOps介绍及Code工具使用
The configuration and options of save actions are explained in detail, and you won't be confused after reading it
C language pointer (Part 1)
Unittest simple project
**grafana安装**
How to pass the PMP Exam in a short time?
golang select机制和超时问题怎么解决
Serializer & modelserializer of DRF serialization and deserialization
牛客网——华为题库(61~70)
Locust performance test 5 (analysis)
Run can start normally, and debug doesn't start or report an error, which seems to be stuck
Unity shader (basic concept)
scrapy爬虫mysql,Django等
Jenkins task grouping
Loxodonframework quick start
flinkcdc 用sqlclient可以指定mysqlbinlog id执行任务吗
Schema-validation: wrong column type encountered in column XXX in table XXX
MySQL common statements