update
This commit is contained in:
parent
59ec2ee6b7
commit
9a3c732836
33
README.txt
33
README.txt
|
@ -1,33 +0,0 @@
|
|||
Hyperspace by HTML5 UP
|
||||
html5up.net | @ajlkn
|
||||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
|
||||
|
||||
So I've had the wireframe for this particular design kicking around for some time, but with all
|
||||
the other interesting (and in some cases, semi-secret) projects I've been working on it took me
|
||||
a little while to get to actually designing and coding it. Fortunately, things have eased up
|
||||
enough for me to finaly get around to it, so I'm happy to introduce Hyperspace: a fun, blocky,
|
||||
one-page design with a lot of color, a bit of animation, and an additional "generic" page template
|
||||
(because hey, even one-page sites usually need an interior page or two). Hope you dig it :)
|
||||
|
||||
Demo images* courtesy of Unsplash, a radtastic collection of CC0 (public domain) images
|
||||
you can use for pretty much whatever.
|
||||
|
||||
(* = not included)
|
||||
|
||||
AJ
|
||||
aj@lkn.io | @ajlkn
|
||||
|
||||
|
||||
Credits:
|
||||
|
||||
Demo Images:
|
||||
Unsplash (unsplash.com)
|
||||
|
||||
Icons:
|
||||
Font Awesome (fontawesome.io)
|
||||
|
||||
Other:
|
||||
jQuery (jquery.com)
|
||||
Scrollex (github.com/ajlkn/jquery.scrollex)
|
||||
Responsive Tools (github.com/ajlkn/responsive-tools)
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,145 @@
|
|||
# HackDock 用户手册
|
||||
|
||||
## 简介
|
||||
|
||||
你可以从各种设备(服务器、电脑等)向 HackDock 发送指令,以控制 HackDock 的 LED 亮灭、蜂鸣器发声等。
|
||||
|
||||
## 外观介绍
|
||||
|
||||
![](images/hackdock_description_0.png)
|
||||
|
||||
![](images/hackdock_description_1.png)
|
||||
|
||||
|
||||
|
||||
## 配置并连接 Wi-Fi
|
||||
|
||||
HackDock 使用串口进行配置。
|
||||
|
||||
打开任意串口调试工具,例如 [串口调试助手](https://apps.microsoft.com/store/detail/%E4%B8%B2%E5%8F%A3%E8%B0%83%E8%AF%95%E5%8A%A9%E6%89%8B/9NBLGGH43HDM?hl=zh-cn&gl=cn),选择正确的端口,配置波特率为 115200,连接 HackDock。
|
||||
|
||||
请使用字符串模式与 HackDock 通讯。
|
||||
|
||||
配置指令的每一条都以 `AT` 开头,英文分号 `;` 结尾。指令内部不要出现空格、换行,不能出现非标准 ASCII 码以外的字符。
|
||||
|
||||
配置指令列表,下表中类似 `<ssid>` 的模块,请替换为实际值,**不要加尖括号**:
|
||||
|
||||
| 指令格式 | 返回值示意 | 解释 |
|
||||
|---------|------|------|
|
||||
| `AT;` | OK | ping 测试 |
|
||||
| `AT+SETSSID=<ssid>;` | SSID: xxxx | 配置 WiFi SSID |
|
||||
| `AT+SETPASS=<pass>;` | Password: xxxx | 配置 WiFi 密码 |
|
||||
| `AT+SETIP=<ipv4>;` | IP: 192.168.1.2 | 配置设备 IP |
|
||||
| `AT+SETNETMASK=<ipv4>;` | Net mask: 255.255.255.0 | 配置设备子网掩码 |
|
||||
| `AT+SETGATEWAY=<ipv4>;` | Gateway: 192.168.1.1 | 配置设备网关 IP |
|
||||
| `AT+SAVECONFIG;` | Saved | 保存配置 |
|
||||
| `AT+CLEARCONFIG;` | Config cleared | 清除所有配置 |
|
||||
| 错误指令 | Bad Command | |
|
||||
| 未实现的功能 | Not implement | |
|
||||
| 指令太长 | Command too long, max 100 bytes | |
|
||||
|
||||
注意:
|
||||
1. `AT+SETSSID=<ssid>;` 和 `AT+SETSSID=<ssid>;` 这两个命令是必须的;
|
||||
2. 如果没有配置 IP、子网掩码、网关,那么设备将以 DHCP 的方式获取 IP,你可以在路由器后台查看设备 IP;
|
||||
3. 务必执行 `AT+SAVECONFIG;` 以保存参数。
|
||||
|
||||
配置参数后,请断电并重新上电,然后设备将连接 WiFi。
|
||||
|
||||
### 上电后的状态
|
||||
|
||||
上电后,LED 0 会以 2Hz 闪烁并尝试连接 WiFi。若未配置参数或无法连接 WiFi,LED 0 会以 8Hz 闪烁。若 LED 0 长时间处于 2Hz 连接状态,请检查 WiFi 环境。
|
||||
|
||||
若连接成功,LED 0 会熄灭。
|
||||
|
||||
## 使用 UDP 控制 HackDock
|
||||
|
||||
设备连接 WiFi 后,可进行 UDP 通讯。设备 IP 请见上一节介绍,UDP 端口为 6666。
|
||||
|
||||
如果仅调试,可以使用 [sokit 工具](https://github.com/sinpolib/sokit) 与 HackDock 进行 UDP 通讯。
|
||||
|
||||
UDP 报文的格式如下,**整数采用小端模式传输**:
|
||||
|
||||
### 请求报文
|
||||
|
||||
请求报文格式为 `[packageId][cmd][index][value]`
|
||||
|
||||
| 字段 | 类型 | 释义 |
|
||||
|------|------|-----|
|
||||
| packageId | uint32_t | 报文序号,由发送方指定,设备会返回相同的序号 |
|
||||
| cmd | uint8_t | 详见下方“控制字” |
|
||||
| index | uint16_t | 详见下方“参数请求列表” |
|
||||
| value | uint32_t | 详见下方“参数请求列表” |
|
||||
|
||||
### 响应报文
|
||||
|
||||
响应报文格式为 `[packageId][code][value]`
|
||||
|
||||
| 字段 | 类型 | 释义 |
|
||||
|------|------|-----|
|
||||
| packageId | uint32_t | 报文序号,返回请求的序号 |
|
||||
| code | uint8_t | 详见下方“响应码” |
|
||||
| value | uint32_t | 详见下方“参数响应列表” |
|
||||
|
||||
### 控制字
|
||||
|
||||
| 控制字 | 含义 |
|
||||
|-------|------|
|
||||
| 0x00 | 读取 |
|
||||
| 0x01 | 写入 |
|
||||
|
||||
### 响应码
|
||||
|
||||
| 响应码 | 含义 |
|
||||
|--------|-----|
|
||||
| 0x00 | OK |
|
||||
| 0x01 | 请求格式不正确 |
|
||||
| 0x02 | 不允许的操作 |
|
||||
| 0x03 | 值不允许 |
|
||||
| 0x04 | 内部错误 |
|
||||
| 0x05 | 其他错误 |
|
||||
|
||||
### 参数请求列表
|
||||
|
||||
| 参数 | 含义 | 支持的控制字 | value 的取值范围 |
|
||||
|------|-----|-------------|-----------------|
|
||||
| 0x0000 | ping | 0x00 | 任意 |
|
||||
| 0x0001 | 读取设备类型 | 0x00 | 任意 |
|
||||
| 0x1000 | 设定 LED 0 的状态 | 0x01 | 0: 常亮;1:8Hz 闪烁;2:2Hz 闪烁;3:0.5Hz 闪烁;4:常灭 |
|
||||
| 0x1001 | 设定 LED 1 的状态 | 0x01 | 0: 常亮;1:8Hz 闪烁;2:2Hz 闪烁;3:0.5Hz 闪烁;4:常灭 |
|
||||
| 0x1010 | 设定蜂鸣器状态 | 0x01 | 0:常鸣;1:滴滴响;2:静音 |
|
||||
| 0x1020 | 设定自定义引脚 0 的状态 | 0x01 | 0:输出低电平;1:输出高电平 |
|
||||
| 0x1021 | 设定自定义引脚 1 的状态 | 0x01 | 0:输出低电平;1:输出高电平 |
|
||||
| 0x2000 | 读取按键距离上次按下的毫秒数 | 0x00 | 任意 |
|
||||
|
||||
### 参数响应列表
|
||||
|
||||
| 参数 | 含义 | value 的值 |
|
||||
|------|-----|-------------|
|
||||
| 0x0000 | pong | 0x19260817 |
|
||||
| 0x0001 | 返回设备类型 | 27 |
|
||||
| 0x1000 | 设定成功 | 0 |
|
||||
| 0x1001 | 设定成功 | 0 |
|
||||
| 0x1010 | 设定成功 | 0 |
|
||||
| 0x1020 | 设定成功 | 0 |
|
||||
| 0x1021 | 设定成功 | 0 |
|
||||
| 0x2000 | 返回按键距离上次按下的毫秒数 | 距离上次按下的毫秒数 |
|
||||
|
||||
### 请求示例
|
||||
|
||||
例如,我想让 LED 1 以 2Hz 闪烁,可发送下述 UDP 报文:
|
||||
|
||||
```
|
||||
[0x01 0x00 0x00 0x00 0x01 0x01 0x10 0x02 0x00 0x00 0x00]
|
||||
```
|
||||
|
||||
## 特殊功能
|
||||
|
||||
### 按键静音
|
||||
|
||||
在任何情况下,短按功能按键,可以将蜂鸣器静音。
|
||||
|
||||
## 注意事项
|
||||
|
||||
1. 如果以极高频率向串口发送数据,可能会丢帧(除非你使用程序自动发送,否则手动很难出现这个问题)
|
||||
2. UDP 报文发送请保证 100ms 以上的间隔,否则可能会丢包
|
||||
3. 自定义引脚没有安全防护,请多次检查避免短路或接触到高电压!
|
Binary file not shown.
After Width: | Height: | Size: 902 KiB |
Binary file not shown.
After Width: | Height: | Size: 718 KiB |
Binary file not shown.
After Width: | Height: | Size: 609 KiB |
231
index.html
231
index.html
|
@ -5,120 +5,133 @@
|
|||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>切个电子 - 定制化极客电子小铺</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
||||
<link rel="stylesheet" href="assets/css/main.css" />
|
||||
<link rel="shortcut icon" href="favicon.ico" />
|
||||
<noscript><link rel="stylesheet" href="assets/css/noscript.css" /></noscript>
|
||||
</head>
|
||||
<body class="is-preload">
|
||||
|
||||
<!-- Sidebar -->
|
||||
<section id="sidebar">
|
||||
<div class="inner">
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="#intro">欢迎光临</a></li>
|
||||
<li><a href="#products">产品介绍</a></li>
|
||||
<li><a href="#resource">相关资源</a></li>
|
||||
<head>
|
||||
<title>切个电子 - 极客电子小铺</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
||||
<link rel="stylesheet" href="assets/css/main.css" />
|
||||
<link rel="shortcut icon" href="favicon.ico" />
|
||||
<noscript>
|
||||
<link rel="stylesheet" href="assets/css/noscript.css" />
|
||||
</noscript>
|
||||
</head>
|
||||
|
||||
<body class="is-preload">
|
||||
<section id="sidebar">
|
||||
<div class="inner">
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="#intro">欢迎光临</a></li>
|
||||
<li><a href="#onsale">在售产品</a></li>
|
||||
<li><a href="#experiment">实验产品</a></li>
|
||||
<li><a href="#resource">相关资源</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</section>
|
||||
<div id="wrapper">
|
||||
<section id="intro" class="wrapper fullscreen fade-up">
|
||||
<div class="inner">
|
||||
<h1>切个电子 - 极客电子小铺</h1>
|
||||
<p>我们致力于为极客和开发者创造非同凡响的电子产品,给您的工作生活带来不一样的新品位。</p>
|
||||
<ul class="actions">
|
||||
<li><a href="#onsale" class="button scrolly">在售产品</a></li>
|
||||
<li><a href="#experiment" class="button scrolly">实验产品</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="onsale" class="wrapper style2 spotlights">
|
||||
<section>
|
||||
<a href="topuino.html" class="image"><img src="images/topuino_sample.jpg" alt="" data-position="center center" /></a>
|
||||
<div class="content">
|
||||
<div class="inner">
|
||||
<h2>Topuino</h2>
|
||||
<p>Topuino 是一个桌面小摆件,可以实现通用服务器或计算机的数据监控,包括 CPU 占用、RAM 占用、两个硬盘的可用空间、硬盘读写速度、网络 IO 速率。</p>
|
||||
<ul class="actions">
|
||||
<li><a href="topuino.html" class="button">了解更多</a></li>
|
||||
<li><a href="https://item.taobao.com/item.htm?id=684695145616" class="button">立即购买</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Wrapper -->
|
||||
<div id="wrapper">
|
||||
|
||||
<!-- Intro -->
|
||||
<section id="intro" class="wrapper style1 fullscreen fade-up">
|
||||
<div class="inner">
|
||||
<h1>切个电子 - 定制化极客电子小铺</h1>
|
||||
<p>我们致力于创造非同凡响的电子产品,给您的工作生活带来不一样的新品位。</p>
|
||||
<ul class="actions">
|
||||
<li><a href="#products" class="button scrolly">产品介绍</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- One -->
|
||||
<section id="products" class="wrapper style2 spotlights">
|
||||
<section>
|
||||
<a href="topuino.html" class="image"><img src="images/topuino_sample.jpg" alt="" data-position="center center" /></a>
|
||||
<div class="content">
|
||||
<div class="inner">
|
||||
<h2>Topuino</h2>
|
||||
<p>Topuino 是一个桌面小摆件,可以实现通用服务器或计算机的数据监控,包括 CPU 占用、RAM 占用、两个硬盘的可用空间、硬盘读写速度、网络 IO 速率。</p>
|
||||
<ul class="actions">
|
||||
<li><a href="topuino.html" class="button">了解更多</a></li>
|
||||
<li><a href="https://qiegedianzi.taobao.com/" class="button">立即购买</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<a href="mapuino.html" class="image"><img src="images/mapuino_sample.jpg" alt="" data-position="top center" /></a>
|
||||
<div class="content">
|
||||
<div class="inner">
|
||||
<h2>Mapuino</h2>
|
||||
<p>Mapuino 是一个简单的摆件,或者叫“玩具”。你可以在自己的个人博客、主页或者任何可以插入个性代码的社交网站(如 V2EX)上添加一行 URL,然后就可以在 Mapuino 上观赏全国哪些地方的人正在访问你的网站。</p>
|
||||
<ul class="actions">
|
||||
<li><a href="mapuino.html" class="button">了解更多</a></li>
|
||||
<li><a href="" class="button">敬请期待</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<!-- Two -->
|
||||
<section id="resource" class="wrapper style3 fade-up">
|
||||
<div class="inner">
|
||||
<h2>相关资源</h2>
|
||||
<p>我们提供了产品相关的各种资源:</p>
|
||||
<div class="features">
|
||||
<section>
|
||||
<span class="icon solid major fa-code"></span>
|
||||
<h3>Telegram 交流群</h3>
|
||||
<p><a href="https://t.me/qiegedianzi" class="button">点击加入</a></p>
|
||||
</section>
|
||||
<section>
|
||||
<span class="icon solid major fa-lock"></span>
|
||||
<h3>QQ 交流群</h3>
|
||||
<p>群号 702769921</p>
|
||||
</section>
|
||||
<section>
|
||||
<span class="icon solid major fa-cog"></span>
|
||||
<h3>产品论坛</h3>
|
||||
<p>敬请期待</p>
|
||||
</section>
|
||||
<section>
|
||||
<span class="icon solid major fa-desktop"></span>
|
||||
<h3>本站站长博客</h3>
|
||||
<p><a href="https://blog.vvzero.com" class="button">点击访问</a></p>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer id="footer" class="wrapper style1-alt">
|
||||
<div class="inner">
|
||||
<ul class="menu">
|
||||
<li>© VVZERO.COM. All rights reserved.</li><li>Design: <a href="http://html5up.net">HTML5 UP</a></li>
|
||||
</ul>
|
||||
<section>
|
||||
<a href="hackdock.html" class="image"><img src="images/hackdock_sample.jpg" alt="" data-position="center center" /></a>
|
||||
<div class="content">
|
||||
<div class="inner">
|
||||
<h2>HackDock</h2>
|
||||
<p>HackDock 是一个实体的通知终端,你可以从各种设备(服务器、电脑等)向 HackDock 发送指令,以控制 HackDock 的 LED 亮灭、蜂鸣器发声等。</p>
|
||||
<ul class="actions">
|
||||
<li><a href="hackdock.html" class="button">了解更多</a></li>
|
||||
<li><a href="https://item.taobao.com/item.htm?id=693302754311" class="button">立即购买</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<!-- Scripts -->
|
||||
<script src="assets/js/jquery.min.js"></script>
|
||||
<script src="assets/js/jquery.scrollex.min.js"></script>
|
||||
<script src="assets/js/jquery.scrolly.min.js"></script>
|
||||
<script src="assets/js/browser.min.js"></script>
|
||||
<script src="assets/js/breakpoints.min.js"></script>
|
||||
<script src="assets/js/util.js"></script>
|
||||
<script src="assets/js/main.js"></script>
|
||||
<section id="experiment" class="wrapper style1 spotlights">
|
||||
<section>
|
||||
<div class="content">
|
||||
<div class="inner">
|
||||
<h2>Mapuino</h2>
|
||||
<p>Mapuino 是一个简单的摆件,或者叫“玩具”。你可以在自己的个人博客、主页或者任何可以插入个性代码的社交网站(如 V2EX)上添加一行 URL,然后就可以在 Mapuino 上观赏全国哪些地方的人正在访问你的网站。</p>
|
||||
<ul class="actions">
|
||||
<li><a href="mapuino.html" class="button">了解更多</a></li>
|
||||
<li><a href="" class="button">敬请期待</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<a href="mapuino.html" class="image"><img src="images/mapuino_sample.jpg" alt="" data-position="top center" /></a>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id="resource" class="wrapper style3 fade-up">
|
||||
<div class="inner">
|
||||
<h2>相关资源</h2>
|
||||
<p>我们提供了产品相关的各种资源:</p>
|
||||
<div class="features">
|
||||
<section>
|
||||
<span class="icon solid major fa-code"></span>
|
||||
<h3>Telegram 交流群</h3>
|
||||
<p><a href="https://t.me/qiegedianzi" class="button">点击加入</a></p>
|
||||
</section>
|
||||
<section>
|
||||
<span class="icon solid major fa-lock"></span>
|
||||
<h3>QQ 交流群</h3>
|
||||
<p>群号 702769921</p>
|
||||
</section>
|
||||
<section>
|
||||
<span class="icon solid major fa-cog"></span>
|
||||
<h3>产品论坛</h3>
|
||||
<p>敬请期待</p>
|
||||
</section>
|
||||
<section>
|
||||
<span class="icon solid major fa-desktop"></span>
|
||||
<h3>本站站长博客</h3>
|
||||
<p><a href="https://blog.vvzero.com" class="button">点击访问</a></p>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer id="footer" class="wrapper style1-alt">
|
||||
<div class="inner">
|
||||
<ul class="menu">
|
||||
<li>© VVZERO.COM. All rights reserved.</li>
|
||||
<li>Design: <a href="http://html5up.net">HTML5 UP</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="assets/js/jquery.min.js"></script>
|
||||
<script src="assets/js/jquery.scrollex.min.js"></script>
|
||||
<script src="assets/js/jquery.scrolly.min.js"></script>
|
||||
<script src="assets/js/browser.min.js"></script>
|
||||
<script src="assets/js/breakpoints.min.js"></script>
|
||||
<script src="assets/js/util.js"></script>
|
||||
<script src="assets/js/main.js"></script>
|
||||
</body>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue