我有两台 Raspberry PI 3 机器:
- 树莓派01
- 树莓派05
带有 ZTE MF112 USB 卡和 UK 3 SIM。
“05” PI3 工作正常,但“01” PI1 根本不工作。请参阅以下命令的输出:
pi@raspberrypi01:/tmp $ sudo gammu identify
Device : /dev/ttyUSB1
Manufacturer : ZTE CORPORATION
Model : unknown (MF112)
Firmware : BD_P671A2V1.0.2B05
IMEI : 864592000347386
SIM IMSI : 234200208677663
pi@raspberrypi01:/tmp $ sudo gammu monitor 1
Press Ctrl+C to break...
Entering monitor mode...
Enabling info about incoming SMS : No error.
Enabling info about incoming CB : No error.
Enabling info about calls : No error.
Enabling info about USSD : No error.
SIM phonebook : 0 used, 250 free
Dialled numbers : 10 used, 0 free
Received numbers : 0 used, 10 free
Missed numbers : 0 used, 10 free
Own numbers : 1 used, 5 free
Phone phonebook : 0 used, 100 free
Battery level : 100 percent
Charge state : powered from battery
Signal strength : -109 dBm
Network level : 6 percent
SIM SMS status : 0 used, 0 unread, 30 locations
Phone SMS status : 3 used, 0 unread, 100 locations
Network state : not logged into network
Packet network state : not logged into network
GPRS : detached
Leaving monitor mode...
pi@raspberrypi01:/tmp $ sudo gammu networkinfo
Network state : not logged into network
Packet network state : not logged into network
GPRS : detached
pi@raspberrypi01:/tmp $
尝试在上述消息上发送短信会出现此错误:
pi@raspberrypi01:~ $ echo "Test from HA" | sudo gammu sendsms TEXT 05555555555
If you want break, press Ctrl+C...
Sending SMS 1/1....waiting for network answer..error 500, message reference=-1
Unknown error.
但这一个有效:
pi@raspberrypi05:~ $ sudo gammu identify
Device : /dev/ttyUSB1
Manufacturer : ZTE CORPORATION
Model : unknown (MF112)
Firmware : BD_P671A2V1.0.2B05
IMEI : 864592000347386
SIM IMSI : 234200208677663
pi@raspberrypi05:~ $ sudo gammu monitor 1
Press Ctrl+C to break...
Entering monitor mode...
Enabling info about incoming SMS : No error.
Enabling info about incoming CB : No error.
Enabling info about calls : No error.
Enabling info about USSD : No error.
SIM phonebook : 0 used, 250 free
Dialled numbers : 10 used, 0 free
Received numbers : 0 used, 10 free
Missed numbers : 0 used, 10 free
Own numbers : 1 used, 5 free
Phone phonebook : 0 used, 100 free
Battery level : 100 percent
Charge state : powered from battery
Signal strength : -113 dBm
Network level : 0 percent
SIM SMS status : 0 used, 0 unread, 30 locations
Phone SMS status : 3 used, 0 unread, 100 locations
Network state : home network
Network : 234 20 (Three, United Kingdom), LAC 79, CID D6C8F0
Name in phone : "3 UK"
Packet network state : home network
Packet network : 234 20 (Three, United Kingdom), LAC 79, CID D6C8F0
Name in phone : "3 UK"
GPRS : attached
Leaving monitor mode...
pi@raspberrypi05:~ $ sudo gammu networkinfo
Network state : home network
Network : 234 20 (Three, United Kingdom), LAC 79, CID D6C8F0
Name in phone : "3 UK"
Packet network state : home network
Packet network : 234 20 (Three, United Kingdom), LAC 79, CID D6C8F0
Name in phone : "3 UK"
GPRS : attached
这个工作正常:
pi@raspberrypi05:~ $ echo "Test from HA" | sudo gammu sendsms TEXT 05555555555
If you want break, press Ctrl+C...
Sending SMS 1/1....waiting for network answer..OK, message reference=56
pi@raspberrypi05:~ $
两者上“/root/.gammurc”的内容是:
[gammu]
port = /dev/ttyUSB1
model = at
connection = at115200
synchronizetime = yes
logfile = /tmp/gammu.log
logformat = textalldate
use_locking = yes
gammuloc =
有任何想法吗?