alwayson: Hello Keke,
Thank you so much for your response. I increased the loglevel to 7 and observed the below. It seems the message is deleted after being received without getting a chance to be processed ?
The logs are showing SMS checks on a regular basis:
2020-07-13 11:37:25.262,6, GSM1: Checking device for incoming SMS
2020-07-13 11:37:25.262,6, GSM1: Checking if modem is ready
2020-07-13 11:37:25.363,7, GSM1: -> AT
2020-07-13 11:37:25.363,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:37:25.563,7, GSM1: <- AT OK
2020-07-13 11:37:25.563,6, GSM1: Selecting PDU mode
2020-07-13 11:37:25.663,7, GSM1: -> AT+CMGF=0
2020-07-13 11:37:25.664,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:37:25.864,7, GSM1: <- AT+CMGF=0 OK
2020-07-13 11:37:25.864,6, GSM1: Checking memory size
2020-07-13 11:37:25.964,7, GSM1: -> AT+CPMS?
2020-07-13 11:37:25.964,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:37:26.165,7, GSM1: <- AT+CPMS? +CPMS: "SM",0,100,"SM",0,100,"SM",0,100 OK
2020-07-13 11:37:26.165,6, GSM1: Used memory is 0 of 100
2020-07-13 11:37:26.165,6, GSM1: No SMS received
When a short SMS (not multipart) comes in, it shows this:
2020-07-13 11:41:54.173,6, GSM1: Checking device for incoming SMS
2020-07-13 11:41:54.173,6, GSM1: Checking if modem is ready
2020-07-13 11:41:54.273,7, GSM1: -> AT
2020-07-13 11:41:54.273,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:41:54.474,7, GSM1: <- AT OK
2020-07-13 11:41:54.474,6, GSM1: Selecting PDU mode
2020-07-13 11:41:54.574,7, GSM1: -> AT+CMGF=0
2020-07-13 11:41:54.574,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:41:54.775,7, GSM1: <- AT+CMGF=0 OK
2020-07-13 11:41:54.775,6, GSM1: Checking memory size
2020-07-13 11:41:54.875,7, GSM1: -> AT+CPMS?
2020-07-13 11:41:54.875,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:41:55.076,7, GSM1: <- AT+CPMS? +CPMS: "SM",1,100,"SM",1,100,"SM",1,100 OK
2020-07-13 11:41:55.076,6, GSM1: Used memory is 1 of 100
2020-07-13 11:41:55.076,6, GSM1: Trying to get stored message 0
2020-07-13 11:41:55.176,7, GSM1: -> AT+CMGR=0
2020-07-13 11:41:55.176,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:41:55.376,7, GSM1: <- AT+CMGR=0 +CMS ERROR: 321 (Invalid memory index)
2020-07-13 11:41:55.376,6, GSM1: Trying to get stored message 1
2020-07-13 11:41:55.476,7, GSM1: -> AT+CMGR=1
2020-07-13 11:41:55.477,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:41:55.677,7, GSM1: <- AT+CMGR=1 +CMGR: 0,,24 07913396050056F6240B913387177684F800000270311114258005D0323D4D07 OK
2020-07-13 11:41:55.678,5, GSM1: SMS received, From: 44112233445
2020-07-13 11:41:55.678,6, GSM1: Wrote an incoming message file: /var/spool/sms/incoming/GSM1.NxaiZE
2020-07-13 11:41:55.678,7, GSM1: Running eventhandler: /etc/sms/scripts/eventhandlerGSM1 RECEIVED /var/spool/sms/incoming/GSM1.NxaiZE
2020-07-13 11:41:56.447,7, GSM1: Done: eventhandler, execution time 1 sec., status: 0 (0)
2020-07-13 11:41:56.447,3, GSM1: Exec: eventhandler said something:
2020-07-13 11:41:56.447,3, GSM1: ! message within the handler script
2020-07-13 11:41:56.447,6, GSM1: Deleting message 1
When an incoming multi-part SMS arrived (2 parts) it shows this:
2020-07-13 11:37:26.165,6, GSM1: Checking device for incoming SMS
2020-07-13 11:37:26.165,6, GSM1: Checking if modem is ready
2020-07-13 11:37:26.265,7, GSM1: -> AT
2020-07-13 11:37:26.265,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:37:26.466,7, GSM1: <- AT OK
2020-07-13 11:37:26.466,6, GSM1: Selecting PDU mode
2020-07-13 11:37:26.567,7, GSM1: -> AT+CMGF=0
2020-07-13 11:37:26.567,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:37:26.768,7, GSM1: <- AT+CMGF=0 OK
2020-07-13 11:37:26.768,6, GSM1: Checking memory size
2020-07-13 11:37:26.868,7, GSM1: -> AT+CPMS?
2020-07-13 11:37:26.869,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:37:27.069,7, GSM1: <- AT+CPMS? +CPMS: "SM",1,100,"SM",1,100,"SM",1,100 OK
2020-07-13 11:37:27.069,6, GSM1: Used memory is 1 of 100
2020-07-13 11:37:27.069,6, GSM1: Trying to get stored message 0
2020-07-13 11:37:27.169,7, GSM1: -> AT+CMGR=0
2020-07-13 11:37:27.170,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:37:27.370,7, GSM1: <- AT+CMGR=0 +CMS ERROR: 321 (Invalid memory index)
2020-07-13 11:37:27.370,6, GSM1: Trying to get stored message 1
2020-07-13 11:37:27.470,7, GSM1: -> AT+CMGR=1
2020-07-13 11:37:27.471,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:37:27.671,7, GSM1: <- AT+CMGR=1 +CMGR: 0,,159 07913396050056F7640B913387177684F8000002703111733280A0050003E6020162B219AD66BBE172B0A070482C1A8FC8A432269BD16AB61B2E070B0A87C4A2F1884C2A63B219AD66BBE172B0A070482C1A8FC8A432269BD16AB61B2E070B0A87C4A2F1884C2A63B219AD66BBE172B0A070482C1A8FC8A432269BD16AB61B2E070B0A87C4A2F1884C2A63B219AD66BBE172B0A070482C1A8FC8A4128BC562B1582C168B8DC966 OK
2020-07-13 11:37:27.672,5, GSM1: SMS received (part 1/2), From: 441122334455
2020-07-13 11:37:27.672,6, GSM1: Deleting message 1
{... here come a few SMS checks with no SMS received, then: .... }
2020-07-13 11:37:31.892,6, GSM1: Checking device for incoming SMS
2020-07-13 11:37:31.892,6, GSM1: Checking if modem is ready
2020-07-13 11:37:31.992,7, GSM1: -> AT
2020-07-13 11:37:31.992,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:37:32.192,7, GSM1: <- AT OK
2020-07-13 11:37:32.192,6, GSM1: Selecting PDU mode
2020-07-13 11:37:32.293,7, GSM1: -> AT+CMGF=0
2020-07-13 11:37:32.293,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:37:32.493,7, GSM1: <- AT+CMGF=0 OK
2020-07-13 11:37:32.493,6, GSM1: Checking memory size
2020-07-13 11:37:32.593,7, GSM1: -> AT+CPMS?
2020-07-13 11:37:32.594,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:37:32.794,7, GSM1: <- AT+CPMS? +CPMS: "SM",1,100,"SM",1,100,"SM",1,100 OK
2020-07-13 11:37:32.794,6, GSM1: Used memory is 1 of 100
2020-07-13 11:37:32.794,6, GSM1: Trying to get stored message 0
2020-07-13 11:37:32.894,7, GSM1: -> AT+CMGR=0
2020-07-13 11:37:32.894,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:37:33.095,7, GSM1: <- AT+CMGR=0 +CMS ERROR: 321 (Invalid memory index)
2020-07-13 11:37:33.095,6, GSM1: Trying to get stored message 1
2020-07-13 11:37:33.195,7, GSM1: -> AT+CMGR=1
2020-07-13 11:37:33.196,7, GSM1: Command is sent, waiting for the answer
2020-07-13 11:37:33.396,7, GSM1: <- AT+CMGR=1 +CMGR: 0,,67 07913396050066F3640B913387177684F800000270311173328036050003E602026835DB0D978305854362D17844269531D98C56B3DD703958503824168D47645299CD66B3D96C369BCD02 OK
2020-07-13 11:37:33.400,5, GSM1: SMS received (part 2/2), From: 441122334455
2020-07-13 11:37:33.400,6, GSM1: Deleting message 1
Being that the files have been deleted, I don't even get a chance to use a separate script (python for ex.) to try and handle them.
Posting my full smsd.conf just in case:
#devices= GSM1,GSM2
devices= GSM1
logfile = /var/log/smstools/smsd.log
loglevel = 7
delaytime = 0
delaytime_mainprocess = 0
internal_combine = yes
receive_before_send = no
logtime_ms = 1
max_continuous_sending = 200
incoming_utf8 = yes
trust_outgoing = no
stats = /var/log/sms/stats
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
failed = /var/spool/sms/failed
incoming = /var/spool/sms/incoming
sent = /var/spool/sms/sent
mypath = /home/myadm/etc/sms/
autosplit = 3
blocktime = 3
errorsleeptime = 3
[GSM1]
device = /dev/ttyUSB0
report = no
sending_disabled = no
memory_start = 0
send_delay = 0
check_network = 0
voicecall_hangup_ath = yes
hangup_incoming_call = yes
voicecall_ignore_modem_response = yes
regular_run_interval = 60
regular_run_cmd = AT+CSQ
regular_run_logfile = /var/log/smsd_run_GSM1.log
regular_run_loglevel = 7
pin = ignore
status_signal_quality = no
detect_unexpected_input = yes
pre_init = no
incoming = 2
mode = new
queues = ALL,GSM1
baudrate = 4000000
rtscts = yes
cs_convert = yes
decode_unicode_text = yes
internal_combine = yes
eventhandler = /etc/sms/scripts/eventhandlerGSM1
[queues]
ALL = /home/myadm/spool/all
GSM1 = /home/myadm/spool/GSM1
#GSM2 = /home/myadm/spool/GSM2
[provider]
ALL= 0,1,2,3,4,5,6,7,8,9,s
GSM1 = 0
#GSM2 = 0
Please let me know if anything can be done to retrieve the multi-part SMS.
Thanks again very, very much for your help ! :)
|