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. Fri Feb 26, 2021 19:12
SMSTools3 Community » Help and support Bottom

get modem status in terminal

Login and Post Reply

Page:  1

Author Post
Member
Registered:
Mar 2013
Location: Nghe An, Vietnam
Operating system name and version: Debian
Version of smsd: 3.0
Smsd installed from: sources
Name and model of a modem:
Interface: USB

Hi everybody!

I want to get response of modem that connected to USB port.

In terminal 1, I try: cat /dev/ttyUSB2. Below are results:

^BOOT:8588911,0,0,0,20

^BOOT:8588911,0,0,0,20

^BOOT:8588911,0,0,0,20

^BOOT:8588911,0,0,0,20

In terminal 2, I try: echo "ATi^M" > /dev/ttyUSB2 (^M = Ctrl+v+m)
And in terminal 1: the file /dev/ttyUSB2 is changed, below text will be appended

Manufacturer: Technologies

Model: E173Eu-1

Revision: 11.126.29.01.439

IMEI: 867767008588911

+GCAP: +CGSM,+DS,+ES

OK

How can I cat that above text and store it in another file
Manufacturer: Technologies

Model: E173Eu-1

Revision: 11.126.29.01.439

IMEI: 867767008588911

+GCAP: +CGSM,+DS,+ES

OK


Or does SMS Tools 3 support another way to contact with USB 3G modem?

Thank you very much :P






^BOOT:8588911,0,0,0,20

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
With configuration setting report_device_details = yes smsd stores information to the log file when smsd is started. But probably I did not understand your goal.

Member
Registered:
Mar 2013
Location: Nghe An, Vietnam
Topic owner
Thank you, keke

Hi, I want to get device statics such as status (live or die), number of messages has sent, number of messages in queued... in bash shell or terminal linux :p

So if I config the setting that you said: report_device_details=yes, how can I get device status?

Thank you again :D

Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
Enable status monitor. In the Makefile change this:

# Comment this out, to enable statistics
#CFLAGS += -D NOSTATS


Define global settings in the smsd.conf:

stats = /var/spool/sms/stats
stats_interval = 0
stats_no_zeroes = yes


Create stats directory, recompile and restart smsd.

For example, the /var/spool/sms/stats/status file will be like:
Status:     09-05-27 20:46:17, irir------------
SONERA: 09-05-27 20:46:09, Idle, 123, 0, 321, ssi: -63 dBm, ber: < 0.2 %
ELISA: 09-05-27 20:46:12, Receiving, 234, 0, 432, ssi: -73 dBm, ber: < 0.2 %
DNA: 09-05-27 20:46:06, Idle, 456, 0, 543, ssi: -77 dBm, ber: < 0.2 %
SAUNALAHTI: 09-05-27 20:46:14, Receiving, 678, 0, 654, ssi: -69 dBm, ber: < 0.2 %
Timestamp value tells when status is created or modem initialization was last started.

Status can be: (s) Sending, (r) Receiving, (i) Idle, (b) Blocked, (t) Trouble, (-) Unknown. Trouble -status means that something abnormal has happened and if smart_logging is in use, trouble log will be written.

Counters are: sent, failed, received. Sent counter is the value from stats/<modemname>.counter file. Smsd does not clear this value. Failed and received counters are from original statistics data and they are cleared each time when stats are stored (stats_interval), or smsd is restarted.

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.