简体   繁体   English

如果GSM调制解调器上没有网络怎么办

[英]what happens if no network on GSM modem

I have to send a message for every minute, I'm using telit GE864-GPS modem, my modem will be used in remote places, so my device will write data into GSM modem, and if the message is submitted to destination successfully, I will get a response as +CMGS:, what happens if msg is not submitted to destination due to no network available. 我必须每分钟发送一条消息,我正在使用telit GE864-GPS调制解调器,我的调制解调器将在偏远地区使用,因此我的设备会将数据写入GSM调制解调器,如果消息成功提交到目的地,我会收到+ CMGS:的响应,如果由于没有可用的网络而没有将msg提交到目标,该怎么办。 "will the modem retry to send that message", how to find that network is available for the modem. “调制解调器是否将重试发送该消息”,如何找到调制解调器可用的网络。

The answer to AT+CREG? AT + CREG的答案? will tell you if the device is currently registered on a network. 会告诉您该设备当前是否在网络上注册。 If it's registered on a network, you can send SMSs (assuming your contract allows it). 如果它是在网络上注册的,则可以发送SMS(假设您的合同允许)。 AT+CREG is documented in 3GPP TS 27.007, available from the Specifications page of www.3gpp.org. AT + CREG记录在3GPP TS 27.007中,可从www.3gpp.org的“规范”页面获得。

A quick glance at the 3GPP test specifications shows, that there is no test for the behaviour of an MS (GSM modem) when trying to send a mobile-originated SMS if there is no network. 快速浏览一下3GPP测试规范,就会发现,如果没有网络,则在尝试发送源自移动设备的SMS时,不会测试MS(GSM调制解调器)的行为。 Tests are described here: 3GPP TS 34.123 part 1, section 16. 在此处描述了测试:3GPP TS 34.123第1部分第16节。

Therefore, the quickest thing to do is either (a) ask the manufacturer or (b) just test the behaviour of the device yourself. 因此,最快的方法是(a)向制造商询问或(b)自己测试设备的行为。 Go somewhere without a network, try and send an SMS, wait, go back to where there is a network, and see if the SMS gets sent, what does the device return after a reasonable timeout etc. 到没有网络的地方,尝试发送SMS,等待,返回到有网络的地方,看看SMS是否被发送,在合理的超时后设备返回什么信息等。

Once you know the behaviour of the device, you can design your code, based on checking if there is a network before you send the SMS, waiting for +CMGS and probably a timeout in your code. 知道设备的行为后,您可以根据发送短信之前检查是否存在网络,等待+ CMGS以及代码中可能存在的超时来设计代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM