gammu处理一个PI3而不是另一个PI3



我有两台树莓PI 3机器:

  • raspberrypi01
  • raspberrypi05

带有中兴MF112 USB卡和英国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 =

有什么想法吗?

问题是第一个设备没有尝试连接到网络。这可能有几个原因:

  • 正在等待PIN,您可以使用gammu getsecuritystatus进行检查
  • 它没有配置为连接到网络,这是一些中兴设备的问题,Gammu可以打开这个,但到目前为止你的型号还没有被识别(我在9740d70中修复了这个问题)
  • SIM卡还有其他问题,它在其他设备上工作吗

相关内容

  • 没有找到相关文章

最新更新