随身wifi使用Debian系统通过命令行发送、接收短信
固件:
https://www.123pan.com/s/gYcrVv-Nv8Xv
详见:https://www.coolapk.com/feed/37616461?shareKey=Y2I0MmE5OTBjYWNlNjQ2NTFkNTY~&shareUid=3727115&shareFrom=com.coolapk.market_13.0.1
随身wifi版本:
UFI001c_mb_v01
|
0.调制解调器使用文档
https://www.mankier.com/1/mmcli
1.随身wifi发送短信
1.创建内容为hello word的短信 收件人+123456789
root@openstick:/home/user# sudo mmcli -m 0 --messaging-create-sms="text='Hello world',number='+1234567890'" Successfully created new SMS: /org/freedesktop/ModemManager1/SMS/0
|
2.存储短信sm
root@openstick:/home/user# sudo mmcli -s 1 --store-in-storage="sm" successfully stored the SMS
|
3.读取短信1的内容
root@openstick:/home/user# sudo mmcli -s 1 ----------------------------- General | path: /org/freedesktop/ModemManager1/SMS/1 ----------------------------- Content | number: +1234567890 | text: Hello world ----------------------------- Properties | pdu type: submit | state: stored | storage: sm | delivery report: not requested root@openstick:/home/user#
|
4.列出所有短信
root@openstick:/home/user# sudo mmcli -m 0 --messaging-status ------------------------------- Messaging | supported storages: sm, me | default storages: me root@openstick:/home/user#
|
5.建立短信 text=’文本’,number=’+86手机号’
root@openstick:/home/user# sudo mmcli -m 0 --messaging-create-sms="text='测试使用随身wifilinux发送短信',number='+8615xxxxxxxx24'" Successfully created new SMS: /org/freedesktop/ModemManager1/SMS/0
|
6.发送短信到手机 0表示 sms/0的0
root@openstick:/home/user# sudo mmcli -s 0 --send successfully sent the SMS
|
发送成功后,手机收到短信
7.列出发送的短信
root@openstick:/home/user# sudo mmcli -m 0 --messaging-list-sms /org/freedesktop/ModemManager1/SMS/0 (sent)
|
8.获取单个短信的内容
root@openstick:/home/user# sudo mmcli -s 0 /org/freedesktop/ModemManager1/SMS/0 ------------------------------- General | path: /org/freedesktop/ModemManager1/SMS/0 ------------------------------- Content | number: +8615xxxxxxxx24 | text: 测试使用随身wifilinux发送短信 ------------------------------- Properties | pdu type: submit | state: sent | delivery report: not requested | message reference: 5
|
手机向随机wifi上的这个号码发送短信
9.获取所有短信列表
root@openstick:/home/user# sudo mmcli -m 0 --messaging-list-sms /org/freedesktop/ModemManager1/SMS/2 (received) /org/freedesktop/ModemManager1/SMS/1 (stored) /org/freedesktop/ModemManager1/SMS/0 (sent) #---received 收到的 #---stored存储的 #---sent 发送的
|
10.获取接收到的短信的内容
root@openstick:/home/user# sudo mmcli -s 2 /org/freedesktop/ModemManager1/SMS/2 ----------------------- General | path: /org/freedesktop/ModemManager1/SMS/2 ----------------------- Content | number: +8615xxxxxxxx24 | text: 测试linux接收电短信 ----------------------- Properties | pdu type: deliver | state: received | timestamp: 2023-05-18T13:16:34+08:00 root@openstick:/home/user#
|