当前位置:网站首页>MQTT---CONNECT连接
MQTT---CONNECT连接
2022-07-15 11:36:00 【haichuangdianzi】
准备内容:
原始材料
{ "ProductKey": "a1fSNCGR0G5",
"DeviceName": "XP001",
"DeviceSecret": "YM3j3foxHjuvX88NCQLY3zy0W9byAwKH" }
阿里云服务器地址(华东2) : *.iot-as-mqtt.cn-shanghai.aliyuncs.com:1883
*表示自己账号的ProductKey注意替换
hmacsha1加密在线计算网站:http://encode.chahuo.com/
客户端ID : *|securemode=3,signmethod=hmacsha1| *表示设备名称
用户名 : *&# *设备名称#ProductKey
密码 :clientId * deviceName * productKey#
进行hmacsha1加密后的结果 *设备名称, #ProductKey
加工后的材料
服务器地址:a1fSNCGR0G5.iot-as-mqtt.cn-shanghai.aliyuncs.com:1883
客户端ID : XP001|securemode=3,signmethod=hmacsha1|
用户名 : XP001&a1fSNCGR0G5
密码:clientIdXP001deviceNameXP001productKeya1fSNCGR0G5
(2f7497cd33b0a9fcee0feeeba1d2f1635d31ca3e)

再次深度加工
服务器地址:a1fSNCGR0G5.iot-as-mqtt.cn-shanghai.aliyuncs.com:1883
客户端ID : XP001|securemode=3,signmethod=hmacsha1|
58 50 30 30 31 7C 73 65 63 75 72 65 6D 6F 64 65 3D 33 2C 73 69 67 6E 6D 65 74 68 6F 64 3D 68 6D 61 63 73 68 61 31 7C
共39个字节0x27
用户名 : XP001&a1fSNCGR0G5
58 50 30 30 31 26 61 31 66 53 4E 43 47 52 30 47 35
共17个字节0x11
密码: 2f7497cd33b0a9fcee0feeeba1d2f1635d31ca3e
32 66 37 34 39 37 63 64 33 33 62 30 61 39 66 63 65 65 30 66 65 65 65 62 61 31 64 32 66 31 36 33 35 64 33 31 63 61 33 65
共40个字节0x28
最终代码
10 70 00 04 4D 51 54 54 04 C2 00 64 00 27 58 50 30 30 31 7C 73 65 63 75 72 65 6D 6F 64 65 3D 33 2C 73 69 67 6E 6D 65 74 68 6F 64 3D 68 6D 61 63 73 68 61 31 7C 00 11 58 50 30 30 31 26 61 31 66 53 4E 43 47 52 30 47 35 00 28 32 66 37 34 39 37 63 64 33 33 62 30 61 39 66 63 65 65 30 66 65 65 65 62 61 31 64 32 66 31 36 33 35 64 33 31 63 61 33 65
连接阿里云服务端

接收20 02 00 00 ,表示云服务器接收成功。
边栏推荐
- 如何在项目中封装 Kotlin + Android Databinding
- Summer learning plan [activities]
- 05 USART发送和接收数据(查询模式)
- [flag] build a website around Li Jian that sorts and classifies by time axis and content (zero basis) (continuous update)
- Which table does MySQL show variables check for data?
- MySql中IGNORE、ON DUPLICATE KEY UPDATE、DELAYED
- 2022-04-18 C Part 4 - Advanced
- Open source real-time data warehouse Apache Doris graduated, how to go further in the future?
- 【综合笔试题】难度 2/5,递归运用及前缀和优化
- 开源实时数仓 Apache Doris 毕业了,未来如何走得更远?
猜你喜欢

配置Sublime的C语言环境

Use iceberg in CDP to pressurize the data Lake warehouse
![[benefit activity] stack a buff for your code! Click](/img/20/ab63e3373367ed3cecebd90d3bbb29.jpg)
[benefit activity] stack a buff for your code! Click "tea" to receive the gift

Apple and former design director Jony lve parted ways

Tiktok launched "group purchase and distribution" to explore a new model of takeout

2022-04-21 Unity入门8——音效系统

MySQL的隔离级别

Figure 1: four directions and three strategies for digital transformation of state-owned enterprises

Kotlin 插件的落幕,ViewBinding 的崛起

How to choose the appropriate automated testing tools?
随机推荐
2022-04-18 unity getting started 1 - window layout
【招募】2022向光奖|年度ESG影响力投资奖正式启动!
558. 四叉树交集 : 简单递归运用题
Twitter vs musk: it's not that easy to leave
Golang problem summary
STM32与物联网02-网络数据收发
CDeC-Net代码实现
开源实时数仓 Apache Doris 毕业了,未来如何走得更远?
毕业即失业?
可落地的DDD(7)-战术设计上的一些误区
2022-04-21 unity foundation 2 - important content of monobehavior
2022-04-20 unity introduction 5 - Camera
Alipay sandbox app login failed. There is no problem with the account
二分查找(下)
燕窝经济的乌云与混沌
可落地的DDD(7)-战术设计上的一些误区
Kotlin 插件的落幕,ViewBinding 的崛起
2022-04-20 unity entry 6 - light source components
Follow up by Dutch depositors
02 STM32CubeMX新建工程