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 Apr 27, 2024 00:47
SMSTools3 Community » Help and support Bottom

[answered] speak directly with my modem

  This topic is locked

Page:  1

Author Post
Member
Registered:
Aug 2010
Location: Paris, France
Operating system name and version: Debian Squeeze (testing)
Version of smsd: 3.1.11-1
Smsd installed from: package repository
Name and model of a modem / phone: Modem GSM GPRS Wavecom Fastrack
Interface: serial

Hello everybody,

firstly thanks a lot to creator(s), you save me a lot of time, i was writing a perl script that made exactly the same thing than smsd and i discover your software...

My modems are working like a charm, receiving all my sms ( i use smsd mainly for receiving sms)

I have one rookie question: smsd is connected to my 3 Modem in background but i want to speak sometime directly with each modem from an external script in order to get signal quality.

It seems that smsd -C permits to do that but i don't want to interrupt smsd in background. Is it the best way ?

Thanks a lot

Etn

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Thanks for choosing this software ;).

First, as you have three modems, use the setting trust_spool = no if you need to send messages with all modems at the same time. There is a bug which will be fixed in the next version.

If you only want to see the signal quality, you could use the global setting stats = /var/spool/sms/stats. With this setting all modems will report counters and signal quality in the file /var/spool/sms/stats/status.

Check all regular_run* settings which are available for modems. With these settings you can define commands which are sent to the modems, for example AT+CSQ. You can also run your own external script to speak with modems. While the external script is executed, a modem is closed by the smsd.

It is also possible to suspend any modem, see this for details.

Member
Registered:
Aug 2010
Location: Paris, France
Topic owner
Hello,
thanks for your fast answer :)

I already have stats = /var/log/smstools/smsd_stats in my global settings but the file only contains:



Status: 10-08-04 17:50:14, iri-------------------------------------------------------------
OT: 10-08-04 17:50:04, Idle, 0, 0, 0
BT: 10-08-04 17:50:14, Receiving, 0, 0, 0
SFR: 10-08-04 17:50:02, Idle, 0, 0, 0

In the event log i can see sometimes theses kind of line:
<- AT+CSQ +CSQ: 24,0 OK


My configuration is :

devices = OT,BT,SFR
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
incoming = /var/spool/sms/incoming
logfile = /var/log/smstools/smsd.log
infofile = /var/run/smstools/smsd.working
pidfile = /var/run/smstools/smsd.pid
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
stats = /var/log/smstools/smsd_stats
loglevel = 7
stats_interval = 60
receive_before_send = no
autosplit = 3

[queues]
SFR=/var/spool/sms/SFR
BT=/var/spool/sms/BT
OT=/var/spool/sms/OT

[provider]
SFR=33684
BT=33660
OT=33680

[SFR]
init = AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0
device = /dev/ttyS2
incoming = yes
status_signal_quality = yes
status_include_counters = yes
baudrate = 115200
queues = SFR

[BT]
init = AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0
device = /dev/ttyS0
incoming = yes
status_signal_quality = yes
status_include_counters = yes
baudrate = 115200
queues = BT

[OT]
init = AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0
device = /dev/ttyS1
incoming = yes
status_signal_quality = yes
status_include_counters = yes
baudrate = 115200
queues = OT

is there any mistake on my conf?

Thanks

Etienne

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
etn wrote
In the event log i can see sometimes theses kind of line:
<- AT+CSQ +CSQ: 24,0 OK

You have set "echo on", which usually should not be done. In this case, the code assumes that the answer starts with "+CSQ". I may change this to the next version, but it's not sure.

Remove "E1" from init strings, or change them to "E0".


There is also a [default] section available for modems. It simplifies the setup when couple of similar modems are used. In your case the setup could be:



As you are using separate queue directory for each modem, the "trust_spool" bug has no effect in your system.

Member
Registered:
Aug 2010
Location: Paris, France
Topic owner
In fact in only use my modem for incoming SMS so i'm not impacted with this bug.
In all case i just add the line.

My init line has been stolen from Minicom so i was absolutly not safe with it :). Your setting resolves the issue, thanks a lot, i will use the stat file in order to get the signal quality.

Do you know if i really need this init line with my modem?

Thanks

Etienne

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
etn wrote
Do you know if i really need this init line with my modem?

I did not check those AT commands, but surely smsd will work without any init string.

Member
Registered:
Aug 2010
Location: Paris, France
Topic owner
Noted, I'll delete init line.
Thanks again for your support
Etienne

Member
Registered:
Aug 2010
Location: Paris, France
Topic owner
A last question,

i have one file generated per minute in /var/log/smstools/smsd_stats in addition with status file update.

Is there a way to only have status file updated ?

thanks

Etienne

Member
Registered:
Aug 2010
Location: Paris, France
Topic owner
etn wrote
A last question,

i have one file generated per minute in /var/log/smstools/smsd_stats in addition with status file update.

Is there a way to only have status file updated ?

thanks

Etienne

Forget this question, RTFM :o)

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
:)

Member
Registered:
Aug 2010
Location: Paris, France
Topic owner
I notice something, i was trying to parse the status file and discover something strange:

Status:^I10-08-05 12:09:03,^Irii-------------------------------------------------------------$
OT:^I10-08-05 12:09:03,^IReceiving,^Issi: -67 dBm, ber: < 0.2 %$
BT:^I10-08-05 12:08:58,^IIdle,^I^Issi: -57 dBm, ber: < 0.2 %$
SFR:^I10-08-05 12:08:58,^IIdle,^I^Issi: -69 dBm, ber: < 0.2 %$

As you can see with this invlist display from vi, there's 2 tab between Idle and Issi whereas there's only one between Receiving and ssi.
It's just a little more difficult to parse.

Etienne

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Also, when there are modems named like:

SAUNALAHTI (length >= 7)
DNA (length < 7)

the result is: SAUNALAHTI^I and DNA^I^I.

This is because cat /var/log/smstools/smsd_stats/status should look good ;).

And this file can be included in the web page as it is, using <pre> tag:
DNA:		10-08-05 13:24:15,	Receiving,	23587,	0,	17604,	ssi: -77 dBm, ber: < 0.2 %
SAUNALAHTI: 10-08-05 13:24:14, Idle, 22819, 6, 17664, ssi: -79 dBm, ber: < 0.2 %
...and it looks good.

Just replace any two tabs with single tab before parsing the line, or split the line by whitespaces.

  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.