SMS Gateway
来自Jack's Lab
(版本间的差异)
(→Open Source Tools) |
(→Open Source Tools) |
||
第32行: | 第32行: | ||
亦可 /etc/gammurc | 亦可 /etc/gammurc | ||
+ | |||
+ | |||
+ | 测试: | ||
+ | |||
+ | <pre> | ||
+ | $ gammu getallsms #显示sim卡上所有 SMS | ||
+ | |||
+ | Location 100006, folder "收件箱", phone memory, Inbox folder | ||
+ | SMS message | ||
+ | SMSC number : "+8613010374500" | ||
+ | 标记为已发送 : 2013年04月15日 星期一 13时27分16秒 +0800 | ||
+ | Coding : Unicode (no compression) | ||
+ | Remote number : "+85264504220" | ||
+ | Status : 已读 | ||
+ | |||
+ | 您的 Google 验证代码为 002226 | ||
+ | |||
+ | |||
+ | |||
+ | 1 SMS parts in 1 SMS sequences | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | 发送 SMS: | ||
+ | |||
+ | $ gammu sendsms TEXT 15801234567 -textutf8 "testing" | ||
+ | |||
+ | |||
+ | 中英文混合 SMS: | ||
+ | |||
+ | $ gammu sendsms TEXT 15801234567 -unicode -text "testing 测试" | ||
+ | |||
+ | |||
2013年4月16日 (二) 01:44的版本
1 设备
- ZTE MF668 (USB 3G modem)
- Linux x86 server
2 Send/Receive SMS
3 Open Source Tools
使用 gammu
$ apt-get install gammu gammu-smsd
配置 gammu
$ gammu-config Port: /dev/ttyUSB1 Connection: at115200
生成的配置文件默认位于 /root/.gammurc
亦可 /etc/gammurc
测试:
$ gammu getallsms #显示sim卡上所有 SMS Location 100006, folder "收件箱", phone memory, Inbox folder SMS message SMSC number : "+8613010374500" 标记为已发送 : 2013年04月15日 星期一 13时27分16秒 +0800 Coding : Unicode (no compression) Remote number : "+85264504220" Status : 已读 您的 Google 验证代码为 002226 1 SMS parts in 1 SMS sequences
发送 SMS:
$ gammu sendsms TEXT 15801234567 -textutf8 "testing"
中英文混合 SMS:
$ gammu sendsms TEXT 15801234567 -unicode -text "testing 测试"