Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@
**AI 工具 · 智能硬件 · 独立开发**,欢迎来聊。本项目的想法、踩坑记录、固件更新第一时间同步:

<p align="center">
加微信 <b>AI-fellows</b>(备注来意,拉你进交流群)
<img src="docs/images/wechat-qr.jpg" width="220" alt="微信二维码:加 AI-fellows"><br/>
微信扫码加 <b>AI-fellows</b>(备注来意,拉你进交流群)
</p>

---
Expand Down Expand Up @@ -305,6 +306,15 @@ PaperColor_Study/

---

<details>
<summary>🔎 关键词 / Keywords</summary>

M5Stack · PaperColor · M5Paper · M5Burner · eInk · E-Ink · E-Paper · 彩色墨水屏 · 电子纸 · Spectra 6 · AC022 · ESP32 · ESP32-S3 · ESP32-S3R8 · PlatformIO · Arduino · C++ · 桌面终端 · Desk Terminal · 学习终端 · 离线中文 TTS · esp-sr · 语音助手 · Voice Assistant · Anki · 间隔记忆 · Spaced Repetition · 考点闪卡 · 番茄钟 · Pomodoro · RSS · 资讯早报 · 黄历 · 农历 · 宜忌 · 天气 · 低功耗 · Low Power · 轻睡眠 · Light Sleep · 智能桌面 · Smart Desk · 固件 · Firmware

</details>

---

## ⭐ 喜欢这个项目?

如果你觉得它有点意思:
Expand Down
4 changes: 2 additions & 2 deletions docs/coding-plan-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ Authorization: Bearer <token>

```ini
use_wifi=true
wifi_ssid=David的iPhone
wifi_ssid=我的手机热点
wifi_pass=12345678
wifi_ssid2=Xiaomi_403A
wifi_ssid2=家里WiFi
wifi_pass2=xxxxxxxx
poll_interval_sec=300
sf_api_key=sk-xxxx
Expand Down
Binary file added docs/images/wechat-qr.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 13 additions & 8 deletions write_hotspot.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# 手动把手机热点 WiFi 写入设备 config(绕过 netsh 检测)
# 用法: py write_hotspot.py "<SSID>" "<密码>"
# 保留原 Xiaomi_403A 作为第 2 组
# 用法: py write_hotspot.py "<热点SSID>" "<热点密码>" [家里SSID 家里密码]
# 凭据只走命令行参数,不写进代码(避免泄露)
import serial, time, os, sys

PORT = 'COM4'
Expand All @@ -11,8 +11,10 @@ def main():
if len(sys.argv) >= 3:
hot_ssid, hot_pass = sys.argv[1], sys.argv[2]
else:
hot_ssid, hot_pass = 'David的iPhone', '111222333' # 默认
print('热点: %s | %s' % (hot_ssid, hot_pass))
print('用法: py write_hotspot.py "<热点SSID>" "<热点密码>" [家里SSID 家里密码]')
sys.exit(1)
home_ssid, home_pass = (sys.argv[3], sys.argv[4]) if len(sys.argv) >= 5 else ('', '')
print('热点: %s' % hot_ssid)

token_file = os.path.join(HERE, 'zhipu_token.txt')
token = open(token_file, encoding='utf-8').read().strip()
Expand All @@ -28,10 +30,13 @@ def main():
"sd_log_enabled=true",
"wifi_ssid=%s" % hot_ssid, # 第1组 = 热点
"wifi_pass=%s" % hot_pass,
"wifi_ssid2=Xiaomi_403A", # 第2组 = 家里
"wifi_pass2=Dp15555550987",
"zhipu_cookie=%s" % token,
]
if home_ssid:
config_lines += [
"wifi_ssid2=%s" % home_ssid, # 第2组 = 家里
"wifi_pass2=%s" % home_pass,
]
config_lines.append("zhipu_cookie=%s" % token)
config = '\n'.join(config_lines) + '\n'

s = serial.Serial(PORT, 115200, timeout=1)
Expand Down Expand Up @@ -87,7 +92,7 @@ def send_ack(cmd, ack, timeout=4):
d = s.read(256)
print('验证:', d.decode('utf-8', 'replace').strip() if d else '(no reply)')
s.close()
print('[OK] config.ini 已写入(第1组=%s 第2组=Xiaomi_403A)' % hot_ssid)
print('[OK] config.ini 已写入(第1组=%s%s)' % (hot_ssid, (' 第2组=' + home_ssid) if home_ssid else ''))

if __name__ == '__main__':
main()
Loading