我们的操作系统是运行在 i.MX6 上的 Yocto 2.4 Rocko。为了测试 SIMCOM SIM7600JC-H LTE 模块,我们安装了 NetworkManager v1.4.4、ModemManager v1.6.4 和 pppd v2.4.7。
我们测试了 SIM7600JC-H LTE 功能,它在台湾运行良好,但在日本运行失败。我们试图找出这两个测试之间的区别。我们发现主要原因是如果我们在调制解调器管理器在日本开始运行之前没有将APN设置为LTE模块,它将无法正常工作。因此,如果我将 APN 设置为 LTE 模块,然后在日本启动调制解调器管理器服务,它将运行良好并连接到互联网。
我们认为调制解调器是否处于注册状态是根本原因。如果调制解调器最初没有处于注册状态,然后启动调制解调器管理器,它将无法连接到互联网。
在台湾,不需要给LTE模块设置APN,插入SIM卡开机后,LTE模块就会处于注册状态。
在日本,我们需要给LTE模块设置APN,插入SIM卡开机后,LTE模块就会处于注册状态。
该日志是关于调制解调器管理器工作失败的
Simple connect state (4/8): Wait to get fully enabled
(ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
(ttyUSB2): --> 'ATX4<CR>'
(ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
(ttyUSB2): --> 'AT&C1<CR>'
(ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
loading power state...
(ttyUSB2) device open count is 2 (open)
(ttyUSB2): --> 'AT+CFUN?<CR>'
(ttyUSB2): <-- '<CR><LF>+CFUN: 1<CR><LF><CR><LF>OK<CR><LF>'
No need to change power state: already in 'on' power state
(ttyUSB2) device open count is 1 (close)
(ttyUSB2) device open count is 2 (open)
(ttyUSB2) device open count is 3 (open)
(ttyUSB2): --> 'AT+IFC=1,1<CR>'
(ttyUSB2): <-- '<CR><LF>ERROR<CR><LF>'
Got failure code 100:00:00 Unknown error
(ttyUSB2) device open count is 2 (close)
(ttyUSB2): --> 'AT+CSCS=?<CR>'
(ttyUSB2): <-- '<CR><LF>+CSCS: ("IRA","GSM","UCS2")<CR><LF><CR><LF>OK<CR><LF>'
(ttyUSB2) device open count is 3 (open)
(ttyUSB2) device open count is 2 (close)
(ttyUSB2): --> 'AT+CSCS="UCS2"<CR>'
(ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
(ttyUSB2) device open count is 3 (open)
(ttyUSB2) device open count is 2 (close)
(ttyUSB2): --> 'AT+CSCS?<CR>'
(ttyUSB2): <-- '<CR><LF>+CSCS: UCS2<CR><LF><CR><LF>OK<CR><LF>'
(ttyUSB2) device open count is 1 (close)
Modem has 3GPP capabilities, enabling the Modem 3GPP interface...
Checking indicator support...
(ttyUSB2) device open count is 2 (open)
(ttyUSB2): --> 'AT+CIND=?<CR>'
(ttyUSB2): <-- '<CR><LF>+CIND: ("battchg",(0-5)),("signal",(0-5)),("service",(0-1)),("call",(0-1)),("roam",(0-1)),("smsfull",(0-1)),("GPRS coverage",(0-1)),("callsetup",(0-3))<CR><LF><CR><LF>OK<CR><LF>'
Modem supports signal quality indications via CIND at index '2'(min: 0, max: 5)
Modem supports roaming indications via CIND at index '5'
Modem supports service indications via CIND at index '3'
(ttyUSB2) Setting 3GPP unsolicited events handlers
(ttyUSB3) Setting 3GPP unsolicited events handlers
(ttyUSB2) device open count is 3 (open)
(ttyUSB2) device open count is 2 (close)
(ttyUSB2): --> 'AT+CMER=3,0,0,1<CR>'
(ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
(ttyUSB3) device open count is 2 (open)
(ttyUSB2) device open count is 1 (close)
(ttyUSB3): --> 'AT+CMER=3,0,0,1<CR>'
(ttyUSB3): <-- '<CR><LF>OK<CR><LF>'
(ttyUSB2) device open count is 2 (open)
(ttyUSB3) device open count is 1 (close)
(ttyUSB2): --> 'AT+CNSMOD=1<CR>'
(ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
(ttyUSB2): --> 'AT+AUTOCSQ=1,1<CR>'
(ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
(ttyUSB2) setting up 3GPP unsolicited registration messages handlers
(ttyUSB3) setting up 3GPP unsolicited registration messages handlers
(ttyUSB2) device open count is 1 (close)
(ttyUSB2) device open count is 2 (open)
(ttyUSB2): --> 'AT+CREG=2<CR>'
(ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
(ttyUSB3) device open count is 2 (open)
(ttyUSB2) device open count is 1 (close)
(ttyUSB3): --> 'AT+CREG=2<CR>'
(ttyUSB3): <-- '<CR><LF>OK<CR><LF>'
(ttyUSB2) device open count is 2 (open)
(ttyUSB3) device open count is 1 (close)
(ttyUSB2): --> 'AT+CGREG=2<CR>'
(ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
(ttyUSB3) device open count is 2 (open)
(ttyUSB2) device open count is 1 (close)
(ttyUSB3): --> 'AT+CGREG=2<CR>'
(ttyUSB3): <-- '<CR><LF>OK<CR><LF>'
(ttyUSB3) device open count is 1 (close)
Modem has 3GPP/USSD capabilities, enabling the Modem 3GPP/USSD interface...
(ttyUSB2) Setting unsolicited result code handlers
(ttyUSB3) Setting unsolicited result code handlers
(ttyUSB2) device open count is 2 (open)
(ttyUSB2): --> 'AT+CUSD=1<CR>'
(ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
(ttyUSB2) device open count is 1 (close)
Modem has location capabilities, enabling the Location interface...
Need to enable the following location sources: '3gpp-lac-ci'
Running registration checks (CS: 'yes', PS: 'yes', EPS: 'no')
(ttyUSB2) device open count is 2 (open)
Modem has messaging capabilities, enabling the Messaging interface...
(ttyUSB2) device open count is 3 (open)
(ttyUSB2): --> 'AT+CREG?<CR>'
(ttyUSB2): <-- '<CR><LF>+CREG: 2,2<CR><LF><CR><LF>OK<CR><LF>'
Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (unknown -> searching)
Will start keeping track of state for subsystem '3gpp'
(ttyUSB2) device open count is 4 (open)
(ttyUSB2) device open count is 3 (close)
(ttyUSB2): --> 'AT+CMGF=?<CR>'
(ttyUSB2): <-- '<CR><LF>+CMGF: (0-1)<CR><LF><CR><LF>OK<CR><LF>'
(ttyUSB2) device open count is 4 (open)
(ttyUSB2) device open count is 3 (close)
(ttyUSB2): --> 'AT+CGREG?<CR>'
(ttyUSB2): <-- '<CR><LF>+CGREG: 2,2<CR><LF><CR><LF>OK<CR><LF>'
(ttyUSB2) device open count is 2 (close)
(ttyUSB2): --> 'AT+CMGF=0<CR>'
(ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
Successfully set preferred SMS mode: 'PDU'
(ttyUSB2) device open count is 3 (open)
(ttyUSB2) device open count is 2 (close)
(ttyUSB2): --> 'AT+CPMS="SR","ME","ME"<CR>'
(ttyUSB2): <-- '<CR><LF>+CPMS: 0,20,1,23,1,23<CR><LF><CR><LF>OK<CR><LF>'
Listing SMS parts in storage 'me'
Locking SMS storages to: mem1 (ME), mem2 (none)...
(ttyUSB2) device open count is 3 (open)
(ttyUSB2) device open count is 2 (close)
(ttyUSB2): --> 'AT+CPMS="ME"<CR>'
(ttyUSB2): <-- '<CR><LF>+CPMS: 1,23,1,23,1,23<CR><LF><CR><LF>OK<CR><LF>'
(ttyUSB2) device open count is 3 (open)
(ttyUSB2) device open count is 2 (close)
(ttyUSB2): --> 'AT+CMGL=4<CR>'
(ttyUSB2): <-- '<CR><LF>+CMGL: 0,1,"",151<CR><LF>0891180945123470F42414D0B01A0C87C3C160B11A0E0008918051518543638096FB8A71756A53F7FF1A00380031003800300032003100350038003400380038003525C630AD30FCFF1A0053004100430046002D005300500043004C002D0043003400390042002D0035004500410032002D003800320037003525C600550052004CFF1A0068007400740070003A002F002F0077006200720074002E006A0070<CR><LF><CR><LF>OK<CR><LF>'
Parsing PDU (0)...
SMSC address parsed: '+8190542143074'
Deliver type PDU detected
Number parsed: '05088800158'
PID: 0
user data encoding is UCS2
user data length: 128 elements
user data length: 128 bytes
Decoding SMS text with '128' elements
Converting SMS part text from UCS-2BE to UTF8...
Got UTF-8 text: '????:818021584885???:SACF-SPCL-C49B-5EA2-8275?URL:http://wbrt.jp'
Correctly parsed PDU 0
SMS part at 'me/0' is from a singlepart SMS
Added received SMS at '/org/freedesktop/ModemManager1/SMS/0'
Listing SMS parts in storage 'sm'
Locking SMS storages to: mem1 (SM), mem2 (none)...
(ttyUSB2) device open count is 3 (open)
(ttyUSB2) device open count is 2 (close)
(ttyUSB2): --> 'AT+CPMS="SM"<CR>'
(ttyUSB2): <-- '<CR><LF>+CPMS: 4,20,1,23,1,23<CR><LF><CR><LF>OK<CR><LF>'
(ttyUSB2) device open count is 3 (open)
(ttyUSB2) device open count is 2 (close)
(ttyUSB2): --> 'AT+CMGL=4<CR>'
(ttyUSB2): <-- '<CR><LF>+CMGL: 0,1,"",161<CR><LF>0891180945123460F64012D04E2A15447C0E9FCD270008913010116561638B0608049E6A0401301030C930B330E2304B3089306E304A77E53089305B3011000D000A672C30E130FC30EB306F682A5F0F4F1A793E004E0054005430C930B330E2304B3089901A4FE16599712165993067914D4FE1305730663044307E30593002000D000A000D000A304A5BA269D8306E7AEF672B304C30C930B330E2306E30CD30C330C830EF30FC30AF<CR><LF>+CMGL: 1,1,"",161<CR><LF>0891180945123460F64012D04E2A15447C0E9FCD270008913010116561638B0608049E6A0402306B6B633057304F3064306A304C3063305F305330683092304A77E53089305B3044305F3057307E30593002000D000A000D000A0073007030E230FC30C93092305452297528306E969B306F300130A230AF30BB30B930DD30A430F330C83092300C00730070006D006F00640065002E006E0065002E006A0070300D306B8A2D5B9A3057<CR><LF>+CMGL: 2,1,"",161<CR><LF>0891180945123460F64012D04E2A15447C0E9FCD270008913010116561638B0608049E6A04033066304F3060305530443002000D000A000D000A3088308A5FEB9069306B3054522975283044305F3060304F305F3081306E8A2D5B9A65B96CD530016CE8610F4E8B98053001554F5408305B51487B49306B306430443066306F30014E0B8A1800550052004C3088308A305478BA8A8D304F3060305530443002FF08901A4FE165996709<CR><LF>+CMGL: 3,1,"",145<CR><LF>0891180945123460F64412D04E2A15447C0E9FCD270008913010116561637B0608049E6A04046599FF09000D000A0068007400740070003A002F002F0073006500720076006900630065002E0073006D0074002E0064006F0063006F006D006F002E006E0065002E006A0070002F0073006900740065002F006D00610069006C002F007300720063002F00630063006E002E00680074006D006C<CR><LF><CR><LF>OK<CR><LF>'
Parsing PDU (0)...
SMSC address parsed: '+8190542143066'
Deliver type PDU detected
Number parsed: 'NTT DOCOMO'
PID: 0
user data encoding is UCS2
user data length: 139 elements
user data length: 139 bytes
Decoding SMS text with '132' elements
Converting SMS part text from UCS-2BE to UTF8...
Got UTF-8 text: '????????????#015#012?????????NTT???????????????????#015#012#015#012?????????????????'
Correctly parsed PDU 0
SMS part at 'sm/0' is from a multipart SMS (reference: '40554', sequence: '1')
Added received SMS at '/org/freedesktop/ModemManager1/SMS/1'
Parsing PDU (1)...
SMSC address parsed: '+8190542143066'
Deliver type PDU detected
Number parsed: 'NTT DOCOMO'
PID: 0
user data encoding is UCS2
user data length: 139 elements
user data length: 139 bytes
Decoding SMS text with '132' elements
Converting SMS part text from UCS-2BE to UTF8...
Got UTF-8 text: '??????????????????????#015#012#015#012sp?????????????????????spmode.ne.jp?????'
Correctly parsed PDU -1
SMS part at 'sm/1' is from a multipart SMS (reference: '40554', sequence: '2')
Parsing PDU (2)...
SMSC address parsed: '+8190542143066'
Deliver type PDU detected
Number parsed: 'NTT DOCOMO'
PID: 0
user data encoding is UCS2
user data length: 139 elements
user data length: 139 bytes
Decoding SMS text with '132' elements
Converting SMS part text from UCS-2BE to UTF8...
Got UTF-8 text: '??????#015#012#015#012??????????????????????????????????????URL??????????(????'
Correctly parsed PDU -2
SMS part at 'sm/2' is from a multipart SMS (reference: '40554', sequence: '3')
Parsing PDU (3)...
SMSC address parsed: '+8190542143066'
Deliver type PDU detected
Number parsed: 'NTT DOCOMO'
PID: 0
user data encoding is UCS2
user data length: 123 elements
user data length: 123 bytes
Decoding SMS text with '116' elements
Converting SMS part text from UCS-2BE to UTF8...
Got UTF-8 text: '?)#015#012http://service.smt.docomo.ne.jp/site/mail/src/ccn.html'
Correctly parsed PDU -3
SMS part at 'sm/3' is from a multipart SMS (reference: '40554', sequence: '4')
Listing SMS parts in storage 'sr'
Locking SMS storages to: mem1 (SR), mem2 (none)...
(ttyUSB2) device open count is 3 (open)
(ttyUSB2) device open count is 2 (close)
(ttyUSB2): --> 'AT+CPMS="SR"<CR>'
(ttyUSB2): <-- '<CR><LF>+CPMS: 0,20,1,23,1,23<CR><LF><CR><LF>OK<CR><LF>'
(ttyUSB2) device open count is 3 (open)
(ttyUSB2) device open count is 2 (close)
(ttyUSB2): --> 'AT+CMGL=4<CR>'
(ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
(ttyUSB2) Setting messaging unsolicited events handlers
(ttyUSB3) Setting messaging unsolicited events handlers
(ttyUSB2) device open count is 1 (close)
(ttyUSB2) Enabling messaging unsolicited events on primary port
(ttyUSB2) device open count is 2 (open)
(ttyUSB2): --> 'AT+CNMI=2,1,2,1,0<CR>'
(ttyUSB2): <-- '<CR><LF>+CMS ERROR: 303<CR><LF>'
Got failure code 303:00:00 Operation not supported
(ttyUSB2): --> 'AT+CNMI=2,1,2,2,0<CR>'
(ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
(ttyUSB2) Messaging unsolicited events enabled on primary
(ttyUSB3) Enabling messaging unsolicited events on secondary port
(ttyUSB3) device open count is 2 (open)
(ttyUSB2) device open count is 1 (close)
(ttyUSB3): --> 'AT+CNMI=2,1,2,1,0<CR>'
(ttyUSB3): <-- '<CR><LF>+CMS ERROR: 303<CR><LF>'
Got failure code 303:00:00 Operation not supported
(ttyUSB3): --> 'AT+CNMI=2,1,2,2,0<CR>'
(ttyUSB3): <-- '<CR><LF>OK<CR><LF>'
(ttyUSB3) Messaging unsolicited events enabled on secondary
(ttyUSB3) device open count is 1 (close)
Modem has voice capabilities, enabling the Voice interface...
(ttyUSB2) Setting voice unsolicited events handlers
(ttyUSB3) Setting voice unsolicited events handlers
(ttyUSB2) device open count is 2 (open)
(ttyUSB2): --> 'AT+CLIP=1<CR>'
(ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
(ttyUSB2): --> 'AT+CRC=1<CR>'
(ttyUSB2): <-- '<CR><LF>OK<CR><LF>'
(ttyUSB2) device open count is 1 (close)
Modem has time capabilities, enabling the Time interface...
Modem /org/freedesktop/ModemManager1/Modem/0: state changed (enabling -> searching)
Simple connect state (5/8): Register
我们检查并比较了这两个系统日志,发现了一些东西。
如果调制解调器工作失败,日志将显示如下
Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (unknown -> searching)
如果调制解调器运行良好,日志将如下所示
Modem /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state changed (unknown -> registering)
在日志中的两个步骤之间
(1)简单连接状态(4/8):等待完全启用
和
(2)简单连接状态(5/8):注册
我们找不到任何关于将 APN 设置为 LTE 模块的 AT 命令。
是否有网络管理器命令或调制解调器管理器命令来解决问题?或者我必须下载调制解调器管理器源代码并针对日本案例进行修改?