Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
demo-48-clang
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
demo-48-clang
Commits
c81819ae
Commit
c81819ae
authored
Apr 25, 2018
by
杜祥龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
87481f59
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
3 deletions
+46
-3
README.md
+46
-3
No files found.
README.md
View file @
c81819ae
# 氦氪HEKR模块串口透传协议参考实现
[
氦氪HEKR模块串口透传协议
](
http://docs.hekr.me/v4/%E7%A1%AC%E4%BB%B6%E5%BC%80%E5%8F%91/%E9%80%9A%E4%BF%A1%E5%8D%8F%E8%AE%AE/%E4%B8%B2%E5%8F%A3%E9%80%8F%E4%BC%A0%E5%8D%8F%E8%AE%AE/
)
本项目为
[
氦氪HEKR模块串口透传协议
](
http://docs.hekr.me/v4/%E7%A1%AC%E4%BB%B6%E5%BC%80%E5%8F%91/%E9%80%9A%E4%BF%A1%E5%8D%8F%E8%AE%AE/%E4%B8%B2%E5%8F%A3%E9%80%8F%E4%BC%A0%E5%8D%8F%E8%AE%AE/
)
和
[
48透传协议/2G模块协议
](
http://docs.hekr.me/v4/%E7%A1%AC%E4%BB%B6%E5%BC%80%E5%8F%91/%E9%80%9A%E4%BF%A1%E5%8D%8F%E8%AE%AE/48%E9%80%8F%E4%BC%A0%E5%8D%8F%E8%AE%AE/
)
的参考实现,用于演示使用48协议直接接入HEKR云的设备的具体消息交互流程。
[
48透传协议/2G模块协议
](
http://docs.hekr.me/v4/%E7%A1%AC%E4%BB%B6%E5%BC%80%E5%8F%91/%E9%80%9A%E4%BF%A1%E5%8D%8F%E8%AE%AE/48%E9%80%8F%E4%BC%A0%E5%8D%8F%E8%AE%AE/
)
\ No newline at end of file
## 软件需求
1.
主流发行版的GNU/Linux操作系统
2.
GNU Make
3.
GCC/Clang
## 源码结构
-
`ra_types.h`
:基本类型定义
-
`hekr48trans.c`
、
`hekr48trans.h`
:与云端交互的消息构造接口。
-
`md5sum.c`
、
`md5sum.h`
:构建消息时使用的
**MD5**
实现
实际项目的开发过程中只需要用到以上几个文件对交互使用的消息进行构造。
-
`main.c`
:演示程序入口
-
`Makefile`
:构建文件
-
`README.md`
:本说明文件
-
`usocket.c`
、
`usocket.h`
:演示程序使用的Socket封装。
以上文件只是给出一个使用消息构建接口的简单说明,实际项目中可以参考。
## 构建
克隆源码或者下载源码:
```
bash
git clone http://gitlab.hekr.me/open-source/demo-48-clang.git
cd
demo-48-clang
```
编译:
```
bash
make
```
## 使用
在HEKR云的(console)
[
https://console.hekr.me/
]
平台创建48透传协议的产品,批量生成设备后,填入一组
*prodkey*
、
*devtid*
、
*devprikey*
,观察消息收发过程。
```
bash
./a.out
<prodkey>
<devtid>
<devprikey>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment