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. Sat May 25, 2024 10:18
SMSTools3 Community » Help and support Bottom

[outdated] put_command expected (OK)|(ERROR), timeout occurred

  This topic is locked

Page:  1

Author Post
Member
Registered:
Jul 2010
Location: Switzerland
Operating system name and version: SUSE11.1 / Ubuntu 10.1 / any
Version of smsd: 3.1.11
Smsd installed from: smstools3.kekekasvi.com site
Name and model of a modem / phone: Multitech MultiModem Wireless EDGE via Ethernet Interface
Interface: LAN


Hello

I would like to send Alert SMSs from eg. a Nagios via my LAN Modem, but even just trying with the sendsms command it only results in this error message in the log file: "put_command expected (OK)|(ERROR), timeout occurred".

My SMSD.CONF

GNU nano 2.0.7 File: /etc/smsd.conf Modified

devices = GSM1

outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
failed = /var/spool/sms/outgoing
sent = /var/spool/sms/sent
incoming = /var/spool/sms/incoming
logfile = /var/log/smsd.log
loglevel = 7
blocktime = 10

infofile = /var/run/sms/smsd.working
pidfile = /var/run/sms/smsd.pid

[GSM1]
# this is a socket!
device = moved to private block
Hidden private text.



pin = xxxx
cs_convert = yes
keep_open = yes
incoming = yes
baudrate = 2400
send_delay = 20
rtscts = no
init1 = AT+CGDCONT=?,+CGDCONT?,+CREG?,+CSQ,+COPS?

report = yes
init2 = AT+CSQ

(you can try it remotely, the IP from the modem is public)...

this is, what I get in the logs:

2010-07-16 15:18:48,7, GSM1: Command is sent, waiting for the answer
2010-07-16 15:18:53,7, GSM1: put_command expected (OK)|(ERROR), timeout occurred. 2.
2010-07-16 15:18:53,7, GSM1: <-
2010-07-16 15:18:54,3, GSM1: Modem is not ready to answer commands (Timeouts: 0)
2010-07-16 15:18:54,6, GSM1: I have to send 1 short message for /var/spool/sms/checked/send_dm5640
2010-07-16 15:18:54,6, GSM1: Sending SMS from to 41796429445
2010-07-16 15:18:54,6, GSM1: Checking if modem is ready
2010-07-16 15:18:54,7, GSM1: -> AT
2010-07-16 15:18:54,7, GSM1: Command is sent, waiting for the answer
2010-07-16 15:18:59,7, GSM1: put_command expected (OK)|(ERROR), timeout occurred. 1.
2010-07-16 15:18:59,7, GSM1: <- <FF><FD>^X<FF><FD> <FF><FD>#<FF><FD>'
2010-07-16 15:18:59,7, GSM1: -> ^Z


What can I provide you additionally?

could anybody assist me?

thx and best regards

Bruno


« Last edit by keke on Mon Jul 19, 2010 15:35, 168 months ago. »
Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
The box is running telnet which wants to negotiate some things, but the smsd is not a telnet client. A socket should just be useable without any Telnet stuff.

Some modems, like Multitech Multimodem MTCBA-G-EN, work without this telnet stuff. Probably there is some setting available which may disable this?

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
I think that I can implement very simple telnet feature to the next version. It will not be a "real" telnet client, it just responds to every DO message with a WONT, and to every WILL message with a DONT, thus turning off all the special stuff.

I have tested this implementation with your device, and it seems to work. However, there is another strange thing which comes from your modem: some answers contain zero byte before the end of answer:

2010-07-18 18:58:10,7, GSM1: <- OK
2010-07-18 18:58:10,7, GSM1: -> AT+CIMI
2010-07-18 18:58:11,7, GSM1: Command is sent, waiting for the answer
2010-07-18 18:58:11,2, GSM1: read_from_modem: count=0, got=10: 0D[.] 0A[.] 45[E] 52[R] 52[R] 4F[O] 52[R] 0D[.] 00[.] 0A[.]

This is from the network analyzer:
00000047  41     A
00000048 54 T
00000049 2b +
0000004A 43 C
0000004B 49 I
0000004C 4d M
0000004D 49 I
0000004E 0d .
0000004D 0d 0a 45 52 52 4f 52 0d 00 ..ERROR. .
00000056 0a .
With telnet (from inetutils) I also got similar data:
                                           0000004E  0d 00 0d 0a 45 52 52 4f  52       ....ERRO R
00000057 0d 0a ..
Probably I can make a workaround for this, but have to test it more later.

Member
Registered:
Jul 2010
Location: Switzerland
Topic owner
When I switch Telnet off from the GPRS modem, I do not get this weird error message, but no SMS will be forwarded. Is there anybody who works with such a Ethernet "MultiTech Multimodem Wireless EDGE, GRPS, CDMA" with whom I could compare my configuration?

rgds

Bruno

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Can you move your modem back to the state which was used yesterday? I could check how the patch for Telnet works, and if it works as expected, I could publish the patch here.

Member
Registered:
Jul 2010
Location: Switzerland
Topic owner
thank U, now the modem is back to yesterdays state.

best rgds

Bruno

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
It's asking for Login: but the patch does not support any authentication. Yesterday it did not require login.

Member
Registered:
Jul 2010
Location: Switzerland
Topic owner
It shouldn't ask for a login, but I rebootet the modem again, can you please try again?

thx

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
It first dropped the connection couple of times, then it sent some garbage which caused troubles with a terminal window, and now it does not answer...

It's a lunch time, I'm back in one hour or something...

Member
Registered:
Jul 2010
Location: Switzerland
Topic owner
I will check the connection and the modem once again, meanwhilely

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
From both networks I get the following, repeatedly:

# telnet <IP> <port>
Trying <IP>...
Connected to <IP>.
Escape character is '^]'.
Connection closed by foreign host.



« Last edit by keke on Mon Jul 19, 2010 15:38, 168 months ago. »
Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
It is still the same modem, but what have you done? :)

It works now, but there is no telnet stuff anymore. I also tried with plink (from putty), because it starts the session with telnet negotiation. However, your modem does not answer to telnet commands and with ordinary AT commands it works properly.

So, I cannot "test" the telnet -patch :(. But your device should be useable now without any patches required.

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
If there was no setting for disabling the telnet stuff, it may be possible that after rebooting the device, it again require those negotiations...

In that kind of case the patch may still be needed, and therefore I include it in here:



If you need this patch, save it as /tmp/patch and cd smstools3/src and run patch < /tmp/patch.

Member
Registered:
Jul 2010
Location: Switzerland
Topic owner
I will add it and try it out tomorrow morning, thank you a lot so far

cheers

Bruno

  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.