diff --git a/images/060c748a1a82bbf002fc7e3c899d3920ac4d576b.png b/images/060c748a1a82bbf002fc7e3c899d3920ac4d576b.png new file mode 100644 index 0000000..8caac50 Binary files /dev/null and b/images/060c748a1a82bbf002fc7e3c899d3920ac4d576b.png differ diff --git a/images/12930fa337eaf778a475840c34b9c43473d8489a.png b/images/12930fa337eaf778a475840c34b9c43473d8489a.png new file mode 100644 index 0000000..bff102f Binary files /dev/null and b/images/12930fa337eaf778a475840c34b9c43473d8489a.png differ diff --git a/images/1e5c7b5a0f0916f0a11ed434fbdeb689751416b8.jpeg b/images/1e5c7b5a0f0916f0a11ed434fbdeb689751416b8.jpeg new file mode 100644 index 0000000..1e48eb7 Binary files /dev/null and b/images/1e5c7b5a0f0916f0a11ed434fbdeb689751416b8.jpeg differ diff --git a/images/5b2457c3fa53a7ea4d642a1d35c3ff45caef28aa.png b/images/5b2457c3fa53a7ea4d642a1d35c3ff45caef28aa.png new file mode 100644 index 0000000..004ddd4 Binary files /dev/null and b/images/5b2457c3fa53a7ea4d642a1d35c3ff45caef28aa.png differ diff --git a/images/7ff9c0779ea4b8b03217b0fa493310b0bfb9212c.png b/images/7ff9c0779ea4b8b03217b0fa493310b0bfb9212c.png new file mode 100644 index 0000000..e4d65ca Binary files /dev/null and b/images/7ff9c0779ea4b8b03217b0fa493310b0bfb9212c.png differ diff --git a/images/8fdb77c6c6237fa88719a8b9891a65bc17f9af4c.png b/images/8fdb77c6c6237fa88719a8b9891a65bc17f9af4c.png new file mode 100644 index 0000000..1c62375 Binary files /dev/null and b/images/8fdb77c6c6237fa88719a8b9891a65bc17f9af4c.png differ diff --git a/images/a70b8fd1af5bfe023463bcde9a327e5d4dccb229.png b/images/a70b8fd1af5bfe023463bcde9a327e5d4dccb229.png new file mode 100644 index 0000000..9799987 Binary files /dev/null and b/images/a70b8fd1af5bfe023463bcde9a327e5d4dccb229.png differ diff --git a/images/d08fd530eecba4d7abb0f30cb3b8b5dbd528479c.jpeg b/images/d08fd530eecba4d7abb0f30cb3b8b5dbd528479c.jpeg new file mode 100644 index 0000000..e235adc Binary files /dev/null and b/images/d08fd530eecba4d7abb0f30cb3b8b5dbd528479c.jpeg differ diff --git a/images/df8f067cc06fd98b8c7469d30198397e81d32bd8.png b/images/df8f067cc06fd98b8c7469d30198397e81d32bd8.png new file mode 100644 index 0000000..654be4e Binary files /dev/null and b/images/df8f067cc06fd98b8c7469d30198397e81d32bd8.png differ diff --git a/images/fa38a0bb67e9875c86fdeefa1ff1ec774c996cad.png b/images/fa38a0bb67e9875c86fdeefa1ff1ec774c996cad.png new file mode 100644 index 0000000..62c257c Binary files /dev/null and b/images/fa38a0bb67e9875c86fdeefa1ff1ec774c996cad.png differ diff --git a/公众号/添加微信.md b/公众号/添加微信.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/公众号/添加微信.md @@ -0,0 +1 @@ + diff --git a/公众号/联系我.md b/公众号/联系我.md new file mode 100644 index 0000000..8e562f3 --- /dev/null +++ b/公众号/联系我.md @@ -0,0 +1,27 @@ +## 添加好友 + +> 微信机器人-bot模式 + +**长按文末底部二维码,识别添加好友** + +微信号,接入了微信机器人: `微信对话开放平台` [^1] 以及`ChatGPT`[^2] + +请注意: + +- 微信机器人,24小时*运行在`安卓开发板`上 + +- 白天一般不看消息,`晚上偶尔`一律人工集中处理 + +---[1] Introducing ChatGPT: https://openai.com/blog/chatgpt + +## 加群 + +> 自动邀请加入微信群 + +给`微信个人号` 发送关键词: 加群 + + + +[^1]: 微信对话开放平台: https://chatbot.weixin.qq.com/ + +[^2]: [Introducing ChatGPT](https://openai.com/blog/chatgpt) diff --git a/草稿/4g模块.md b/草稿/4g模块.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/草稿/4g模块.md @@ -0,0 +1 @@ + diff --git a/草稿/EC20发短信.md b/草稿/EC20发短信.md new file mode 100644 index 0000000..02854d1 --- /dev/null +++ b/草稿/EC20发短信.md @@ -0,0 +1,118 @@ +## EC20模块收发短信 + +> 使用4g模块,而不是GSM模块 + +通信运营商允许申请`副卡`,共享主卡的自费套餐,比如电话/短信/流量 + +通常副卡要收费10元/月,没有其他费用 + +但是能拥有一个全新的手机号,用作工作(区分生活)或者注册验证网站也挺好的 + +这个时候往往会遇到问题:比如出门只带一个手机,,或者出省旅游/出国也需要接发短信 + +托管sim卡,正常`收发短信`,就是一个小需求 + +另外,通过底层的AT指令,还可以实现`闪信`,也就是`0级短信`,也成`flash sms` + + + +本篇文章用到的设备 + +- orange pi 3 lts,价格约250 + +- EC20 usb模块 价格约180 (+吸盘天线) + + + +实现的功能 + +- 短信:文本短信/静默短信/闪信 + +- 打电话/tts语音生成 + +- 4g流量网络 + +- gps定位 + + + +--- + +## 串口调试 + +> 串口通信,AT指令 + +windows上下载`串口调试助手`, 回复关键词 `串口`可以获取 + + + +另外发送短信,有`text和pdu模式`,需要对文字和手机号进行编码,可以使用转换工具 + + + +通信模块的AT指令,基本相同,会有细微的差别,可参考相关手册 + + + +--- + +## python调试串口 + +> 使用pyserial设置AT指令 + +```python +import serial +modem = serial.Serial(port='COM8', baudrate=9600) +modem.write(("AT"+"\r\n").encode()) +``` + +注意在windows系统上,设备端口是`COM8`,在linux上的设备一般是`/dev/ttyUSB` + +![](https://hackrobot-1258475618.cos.ap-shenzhen-fsi.myqcloud.com/202304251728281.png) + +> 为什么我不用gammu + +gammu是针对通信模块的框架,安装后,可以自动接受短信,守护进程 + +也可以发短信 + +并且有前端网页,后端数据集成 + +但是,对于配置类的约束,个人更倾向于python控制AT指令,封装成api + +更好的实现业务逻辑,和改造 + +--- + +## 使用telegram bot进行转发 + +> 设置tg机器人,使用get请求即可 + +在telegram + +- 申请一个bot机器人,获取token + +- 创建群组,然后获取群组的chatid + +就可以实现转发message消息 + + + +参考代码 + +```python +import requests +# bot发消息到tg群组 +def sendTg(message): + baseUrl="https://api.telegram.org/bot" + toekn="558659722:AA32A3v8gK23q7R7_nsr8V58Iu-_Z6B232SCw" + chat_id="-861532r23527609" + text=message + url=f'{baseUrl}{toekn}/sendMessage?chat_id={chat_id}&text={text}' + try: + r = requests.get(url) + except: + print('请检查网络') +``` + +最后,别用`中国移动`,趁早携号转网吧