|
|
SMS Server Tools 3 Community |
Welcome, Guest. Please login or register. |
Thu Mar 28, 2024 18:34 |
This topic is locked
Page: 1
Author |
Post |
|
#1 Thu Mar 24, 2011 04:54, 158 months ago.
|
Member
Registered: Sep 2009
Location: VTE/Laos, Laos
|
I test the HAUWIE E1552 with SMSTOOLS3 and i try to command and testing as following # lsusb Bus 003 Device 003: ID 12d1:1446 Huawei Technologies Co., Ltd. Bus 003 Device 001: ID 0000:0000 Bus 005 Device 001: ID 0000:0000 Bus 002 Device 001: ID 0000:0000 Bus 004 Device 001: ID 0000:0000 Bus 001 Device 001: ID 0000:0000 # /sbin/rmmod usb-storage # /sbin/modprobe -r usbserial # /sbin/modprobe usbserial vendor=0x12d1 product=0x1446 ls -ls /dev/ttyUSB0 ttyUSB0 ttyUSB1 and re-config /etc/smsd.conf and add init = AT^CURC=0
# Example smsd.conf. Read the manual for a description
devices = GSM1 logfile = /var/log/smsd.log failed = /var/spool/sms/failed sent = /var/spool/sms/sent loglevel= 7 delaytime = 2 blocktime = 60 receive_before_send = yes autosplit = 2
[GSM1] #device = /dev/ttyACM0 device = /dev/ttyUSB0 #incoming = yes #mode = new #device = /dev/ttyACM0 incoming = yes report = no baudrate = 9600 #init = ATE0 init = AT^CURC=0 init2 = AT+CPMS="IM" mode = old send_delay=50
but there are log that show in below
# tail -f /var/log/smsd.log 2011-03-22 17:00:56,3, GSM1: Modem is not clear to send 2011-03-22 17:01:09,3, GSM1: Modem is not clear to send 2011-03-22 17:01:22,3, GSM1: Modem is not clear to send 2011-03-22 17:01:35,3, GSM1: Modem is not clear to send
Please help me
Tai
|
|
#2 Sat Mar 26, 2011 13:49, 158 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
/dev/ttyUSB0 does not work properly. As this is a CentOS specific issue, I'm unable to help you . You will get help here: www.centos.org Forum.
|
|
#3 Mon Mar 28, 2011 09:55, 158 months ago.
|
Member
Registered: Sep 2009
Location: VTE/Laos, Laos
Topic owner
|
Which OS that work properly? Debian 6 or Ubuntu 10.10 ? Thank you « Last edit by tai on Mon Mar 28, 2011 09:58, 158 months ago. »
|
|
#4 Mon Mar 28, 2011 10:06, 158 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Both Debian and Ubuntu work well and both of them are easy to use.
You could download Ubuntu 10.10 Desktop CD, and try it as live (no installation required).
|
|
#5 Thu Mar 31, 2011 04:36, 158 months ago.
|
Member
Registered: Sep 2009
Location: VTE/Laos, Laos
Topic owner
|
Hi,
The CentOS Community has been support me for driver and I think, the device modem work properly.
# lsusb Bus 003 Device 001: ID 0000:0000 Bus 002 Device 001: ID 0000:0000 Bus 001 Device 001: ID 0000:0000 Bus 004 Device 004: ID 12d1:1001 Huawei Technologies Co., Ltd. E620 USB Modem Bus 004 Device 001: ID 0000:0000 Bus 005 Device 001: ID 0000:0000
But there are error "+CME ERROR: 13"
# tail -f /var/log/smsd.log 2011-03-17 11:32:03,7, GSM1: -> ATE0+CMEE=1 2011-03-17 11:32:04,7, GSM1: Command is sent, waiting for the answer 2011-03-17 11:32:04,7, GSM1: <- OK 2011-03-17 11:32:04,6, GSM1: Initializing modem 2011-03-17 11:32:04,7, GSM1: -> AT^CURC=0 2011-03-17 11:32:04,7, GSM1: Command is sent, waiting for the answer 2011-03-17 11:32:05,7, GSM1: <- OK 2011-03-17 11:32:05,7, GSM1: -> AT+CPMS="IM" 2011-03-17 11:32:05,7, GSM1: Command is sent, waiting for the answer 2011-03-17 11:32:05,7, GSM1: <- +CME ERROR: 13 2011-03-17 11:32:15,7, GSM1: -> AT+CPMS="IM" 2011-03-17 11:32:16,7, GSM1: Command is sent, waiting for the answer 2011-03-17 11:32:16,7, GSM1: <- +CME ERROR: 13 2011-03-17 11:32:16,3, GSM1: Modem did not accept the second init string 2011-03-17 11:32:18,6, GSM1: Checking device for incoming SMS 2011-03-17 11:32:18,6, GSM1: Checking if modem is ready 2011-03-17 11:32:18,7, GSM1: -> AT 2011-03-17 11:32:18,7, GSM1: Command is sent, waiting for the answer 2011-03-17 11:32:19,7, GSM1: <- OK 2011-03-17 11:32:19,6, GSM1: Pre-initializing modem 2011-03-17 11:32:19,7, GSM1: -> ATE0+CMEE=1 2011-03-17 11:32:19,7, GSM1: Command is sent, waiting for the answer 2011-03-17 11:32:19,7, GSM1: <- OK 2011-03-17 11:32:19,6, GSM1: Initializing modem 2011-03-17 11:32:19,7, GSM1: -> AT^CURC=0 2011-03-17 11:32:20,7, GSM1: Command is sent, waiting for the answer 2011-03-17 11:32:20,7, GSM1: <- OK 2011-03-17 11:32:20,7, GSM1: -> AT+CPMS="IM" 2011-03-17 11:32:21,7, GSM1: Command is sent, waiting for the answer 2011-03-17 11:32:21,7, GSM1: <- +CME ERROR: 13
Tai
|
|
#6 Thu Mar 31, 2011 08:58, 158 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
tai wrote The CentOS Community has been support me for driver and I think, the device modem work properly.
Great. tai wrote But there are error "+CME ERROR: 13"
This is because the modem has no "IM" memory. Remove init2 = AT+CPMS="IM" from the smsd.conf. Also remove mode = old, because this device uses new mode which is a default. And you likely do not need send_delay=50, at least you could try to run without it. What is the version of SMSTools3 you are running?
|
|
#7 Fri Apr 01, 2011 05:11, 158 months ago.
|
Member
Registered: Sep 2009
Location: VTE/Laos, Laos
Topic owner
|
Hi Keke
Thank you for you help I try to use SMSTools current version ,but still error
This is error message # tail -f /var/log/smsd.log 2011-03-18 12:04:20,7, GSM1: -> ATE0+CMEE=1;+CREG=2 2011-03-18 12:04:20,7, GSM1: Command is sent, waiting for the answer 2011-03-18 12:04:20,7, GSM1: <- +CME ERROR: 13 (SIM failure) 2011-03-18 12:04:20,3, GSM1: Modem did not accept the pre-init string 2011-03-18 12:04:20,6, GSM1: Checking if modem needs PIN 2011-03-18 12:04:20,7, GSM1: -> AT+CPIN? 2011-03-18 12:04:20,7, GSM1: Command is sent, waiting for the answer 2011-03-18 12:04:21,7, GSM1: <- +CME ERROR: 13 (SIM failure) 2011-03-18 12:04:21,2, GSM1: PIN handling: expected READY, modem answered +CME ERROR: 13 (SIM failure), SIM failure 2011-03-18 12:04:21,2, GSM1: Modem handler 0 terminated abnormally. PID: 22467.
And my system is SMS gateway and still use GSM SIM
Should I use 3G SIM for HAUWIE E1552?
Tai
|
|
#8 Fri Apr 01, 2011 10:48, 158 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
tai wrote Should I use 3G SIM for HAUWIE E1552?
Probably yes. At least you could try.
|
|
#9 Sat Apr 02, 2011 04:46, 158 months ago.
|
Member
Registered: Sep 2009
Location: VTE/Laos, Laos
Topic owner
|
OK, I will try... For the HAUWIE E1552 use only command init = AT^CURC=0 -it is enough
Tai
|
|
#10 Tue Apr 05, 2011 03:17, 158 months ago.
|
Member
Registered: Sep 2009
Location: VTE/Laos, Laos
Topic owner
|
Hi,
It is work... but there are some error message :
2011-03-22 10:07:15,6, GSM1: Trying to get stored message 30 2011-03-22 10:07:16,7, GSM1: -> AT+CMGR=30 2011-03-22 10:07:16,7, GSM1: Command is sent, waiting for the answer 2011-03-22 10:07:16,7, GSM1: <- +CMS ERROR: 321 (Invalid memory index) 2011-03-22 10:07:16,6, GSM1: No SMS received (reading interrupted) 2011-03-22 10:07:18,6, GSM1: Checking device for incoming SMS 2011-03-22 10:07:18,6, GSM1: Checking if modem is ready 2011-03-22 10:07:18,7, GSM1: -> AT 2011-03-22 10:07:18,7, GSM1: Command is sent, waiting for the answer 2011-03-22 10:07:18,7, GSM1: <- OK 2011-03-22 10:07:18,6, GSM1: Pre-initializing modem 2011-03-22 10:07:19,7, GSM1: -> ATE0+CMEE=1;+CREG=2 2011-03-22 10:07:19,7, GSM1: Command is sent, waiting for the answer 2011-03-22 10:07:19,7, GSM1: <- OK 2011-03-22 10:07:19,6, GSM1: Initializing modem 2011-03-22 10:07:19,7, GSM1: -> AT^CURC=0 2011-03-22 10:07:19,7, GSM1: Command is sent, waiting for the answer 2011-03-22 10:07:19,7, GSM1: <- OK 2011-03-22 10:07:20,7, GSM1: -> AT+CSQ 2011-03-22 10:07:20,7, GSM1: Command is sent, waiting for the answer 2011-03-22 10:07:20,7, GSM1: <- +CSQ: 15,99 OK 2011-03-22 10:07:20,6, GSM1: Signal Strength Indicator: (15,99) -83 dBm (Good), Bit Error Rate: not known or not detectable 2011-03-22 10:07:20,6, GSM1: Checking if Modem is registered to the network 2011-03-22 10:07:20,7, GSM1: -> AT+CREG? 2011-03-22 10:07:20,7, GSM1: Command is sent, waiting for the answer 2011-03-22 10:07:20,7, GSM1: <- +CREG: 2,1,621,BA OK 2011-03-22 10:07:20,6, GSM1: Modem is registered to the network 2011-03-22 10:07:20,6, GSM1: Selecting PDU mode 2011-03-22 10:07:21,7, GSM1: -> AT+CMGF=0 2011-03-22 10:07:21,7, GSM1: Command is sent, waiting for the answer 2011-03-22 10:07:21,7, GSM1: <- OK
Tai
|
|
#11 Tue Apr 05, 2011 09:15, 158 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
With default check_memory_method use:
memory_start = 0
or use:
check_memory_method = 31
|
|
#12 Tue Apr 05, 2011 10:06, 158 months ago.
|
Member
Registered: Sep 2009
Location: VTE/Laos, Laos
Topic owner
|
Thank you very much but still error message
#tail -f /var/log/smsd.log
. 2011-03-22 17:03:34,7, GSM1: Command is sent, waiting for the answer 2011-03-22 17:03:34,7, GSM1: <- +CSQ: 18,99 OK 2011-03-22 17:03:34,6, GSM1: Signal Strength Indicator: (18,99) -77 dBm (Good), Bit Error Rate: not known or not detectable 2011-03-22 17:03:34,6, GSM1: Checking if Modem is registered to the network
Tai
|
|
#13 Tue Apr 05, 2011 10:10, 158 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
signal_quality_ber_ignore = yes
|
|
#14 Wed Apr 06, 2011 02:49, 158 months ago.
|
Member
Registered: Sep 2009
Location: VTE/Laos, Laos
Topic owner
|
Thank you again and there are some error when try start service SMS3 I think there are some message that try to processing that make service can not start. # /etc/init.d/sms3 start Starting SMS Daemon: There was 1 error while reading the config file: - Syntax error: description There was 1 major problem found. Cannot start. See the log file for details. smsd failed. # tail -f /var/log/smsd.log 2011-03-23 09:34:08,2, smsd: There was 1 major problem found. 2011-03-23 09:34:08,2, smsd: Smsd mainprocess terminated. 2011-03-23 09:41:36,2, smsd: Smsd v3.1.14 started. 2011-03-23 09:41:36,2, smsd: Running as root:root. 2011-03-23 09:41:36,2, smsd: There was 1 error while reading the config file: 2011-03-23 09:41:36,2, smsd: - Syntax error: description 2011-03-23 09:41:36,7, smsd: Running startup_check (shell): /var/spool/sms/incoming/smsd_script.S9VzmM /tmp/smsd_data.lMuz00 2011-03-23 09:41:36,7, smsd: Done: startup_check (shell), execution time 0 sec., status: 0 (0) 2011-03-23 09:41:36,2, smsd: There was 1 major problem found. 2011-03-23 09:41:36,2, smsd: Smsd mainprocess terminated. Tai « Last edit by tai on Wed Apr 06, 2011 02:51, 158 months ago. »
|
|
#15 Wed Apr 06, 2011 09:19, 158 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
Please show the content of smsd.conf.
|
|
#16 Thu Apr 07, 2011 04:24, 157 months ago.
|
Member
Registered: Sep 2009
Location: VTE/Laos, Laos
Topic owner
|
Hi keke now my sms modem and smstools3 work as well, but I would like to integrate with MySQL so i add paramater in smsd.conf eventhandler = /usr/local/bin/mysmsd However, I don't know much about shell script base on CentOS 5.5 please recommend how to test by simulate processing like 1.Mobile send to SMS gateway 2.Get data from Mysql 3.send back message to Mobile For Example: type : R code number RR code number RRR code number RB code numberQuery data from MySQL that base condition by code number Please recommend Tai « Last edit by tai on Thu Apr 07, 2011 04:26, 157 months ago. »
|
|
#17 Thu Apr 07, 2011 18:56, 157 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
From the script mysmsd it can can seen how the data can be queried from MySQL database. The script is searching for ID, and it could be modified to search for the code. After the message is known, /usr/local/bin/sendsms can be used to send the response.
However, if you are not familiar with shell scripting, use something other language, like Perl or PHP. Eventhandler can be written using any language, smsd does not worry about it.
By searching you many find some example scripts in this forum, but as far as I remember, here is no complete solution presented, which does exactly (and only) what you are needing.
|
|
#18 Tue Apr 12, 2011 04:52, 157 months ago.
|
Member
Registered: Sep 2009
Location: VTE/Laos, Laos
Topic owner
|
Hi
I try to learn from http://smstools3.kekekasvi.com/topic.php?id=46 and I have some question about bash script. ===== FROM=`formail -zx From: < $2 | sed 's/"//g'` TO=`formail -zx To: < $2` #Remove plus sign, spaces, minus and short number prefix TO=`echo "$TO" | sed 's/ //g' | sed 's/+//g' | sed 's/s//g' | sed 's/-//g'` SUBJECT=`formail -zx Subject: < $2` SENT=`formail -zx Sent: < $2` TEXT=`sed -e '1,/^$/ d' < $2` TEXTSQL=$(echo "$TEXT" | sed 's/\\/\\\\/g' | sed 's/\"/\\\"/g') . . Question
1. What is formail -zx mean? and `sed -e '1,/^$/ d' < $2` mean? 2. What is $2 mean?
===== if [ "$1" = "FAILED" ] || [ "$1" = "SENT" ]; then mysql $SQL_ARGS "insert into $SQL_TABLE (type,sent,sender,receiver,msgid,text) values (\"$1\",\"$DATE\",\"$FROM\",\"$TO\",\"$3\",\"$TEXTSQL\");"; elif [ "$1" = "RECEIVED" ]; then mysql $SQL_ARGS "insert into $SQL_TABLE
Question
1. What is $1 and $3 mean?
Tai
|
|
#19 Tue Apr 12, 2011 12:23, 157 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
tai wrote Question
1. What is formail -zx mean? and `sed -e '1,/^$/ d' < $2` mean?
A program formail extracts headers from the message file. See man formail for more details. Try which formail, and it the program is not found, install the procmail package. sed is used to extract the message body from the file. See man sed for more details. tai wrote 2. What is $2 mean?
1. What is $1 and $3 mean?
Those are command line arguments. $1 is the first one, and so on. See Eventhandler for more details. If you are going to use Bash in scripts, please read the whole content ( ) of this site: Advanced Bash-Scripting Guide.
|
This topic is locked
Page: 1
Time in this board is UTC.
|
|
|
|
|
|
|