我有两台Raspberry PI 3机器:
使用中兴MF112 USB卡和英国3 SIM卡。
“05”PI3工作正常,但“01”PI1根本不起作用。请参阅以下命令的输出:
clear
input units price pack type
32 4 6 1
2 20 18 1
34 5 6 1
32 8 6 0
29 5 6 0
5 10 12 0
7 10 12 0
1 10 18 0
end
reg units price type i.pack
predict yhat
*OR
gen yhat=_b[_cons]+_b[_type]+....??pack??
尝试发送上面的短信会出现此错误:
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
两者中“/root/.gammurc”的内容是:
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:~ $
有什么想法吗?
答案 0 :(得分:0)
问题是第一个设备没有尝试连接到网络。这可能有几个原因:
gammu getsecuritystatus
。