SMS Server Tools 3
This site is hosted by Kekekasvi.com
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Mon Jun 24, 2024 13:41
SMSTools3 Community » Help and support Bottom

[solved] Error: Unexpected answer from Modem after +CREG?, waiting 1 sec. before retrying

Login and Post Reply

Page:  1

Author Post
Member
Registered:
Jan 2017
Location: Lome, Togo
Operating system name and version[openwrt Chaos Calmer]:
Version of smsd[3.1.15-1]:
Smsd installed from
: package repository
Name and model of a modem : Huawei E182E
Interface
: USB


Hello,

i run smstools3 on openwrt chaos calmer and everything seems fine except the fact that i always get this error whith alarm handler

Error: Unexpected answer from Modem after +CREG?, waiting 1 sec. before retrying

and after that the smstools3 stop running.

Please someone can help me to fix that?

This is my conf file...

#
# Description: Main configuration file for the smsd
#

devices = GSM1
incoming = /www/spool/sms/incoming
outgoing = /www/spool/sms/outgoing
checked = /www/spool/sms/checked
failed = /www/spool/sms/failed
sent = /www/spool/sms/sent
report = /www/spool/sms/report
alarmhandler = /www/spool/handler/alarm
receive_before_send = no
autosplit = 3
loglevel = 4

[GSM1]
init = AT+CPMS="SM","ME","SR"
init2 = AT^SYSCFG=13,1,3FFFFFFF,2,4
device = /dev/ttyUSBmodem
incoming = yes
pin =
baudrate = 115200
report = yes
eventhandler = /www/spool/handler/event
regular_run_interval = 20
regular_run_cmd = AT+CSQ
regular_run_cmd = AT+COPS?
regular_run_statfile = /tmp/status

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Please use loglevel = 7 and show the log.

Member
Registered:
Jan 2017
Location: Lome, Togo
Topic owner
Thanks for fast reply.

Here is the log ( I purge it from
AT+CSQ
2017-01-05 14:26:11,7, GSM1: Command is sent, waiting for the answer
2017-01-05 14:26:11,7, GSM1: <- +CSQ: 13,99 OK
)
Too long...



2017-01-05 14:26:08,6, GSM1: Checking device for incoming SMS
2017-01-05 14:26:08,6, GSM1: Checking if modem is ready
2017-01-05 14:26:09,7, GSM1: -> AT
2017-01-05 14:26:09,7, GSM1: Command is sent, waiting for the answer
2017-01-05 14:26:09,7, GSM1: <- OK
2017-01-05 14:26:09,6, GSM1: Pre-initializing modem
2017-01-05 14:26:09,7, GSM1: -> ATE0+CMEE=1;+CREG=2
2017-01-05 14:26:09,7, GSM1: Command is sent, waiting for the answer
2017-01-05 14:26:10,7, GSM1: <- OK
2017-01-05 14:26:10,6, GSM1: Initializing modem
2017-01-05 14:26:10,7, GSM1: -> AT+CPMS="SM","ME","SR"
2017-01-05 14:26:10,7, GSM1: Command is sent, waiting for the answer
2017-01-05 14:26:10,7, GSM1: <- +CPMS: 1,30,0,0,0,1 OK
2017-01-05 14:26:10,7, GSM1: -> AT^SYSCFG=13,1,3FFFFFFF,2,4
2017-01-05 14:26:10,7, GSM1: Command is sent, waiting for the answer
2017-01-05 14:26:11,7, GSM1: <- OK
2017-01-05 14:26:11,7, GSM1: -> AT+CSQ
2017-01-05 14:26:11,7, GSM1: Command is sent, waiting for the answer
2017-01-05 14:26:11,7, GSM1: <- +CSQ: 13,99 OK
2017-01-05 14:26:11,6, GSM1: Signal Strength Indicator: (13,99) -87 dBm (Workable), Bit Error Rate: not known or not detectable
2017-01-05 14:26:11,6, GSM1: Checking if Modem is registered to the network
2017-01-05 14:26:11,7, GSM1: -> AT+CREG?
2017-01-05 14:26:11,7, GSM1: Command is sent, waiting for the answer
2017-01-05 14:26:22,7, GSM1: put_command expected (\+CREG:.*OK)|(ERROR), timeout occurred. 1.
2017-01-05 14:26:22,7, GSM1: <- COMMAND NOT SUPPORT
2017-01-05 14:26:22,3, GSM1: Error: Unexpected answer from Modem after +CREG?, waiting 1 sec. before retrying
2017-01-05 14:26:22,7, GSM1: Running alarmhandler: /www/spool/handler/alarm ALARM 2017-01-05 14:26:22 3 GSM1 "Error: Unexpected answer from Modem after +CREG?, waiting 1 sec. before retrying"
2017-01-05 14:26:22,7, GSM1: Done: alarmhandler, execution time 0 sec., status: 0 (0)2017-01-05 15:09:34,2, smsd: Smsd mainprocess is awaiting the termination of all modem handlers. PID: 2812.
2017-01-05 15:09:34,2, GSM1: Modem handler 0 terminated. PID: 2813, was started 17-01-05 14:06:03.
2017-01-05 15:09:34,2, smsd: Smsd mainprocess terminated. PID 2812, was started 17-01-05 14:06:03.
2017-01-05 15:09:35,2, smsd: Smsd v3.1.15 started.
2017-01-05 15:09:35,2, smsd: Running as root:root.
2017-01-05 15:09:36,7, smsd: Running startup_check (shell): /www/spool/sms/incoming/smsd_script.JylN1c /tmp/smsd_data.POr7Av
2017-01-05 15:09:36,7, smsd: Done: startup_check (shell), execution time 0 sec., status: 0 (0)
2017-01-05 15:09:36,4, smsd: File mode creation mask: 022 (0644, rw-r--r--).
2017-01-05 15:09:36,5, smsd: Outgoing file checker has started. PID: 30793.
2017-01-05 15:09:36,7, smsd: All PID's: 30793,30794
2017-01-05 15:09:36,5, GSM1: Modem handler 0 has started. PID: 30794.
2017-01-05 15:09:36,5, GSM1: Using check_memory_method 1: CPMS is used.
2017-01-05 15:09:36,6, GSM1: I have to send 1 short message for /www/spool/sms/checked/simplesms_0160715
2017-01-05 15:09:36,6, GSM1: Sending SMS from to 22890392920
2017-01-05 15:09:36,6, GSM1: Checking if modem is ready
2017-01-05 15:09:36,7, GSM1: -> AT
2017-01-05 15:09:36,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:09:36,7, GSM1: <- OK
2017-01-05 15:09:36,6, GSM1: Pre-initializing modem
2017-01-05 15:09:36,7, GSM1: -> ATE0+CMEE=1;+CREG=2
2017-01-05 15:09:36,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:09:37,7, GSM1: <- OK
2017-01-05 15:09:37,6, GSM1: Checking if modem needs PIN
2017-01-05 15:09:37,7, GSM1: -> AT+CPIN?
2017-01-05 15:09:37,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:09:37,7, GSM1: <- +CPIN: READY OK
2017-01-05 15:09:37,6, GSM1: Initializing modem
2017-01-05 15:09:37,7, GSM1: -> AT+CPMS="SM","ME","SR"
2017-01-05 15:09:37,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:09:38,7, GSM1: <- +CPMS: 4,30,0,0,0,1 OK
2017-01-05 15:09:38,7, GSM1: -> AT^SYSCFG=13,1,3FFFFFFF,2,4
2017-01-05 15:09:38,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:09:38,7, GSM1: <- OK
2017-01-05 15:09:38,7, GSM1: -> AT+CSQ
2017-01-05 15:09:38,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:09:39,7, GSM1: <- +CSQ: 12,99 OK
2017-01-05 15:09:39,6, GSM1: Signal Strength Indicator: (12,99) -89 dBm (Workable), Bit Error Rate: not known or not detectable
2017-01-05 15:09:39,6, GSM1: Checking if Modem is registered to the network
2017-01-05 15:09:39,7, GSM1: -> AT+CREG?
2017-01-05 15:09:39,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:09:39,7, GSM1: <- +CREG: 2,1, B, 2B06 OK
2017-01-05 15:09:39,6, GSM1: Modem is registered to the network
2017-01-05 15:09:39,6, GSM1: Location area code: B, Cell ID: 2B06
2017-01-05 15:09:39,7, GSM1: -> AT+CSQ
2017-01-05 15:09:39,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:09:40,7, GSM1: <- +CSQ: 12,99 OK
2017-01-05 15:09:40,6, GSM1: Signal Strength Indicator: (12,99) -89 dBm (Workable), Bit Error Rate: not known or not detectable
2017-01-05 15:09:40,6, GSM1: Selecting PDU mode
2017-01-05 15:09:40,7, GSM1: -> AT+CMGF=0
2017-01-05 15:09:40,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:09:40,7, GSM1: <- OK
2017-01-05 15:09:40,7, GSM1: -> AT+CIMI
2017-01-05 15:09:40,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:09:41,7, GSM1: <- 615010103851049 OK
2017-01-05 15:09:41,7, GSM1: -> AT+CGSN
2017-01-05 15:09:41,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:09:41,7, GSM1: <- 359740021706302 OK
2017-01-05 15:09:41,5, GSM1: CGSN: 359740021706302
2017-01-05 15:09:41,5, GSM1: IMSI: 615010103851049
2017-01-05 15:09:41,6, GSM1: Checking if reading of messages is supported
2017-01-05 15:09:41,7, GSM1: -> AT+CPMS?
2017-01-05 15:09:41,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:09:42,7, GSM1: <- +CPMS: "SM",4,30,"ME",0,0,"SR",0,1 OK
2017-01-05 15:09:42,7, GSM1: -> AT+CMGS=26
2017-01-05 15:09:42,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:09:42,7, GSM1: <- >
2017-01-05 15:09:42,7, GSM1: -> 0031000B912298302929F00000FF0DD4F29C0E72D7DB65F91B9403.
2017-01-05 15:09:42,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:09:45,7, GSM1: <- +CMS ERROR: 500 (Unknown error)
2017-01-05 15:09:45,3, GSM1: The modem answer was not OK: +CMS ERROR: 500 (Unknown error)
2017-01-05 15:09:45,7, GSM1: Running alarmhandler: /www/spool/handler/alarm ALARM 2017-01-05 15:09:45 3 GSM1 "The modem answer was not OK: +CMS ERROR: 500 (Unknown error)"
2017-01-05 15:09:45,7, GSM1: Done: alarmhandler, execution time 0 sec., status: 0 (0)
2017-01-05 15:09:45,3, GSM1: Exec: alarmhandler encountered errors:
2017-01-05 15:09:45,3, GSM1: ! sh: you need to specify whom to kill
2017-01-05 15:09:45,5, GSM1: Waiting 10 sec. before retrying
2017-01-05 15:09:55,6, GSM1: Checking if modem is ready
2017-01-05 15:09:55,7, GSM1: -> AT
2017-01-05 15:09:55,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:09:56,7, GSM1: <- OK
2017-01-05 15:09:59,7, GSM1: -> 0031000B912298302929F00000FF0DD4F29C0E72D7DB65F91B9403.
2017-01-05 15:09:59,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:10:02,7, GSM1: <- +CMS ERROR: 500 (Unknown error)
2017-01-05 15:10:02,3, GSM1: The modem answer was not OK: +CMS ERROR: 500 (Unknown error)
2017-01-05 15:10:02,7, GSM1: Running alarmhandler: /www/spool/handler/alarm ALARM 2017-01-05 15:10:02 3 GSM1 "The modem answer was not OK: +CMS ERROR: 500 (Unknown error)"
2017-01-05 15:10:02,7, GSM1: Done: alarmhandler, execution time 0 sec., status: 0 (0)
2017-01-05 15:10:26,7, GSM1: -> 0031000B912298302929F00000FF0DD4F29C0E72D7DB65F91B9403.
2017-01-05 15:10:26,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:10:29,7, GSM1: <- +CMS ERROR: 500 (Unknown error)
2017-01-05 15:10:29,3, GSM1: The modem answer was not OK: +CMS ERROR: 500 (Unknown error)
2017-01-05 15:10:29,7, GSM1: Running alarmhandler: /www/spool/handler/alarm ALARM 2017-01-05 15:10:29 3 GSM1 "The modem answer was not OK: +CMS ERROR: 500 (Unknown error)"2017-01-05 15:12:18,7, GSM1: <- OK
2017-01-05 15:18:08,6, GSM1: Checking if Modem is registered to the network
2017-01-05 15:18:08,7, GSM1: -> AT+CREG?
2017-01-05 15:18:08,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:18:18,7, GSM1: put_command expected (\+CREG:.*OK)|(ERROR), timeout occurred. 3.
2017-01-05 15:18:18,7, GSM1: <-
2017-01-05 15:18:18,3, GSM1: Error: Unexpected answer from Modem after +CREG?, waiting 1 sec. before retrying
2017-01-05 15:18:18,7, GSM1: Running alarmhandler: /www/spool/handler/alarm ALARM 2017-01-05 15:18:18 3 GSM1 "Error: Unexpected answer from Modem after +CREG?, waiting 1 sec. before retrying"
2017-01-05 15:18:18,7, GSM1: Done: alarmhandler, execution time 0 sec., status: 0 (0)
2017-01-05 15:18:18,3, GSM1: Exec: alarmhandler encountered errors:
2017-01-05 15:18:18,3, GSM1: ! sh: you need to specify whom to kill
2017-01-05 15:18:19,7, GSM1: -> AT+CSQ
2017-01-05 15:18:19,7, GSM1: Command is sent, waiting for the answer
2017-01-05 15:18:30,7, GSM1: put_command expected (OK)|(ERROR), timeout occurred. 4.
2017-01-05 15:18:30,7, GSM1: <-
2017-01-05 15:18:30,7, GSM1: -> AT+CREG?

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Change init = AT+CPMS="SM","SM","SM"

The modem did not answer properly, when status of registration was queried. Later it worked properly, but I think that you could disable the checking with a modem setting check_network = no.

Find out the number of Service Center of your SIM, and define it as a modem setting:
smsc = number in international format

If you still have problems, use a modem setting report_device_details = yes and show those details from the log.

Member
Registered:
Jan 2017
Location: Lome, Togo
Topic owner
I noticed than when i set init = AT+CPMS="SM","SM","SM" the modem can't receive incoming sms and report. I know it's strange but i try many combination and only this one init = AT+CPMS="SM","ME","SR" seems work and stay stable.

For check_network = no, i try it and let you know.
Thanks again

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
<- +CPMS: "SM",4,30,"ME",0,0,"SR",0,1 OK tells that there is no ME storage in the device, and it may be the reason why the sending fails. I think that you could try sending with SM, to see if it works.

If you can send messages with this SIM on your handset, the smsc setting in the SIM likely is correct. However, missing number in configuration has been problem in many cases.

Report_device_details will show important information about memories.

Member
Registered:
Jan 2017
Location: Lome, Togo
Topic owner
Hi sir!

I let the server reun for a few days and <b>check_network = no</> seems work.
Thank a lot for your availability.
You are awesome!
;)

Login and Post Reply

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.