//技小新 www.jixin.pro 学电子,找小新。技小新有最新的模块,有最新的教程!
//MQTT单片机编程 小工具由 <零妖> 精心打造,BUG反馈问题探讨在技新瓜棚。或者QQ:1827702167
//连接报文:
unsigned char MQTT_Connect[]={ 0x10,0x95,0x01,0x00,0x04,0x4d,0x51,0x54,0x54,0x04,
0xc2,0x00,0x64,0x00,0x3d,0x46,0x45,0x53,0x41,0x32,
0x33,0x34,0x46,0x42,0x44,0x53,0x32,0x34,0x7c,0x73,
0x65,0x63,0x75,0x72,0x65,0x6d,0x6f,0x64,0x65,0x3d,
0x33,0x2c,0x73,0x69,0x67,0x6e,0x6d,0x65,0x74,0x68,
0x6f,0x64,0x3d,0x68,0x6d,0x61,0x63,0x73,0x68,0x61,
0x31,0x2c,0x74,0x69,0x6d,0x65,0x73,0x74,0x61,0x6d,
0x70,0x3d,0x37,0x38,0x39,0x7c,0x00,0x20,0x47,0x35,
0x59,0x43,0x70,0x31,0x47,0x6e,0x34,0x70,0x67,0x45,
0x6f,0x76,0x48,0x4a,0x4d,0x37,0x62,0x79,0x26,0x61,
0x31,0x44,0x44,0x54,0x74,0x57,0x6e,0x68,0x6c,0x46,
0x00,0x28,0x30,0x39,0x62,0x66,0x31,0x37,0x61,0x32,
0x65,0x61,0x32,0x34,0x62,0x37,0x30,0x62,0x38,0x36,
0x65,0x35,0x31,0x64,0x36,0x63,0x65,0x66,0x66,0x31,
0x37,0x63,0x65,0x64,0x39,0x39,0x39,0x33,0x64,0x38,
0x32,0x36,};
//连接成功服务器返回报文:
unsigned char MQTT_Connect_Reply[]={0x20,0x02,0x00,0x00,};
//设备发送心跳包:
unsigned char MQTT_Heart[]={0xc0,0x00};
//服务器回复心跳:
unsigned char MQTT_Heart_Reply[]={0xd0,0x00};
//断开连接报文:
unsigned char MQTT_DisConnect[]={ 0xe0,0x00,};
//属性上报TOPIC报文:
unsigned char MQTT_Post_Property[]={ 0x30,0xce,0x01,0x00,0x3f,0x2f,0x73,0x79,0x73,0x2f,
0x61,0x31,0x44,0x44,0x54,0x74,0x57,0x6e,0x68,0x6c,
0x46,0x2f,0x47,0x35,0x59,0x43,0x70,0x31,0x47,0x6e,
0x34,0x70,0x67,0x45,0x6f,0x76,0x48,0x4a,0x4d,0x37,
0x62,0x79,0x2f,0x74,0x68,0x69,0x6e,0x67,0x2f,0x65,
0x76,0x65,0x6e,0x74,0x2f,0x70,0x72,0x6f,0x70,0x65,
0x72,0x74,0x79,0x2f,0x70,0x6f,0x73,0x74,0x7b,0x0a,
0x20,0x20,0x20,0x20,0x22,0x69,0x64,0x22,0x20,0x3a,
0x20,0x22,0x37,0x38,0x39,0x22,0x2c,0x0a,0x20,0x20,
0x20,0x20,0x22,0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,
0x22,0x3a,0x22,0x31,0x2e,0x30,0x22,0x2c,0x0a,0x20,
0x20,0x20,0x20,0x22,0x70,0x61,0x72,0x61,0x6d,0x73,
0x22,0x20,0x3a,0x20,0x7b,0x0a,0x20,0x20,0x20,0x20,
0x20,0x20,0x20,0x20,0x22,0x49,0x6e,0x64,0x6f,0x6f,
0x72,0x54,0x65,0x6d,0x70,0x65,0x72,0x61,0x74,0x75,
0x72,0x65,0x22,0x3a,0x2b,0x31,0x35,0x2e,0x35,0x0a,
0x20,0x20,0x20,0x20,0x7d,0x2c,0x0a,0x20,0x20,0x20,
0x20,0x22,0x6d,0x65,0x74,0x68,0x6f,0x64,0x22,0x3a,
0x22,0x74,0x68,0x69,0x6e,0x67,0x2e,0x65,0x76,0x65,
0x6e,0x74,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,
0x79,0x2e,0x70,0x6f,0x73,0x74,0x22,0x0a,0x7d,};
//订阅服务器TOPIC报文(响应设备上报属性用TOPIC):
unsigned char MQTT_Sub_Property[]={ 0x82,0x4a,0x00,0x7b,0x00,0x45,0x2f,0x73,0x79,0x73,
0x2f,0x61,0x31,0x44,0x44,0x54,0x74,0x57,0x6e,0x68,
0x6c,0x46,0x2f,0x47,0x35,0x59,0x43,0x70,0x31,0x47,
0x6e,0x34,0x70,0x67,0x45,0x6f,0x76,0x48,0x4a,0x4d,
0x37,0x62,0x79,0x2f,0x74,0x68,0x69,0x6e,0x67,0x2f,
0x65,0x76,0x65,0x6e,0x74,0x2f,0x70,0x72,0x6f,0x70,
0x65,0x72,0x74,0x79,0x2f,0x70,0x6f,0x73,0x74,0x5f,
0x72,0x65,0x70,0x6c,0x79,0x00,};
//订阅成功服务器返回报文:
unsigned char MQTT_Sub_Property_Success[]={0x90,0x03,0x00,0x7B,0x01,};
//取消订阅服务器TOPIC报文(响应设备上报属性用TOPIC):
unsigned char MQTT_UnSub_Property[]={ 0xa2,0x49,0x01,0xc8,0x00,0x45,0x2f,0x73,0x79,0x73,
0x2f,0x61,0x31,0x44,0x44,0x54,0x74,0x57,0x6e,0x68,
0x6c,0x46,0x2f,0x47,0x35,0x59,0x43,0x70,0x31,0x47,
0x6e,0x34,0x70,0x67,0x45,0x6f,0x76,0x48,0x4a,0x4d,
0x37,0x62,0x79,0x2f,0x74,0x68,0x69,0x6e,0x67,0x2f,
0x65,0x76,0x65,0x6e,0x74,0x2f,0x70,0x72,0x6f,0x70,
0x65,0x72,0x74,0x79,0x2f,0x70,0x6f,0x73,0x74,0x5f,
0x72,0x65,0x70,0x6c,0x79,};
//取消成功服务器返回报文:
unsigned char MQTT_UnSub_Property_Success[]={0xB0,0x02,0x01,0xC8,};
//服务器回复报文(响应设备上报属性):
unsigned char MQTT_Post_Property_Reply[]={ 0x30,0x9c,0x01,0x00,0x45,0x2f,0x73,0x79,0x73,0x2f,
0x61,0x31,0x44,0x44,0x54,0x74,0x57,0x6e,0x68,0x6c,
0x46,0x2f,0x47,0x35,0x59,0x43,0x70,0x31,0x47,0x6e,
0x34,0x70,0x67,0x45,0x6f,0x76,0x48,0x4a,0x4d,0x37,
0x62,0x79,0x2f,0x74,0x68,0x69,0x6e,0x67,0x2f,0x65,
0x76,0x65,0x6e,0x74,0x2f,0x70,0x72,0x6f,0x70,0x65,
0x72,0x74,0x79,0x2f,0x70,0x6f,0x73,0x74,0x5f,0x72,
0x65,0x70,0x6c,0x79,0x7b,0x0a,0x22,0x6d,0x65,0x74,
0x68,0x6f,0x64,0x22,0x3a,0x22,0x74,0x68,0x69,0x6e,
0x67,0x2e,0x73,0x65,0x72,0x76,0x69,0x63,0x65,0x2e,
0x70,0x72,0x6f,0x70,0x65,0x72,0x74,0x79,0x2e,0x73,
0x65,0x74,0x22,0x2c,0x0a,0x22,0x69,0x64,0x22,0x3a,
0x22,0x39,0x32,0x37,0x32,0x35,0x30,0x22,0x2c,0x0a,
0x22,0x70,0x61,0x72,0x61,0x6d,0x73,0x22,0x3a,0x20,
0x7b,0x22,0x4c,0x69,0x67,0x68,0x74,0x53,0x77,0x69,
0x74,0x63,0x68,0x22,0x3a,0x31,0x7d,0x0a,0x7d,};
//事件上报TOPIC报文:
unsigned char MQTT_Post_Matter[]={ 0x30,0xdb,0x01,0x00,0x4c,0x2f,0x73,0x79,0x73,0x2f,
0x61,0x31,0x44,0x44,0x54,0x74,0x57,0x6e,0x68,0x6c,
0x46,0x2f,0x47,0x35,0x59,0x43,0x70,0x31,0x47,0x6e,
0x34,0x70,0x67,0x45,0x6f,0x76,0x48,0x4a,0x4d,0x37,
0x62,0x79,0x2f,0x74,0x68,0x69,0x6e,0x67,0x2f,0x65,
0x76,0x65,0x6e,0x74,0x2f,0x7b,0x74,0x73,0x6c,0x2e,
0x65,0x76,0x65,0x6e,0x74,0x2e,0x69,0x64,0x65,0x6e,
0x74,0x69,0x66,0x65,0x72,0x7d,0x2f,0x70,0x6f,0x73,
0x74,0x7b,0x0a,0x20,0x20,0x20,0x20,0x22,0x69,0x64,
0x22,0x20,0x3a,0x20,0x22,0x37,0x38,0x39,0x22,0x2c,
0x0a,0x20,0x20,0x20,0x20,0x22,0x76,0x65,0x72,0x73,
0x69,0x6f,0x6e,0x22,0x3a,0x22,0x31,0x2e,0x30,0x22,
0x2c,0x0a,0x20,0x20,0x20,0x20,0x22,0x70,0x61,0x72,
0x61,0x6d,0x73,0x22,0x20,0x3a,0x20,0x7b,0x0a,0x20,
0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x22,0x49,0x6e,
0x64,0x6f,0x6f,0x72,0x54,0x65,0x6d,0x70,0x65,0x72,
0x61,0x74,0x75,0x72,0x65,0x22,0x3a,0x2b,0x31,0x35,
0x2e,0x35,0x0a,0x20,0x20,0x20,0x20,0x7d,0x2c,0x0a,
0x20,0x20,0x20,0x20,0x22,0x6d,0x65,0x74,0x68,0x6f,
0x64,0x22,0x3a,0x22,0x74,0x68,0x69,0x6e,0x67,0x2e,
0x65,0x76,0x65,0x6e,0x74,0x2e,0x70,0x72,0x6f,0x70,
0x65,0x72,0x74,0x79,0x2e,0x70,0x6f,0x73,0x74,0x22,
0x0a,0x7d,};
//订阅服务器TOPIC报文(响应设备上报事件用TOPIC):
unsigned char MQTT_Sub_Matter[]={ 0x82,0x57,0x00,0x7b,0x00,0x52,0x2f,0x73,0x79,0x73,
0x2f,0x61,0x31,0x44,0x44,0x54,0x74,0x57,0x6e,0x68,
0x6c,0x46,0x2f,0x47,0x35,0x59,0x43,0x70,0x31,0x47,
0x6e,0x34,0x70,0x67,0x45,0x6f,0x76,0x48,0x4a,0x4d,
0x37,0x62,0x79,0x2f,0x74,0x68,0x69,0x6e,0x67,0x2f,
0x65,0x76,0x65,0x6e,0x74,0x2f,0x7b,0x74,0x73,0x6c,
0x2e,0x65,0x76,0x65,0x6e,0x74,0x2e,0x69,0x64,0x65,
0x6e,0x74,0x69,0x66,0x65,0x72,0x7d,0x2f,0x70,0x6f,
0x73,0x74,0x5f,0x72,0x65,0x70,0x6c,0x79,0x00,};
//订阅成功服务器返回报文:
unsigned char MQTT_Sub_Matter_Success[]={0x90,0x03,0x00,0x7B,0x01,};
//取消订阅服务器TOPIC报文(响应设备上报事件用TOPIC):
unsigned char MQTT_UnSub_Matter[]={ 0xa2,0x56,0x01,0xc8,0x00,0x52,0x2f,0x73,0x79,0x73,
0x2f,0x61,0x31,0x44,0x44,0x54,0x74,0x57,0x6e,0x68,
0x6c,0x46,0x2f,0x47,0x35,0x59,0x43,0x70,0x31,0x47,
0x6e,0x34,0x70,0x67,0x45,0x6f,0x76,0x48,0x4a,0x4d,
0x37,0x62,0x79,0x2f,0x74,0x68,0x69,0x6e,0x67,0x2f,
0x65,0x76,0x65,0x6e,0x74,0x2f,0x7b,0x74,0x73,0x6c,
0x2e,0x65,0x76,0x65,0x6e,0x74,0x2e,0x69,0x64,0x65,
0x6e,0x74,0x69,0x66,0x65,0x72,0x7d,0x2f,0x70,0x6f,
0x73,0x74,0x5f,0x72,0x65,0x70,0x6c,0x79,};
//取消成功服务器返回报文:
unsigned char MQTT_UnSub_Matter_Success[]={0xB0,0x02,0x01,0xC8,};
//服务器回复报文(响应设备上报事件):
unsigned char MQTT_Post_Matter_Reply[]={ 0x30,0xa9,0x01,0x00,0x52,0x2f,0x73,0x79,0x73,0x2f,
0x61,0x31,0x44,0x44,0x54,0x74,0x57,0x6e,0x68,0x6c,
0x46,0x2f,0x47,0x35,0x59,0x43,0x70,0x31,0x47,0x6e,
0x34,0x70,0x67,0x45,0x6f,0x76,0x48,0x4a,0x4d,0x37,
0x62,0x79,0x2f,0x74,0x68,0x69,0x6e,0x67,0x2f,0x65,
0x76,0x65,0x6e,0x74,0x2f,0x7b,0x74,0x73,0x6c,0x2e,
0x65,0x76,0x65,0x6e,0x74,0x2e,0x69,0x64,0x65,0x6e,
0x74,0x69,0x66,0x65,0x72,0x7d,0x2f,0x70,0x6f,0x73,
0x74,0x5f,0x72,0x65,0x70,0x6c,0x79,0x7b,0x0a,0x22,
0x6d,0x65,0x74,0x68,0x6f,0x64,0x22,0x3a,0x22,0x74,
0x68,0x69,0x6e,0x67,0x2e,0x73,0x65,0x72,0x76,0x69,
0x63,0x65,0x2e,0x70,0x72,0x6f,0x70,0x65,0x72,0x74,
0x79,0x2e,0x73,0x65,0x74,0x22,0x2c,0x0a,0x22,0x69,
0x64,0x22,0x3a,0x22,0x39,0x32,0x37,0x32,0x35,0x30,
0x22,0x2c,0x0a,0x22,0x70,0x61,0x72,0x61,0x6d,0x73,
0x22,0x3a,0x20,0x7b,0x22,0x4c,0x69,0x67,0x68,0x74,
0x53,0x77,0x69,0x74,0x63,0x68,0x22,0x3a,0x31,0x7d,
0x0a,0x7d,};
//订阅服务器TOPIC报文(响应“服务器设置设备属性”):
unsigned char MQTT_Sub_SetProperty[]={ 0x82,0x45,0x00,0x7b,0x00,0x40
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录
技小新-MQTT单片机编程小工具.zip (47个子文件)
技小新-MQTT单片机编程小工具
geoservices
qtgeoservices_esri.dll 89KB
qtgeoservices_osm.dll 151KB
qtgeoservices_itemsoverlay.dll 24KB
qtgeoservices_mapbox.dll 68KB
qtgeoservices_nokia.dll 226KB
platforms
qminimal.dll 676KB
qoffscreen.dll 602KB
qwindows.dll 1.1MB
MQTT_Message.h 14KB
geometryloaders
defaultgeometryloader.dll 52KB
gltfgeometryloader.dll 44KB
iconengines
qsvgicon.dll 31KB
sensors
qtsensors_generic.dll 31KB
imageformats
qtiff.dll 320KB
qgif.dll 26KB
qwbmp.dll 20KB
qjpeg.dll 291KB
qicns.dll 33KB
qico.dll 26KB
qwebp.dll 392KB
qsvg.dll 21KB
qtga.dll 21KB
generic
qtuiotouchplugin.dll 53KB
texttospeech
qtexttospeech_sapi.dll 32KB
position
qtposition_winrt.dll 35KB
qtposition_serialnmea.dll 23KB
qtposition_positionpoll.dll 33KB
qtposition_geoclue.dll 79KB
sensorgestures
qtsensorgestures_shakeplugin.dll 21KB
qtsensorgestures_plugin.dll 61KB
sceneparsers
assimpsceneimport.dll 2.96MB
gltfsceneimport.dll 135KB
gltfsceneexport.dll 150KB
playlistformats
qtmultimedia_m3u.dll 23KB
audio
qtaudio_windows.dll 46KB
qtaudio_wasapi.dll 80KB
bearer
qgenericbearer.dll 38KB
styles
qwindowsvistastyle.dll 120KB
mediaservice
dsengine.dll 204KB
wmfengine.dll 43KB
qtmedia_audioengine.dll 47KB
技小新-MQTT单片机编程小工具.exe 14.87MB
printsupport
windowsprintersupport.dll 34KB
sqldrivers
qsqlpsql.dll 57KB
qsqlite.dll 826KB
qsqlodbc.dll 67KB
qsqlmysql.dll 51KB
共 47 条
- 1
libre168
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0