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 Mar 01, 2021 06:51
SMSTools3 Community » Help and support Bottom

[answered] Unexpected input: +ZUnsupport:

  This topic is locked

Page:  1

Author Post
Member
Registered:
Jul 2010
Location: Brazil
Operating system name and version: Debian lenny
Version of smsd: v3.1.11
Smsd installed from: sources
Name and model of a modem / phone: Onda MSA110up
Interface: USB

I bought a new modem. It sends and receive SMS.After some time, start appearing in the log: "Unexpected input: +ZUnsupport: 6; +ZEND +ZEND"

here is the log:



here is my config file:

devices = GSM2
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
incoming = /var/spool/sms/incoming
logfile = /var/log/smsd.log
infofile = /var/run/smstools/smsd.working
pidfile = /var/run/smstools/smsd.pid
failed = /var/spool/sms/failed
sent = /var/spool/sms/sent
stats = /var/log/smstools/smsd_stats
report = /var/spool/sms/reports

date_filename = 2

receive_before_send = no
autosplit = 3

[GSM1]
device = /dev/modem
init = AT+CPMS="ME","ME","ME"
init2 = AT+CNMI=2,0,0,1,0
incoming = yes
baudrate = 115200
mode = new
cs_convert = yes
memory_start = 0

[GSM2]
device = /dev/gsmmodem
incoming = yes
baudrate = 115200
mode = new
cs_convert = yes
report = yes
 
'smsdconf' Syntax Highlight powered by GeSHi


I need some help to add the init line and to receive the reports.



detailed log:



sorry for my bad english

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Those +Zsomething messages are from the STK (SIM application toolkit), and should be disabled. With a fast view I did not find how to disable those messages. You can try a modem setting detect_unexpected_input = no, but it probably is not enough because those messages will be still included in the answers, and it's not a good situation.

When you send SMS with Report: yes, how does your modem handle reports currently?

Member
Registered:
Jul 2010
Location: Brazil
Topic owner
Quote
You can try a modem setting detect_unexpected_input = no, but it probably is not enough because those messages will be still included in the answers, and it's not a good situation.

I add detect_unexpected_input in modem setting and now the log is clean.
You said those kind of messages "+Zsomething" is not good. What should I do?

I changed the loglevel to 7 and now the log is like this:

Hidden private text.



I'll send a SMS and post here the log later because now I'm busy.

One last question: This modem should have initialization?

thanks

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
There are 12 messages in the device, but CMGR does not give any of them, only OK is returned or ERROR after the index is 50 or more. You could try with a modem setting check_memory_method = 31. If it still does not return anything, add the initialization init = AT+CPMS="SM","SM","SM" and try again.

gugudl wrote
You said those kind of messages "+Zsomething" is not good. What should I do?

Disable them, but how - I do not know :( ...

Member
Registered:
Jul 2010
Location: Brazil
Topic owner
I add check_memory_method = 31 and the error message disappear but the report folder remains empty. I tried the initialization init = AT+CPMS="SM","SM","SM" and got nothing.

here is the log when I send a SMS:

Hidden private text.



When I remove the check_memory_method = 31 from the config file, the error mention before start again.

any idea?

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
When you used the setting check_memory_method = 31 alone, without init string, and did not receive any status reports, you still received those 12 "normal" messages, right? In the incoming directory you do have those messages?

As your modem has "SR" memory available, you could try dual-memory-handler with the following settings:

primary_memory = SM
secondary_memory = SR


After restarting the smsd, do you now have those reports stored?

Member
Registered:
Jul 2010
Location: Brazil
Topic owner
It did work!!!

With this dual-memory setting now everythings is perfect!

I still have one last question:
How can I know which report is from which SMS? I mean, in the report's folder, there are many files with weird names and each file's report has been generated from a SMS. How can I know which report refers to which SMS?
it has something to do with the message_id?

sorry if I dont made myself clear.

thanks

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Yes, the message_id is the key, and of course the GSM number too.

When a report is received, the following code in eventhandler can be used to store timestamp to the sent message:

#!/bin/bash

if [ "$1" = "REPORT" ]; then
  SENTDIR=/var/spool/sms/sent
  if grep "Status: 0" $2 >/dev/null; then
    FROM=`formail -zx From: < $2`
    RECEIVED=`formail -zx Received: < $2`
    TMPFILE=`mktemp /tmp/smsd_XXXXXX`
    formail -I "" < $2 | sed -e"1,2d" > $TMPFILE
    MESSAGE_ID=`formail -zX Message_id: < $TMPFILE`
    grep -lx "$MESSAGE_ID" $SENTDIR/* > $TMPFILE
    cat $TMPFILE | while read FNAME; do
      OLDRECEIVED=`formail -zx Received: < ${FNAME}`
      if [ "$OLDRECEIVED" = "" ]; then
        TO=`formail -zx To: < ${FNAME}`
        if [ "$TO" = "$FROM" ]; then
          TMPFILE2=`mktemp /tmp/smsd_XXXXXX`
          cp ${FNAME} $TMPFILE2
          formail -f -I "Received: $RECEIVED" < $TMPFILE2 > ${FNAME}
          unlink $TMPFILE2
        fi
      fi
    done
    unlink $TMPFILE
  fi
fi
 
'bash' Syntax Highlight powered by GeSHi


  This topic is locked

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.