|
|
SMS Server Tools 3 Community |
Welcome, Guest. The forum is currently read-only, but will open soon. |
Fri Mar 14, 2025 10:58 |
Page: 1 2 Next
Keywords: Mode: All keywords (AND) |
Sat Sep 12, 2009 19:35
|
certain_death: Hi Keke :)
Sorry for the late of reply, cause I've try my SMS gateway Server using this application (sms server tools) as your suggest too.
Ya, I know that 3 of my scripts aren't very handy. It just test in my sistem only. Let me keep learn about it using manual and also your example :)
And many thanks about your suggest at solution of that scripts. I'll try it now. ^_^
Regard
|
Thu Sep 03, 2009 19:07
|
certain_death: I mean, In default, all sms will insert into inbox of my HP (as modem) and store in incoming directory (/var/spool/sms/incoming).
I want that all of them (sms) will be store from incoming to field "file" of cltsms table in BUPBDB db.
Help me the code in shell script as eventhandler pleae. Or any example for this case?
Please show me that.
Thanks.
Edited (add) :
Here the structure of cltsms table :
CREATE TABLE `cltsms` (
`ID` varchar(50) NOT NULL,
`notel` varchar(50) NOT NULL,
`nama` varchar(100) NOT NULL,
`file` varchar(160) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
Thu Sep 03, 2009 19:01
|
certain_death: Hi keke, I'm sorry for very late reply.
I can solve that problem using any trick. In this case I use 3 eventhandlers (BUPB_REG_handler, BUPB_GET_handler, and BUPB_KRM_handler) and run each of them. Example, for registration phase, I'm run the BUPB_REG_handler and comment or deactive (#) KRM and GET in /etc/smsd.conf
Here my code :
BUPB_GET_handler
#!/bin/sh
#script : BUPB_GET_handler
#lokasi : /usr/local/bin
#
#Diimplementasikan untuk penerapan protokol BUPB
#di sisi server (bersama SMS Gateway sistem)
#untuk penanganan terhadap request ambil file ke server oleh client
#Fungsi :
#Mengecek tag 'get', tidak menangani validasi ID dan nama.
#Jika tag benar, server akan memenuhi request client
#JIka tag salah, server akan mengirimkan sms konfirmasi ke client
#tag tidak case-censitive
if [ "$1" != "RECEIVED" ]; then
exit;
fi;
#parameter DB
SQL_HOST=localhost
SQL_USER=admin
SQL_PASSWORD=
SQL_DATABASE=bupbdb
SQL_TABLE=cltsms
#Mengekstrak data dari file SMS yang diterima
FROM=`formail -zx From: < $2`
TEXT=`formail -I "" <$2 | sed -e"1d"`
#Setting parameter SQL
if [ "$SQL_PASSWORD" != "" ]; then SQL_ARGS="-p $SQL_PASSWORD";
else
SQL_ARGS="";
fi
SQL_ARGS="-h $SQL_HOST -u $SQL_USER $SQL_ARGS -D $SQL_DATABASE -s -e"
TEXTS=`echo $TEXT|sed -e's/[\t]//g'`
#Mengecek SMS yang masuk, apakah mengandung tag 'get'
if echo $TEXTS|grep -qi "get"
then
NAMA=`echo $TEXTS|cut -f2 -d#`
#Mengirim SMS konfirmasi ke client jika format benar
FILENAME=`mktemp /var/spool/sms/outgoing/GETBXXXXXX`
echo "To: $FROM" >$FILENAME
echo "" >> $FILENAME
echo "$NAMA, permintaan anda dipenuhi. Mohon tunggu sebentar. File akan segera dikirimkan via SMS" >>$FILENAME
else
#Membuat SMS konfirmasi ke client jika format salah
FILENAME=`mktemp /var/spool/sms/outgoing/GETSXXXXXX`
echo "To: $FROM" >$FILENAME
echo "" >> $FILENAME
echo "Format SMS anda salah. Ketik GET#Nama#ID" >>$FILENAME
fi
BUPB_REG_handler
#!/bin/sh
#script : BUPB_REG_handler
#lokasi : /usr/local/bin
#
#Diimplementasikan untuk penerapan protokol BUPB
#di sisi server (bersama SMS Gateway sistem)
#Fungsi :
#Memeriksa format SMS client, apakah mengandung tag 'reg'
#Jika format benar, maka server akan menggenerate ID untuk client,
#menyimpan data client ke database BUPBDB pada tabel cltsms, kemudian
#mengirimkannya ke client via SMS konfirmasi beserta nama client.
#Jika format salah, server akan mengirim sms konfirmasi ke client berisi
#format yang benar.
if [ "$1" != "RECEIVED" ]; then
exit;
fi;
#parameter DB
SQL_HOST=localhost
SQL_USER=admin
SQL_PASSWORD=
SQL_DATABASE=bupbdb
SQL_TABLE=cltsms
#Mengekstrak data dari file SMS yang diterima
FROM=`formail -zx From: < $2`
TEXT=`formail -I "" <$2 | sed -e"1d"`
#Setting parameter SQL
if [ "$SQL_PASSWORD" != "" ]; then SQL_ARGS="-p $SQL_PASSWORD";
else
SQL_ARGS="";
fi
SQL_ARGS="-h $SQL_HOST -u $SQL_USER $SQL_ARGS -D $SQL_DATABASE -s -e"
TEXTS=`echo $TEXT|sed -e's/[\t]//g'`
#Mengecek pesan jika mengandung tag 'reg'
#dan generate ID untuk client, jika format benar
if echo $TEXTS|grep -qi "reg"
then
KODE=`mktemp CXXXX`
NAMA=`echo $TEXTS|cut -f2 -d#`
#Memasukkan data ke dalam tabel cltsms
A=`mysql $SQL_ARGS "insert into $SQL_TABLE (ID,notel,nama) values(\"$KODE\",\"$FROM\",\"$NAMA\");"`
#Membuat SMS konfirmasi ke client jika format benar
#Menyertakan ID dan Nama client
FILENAME=`mktemp /var/spool/sms/outgoing/REGBXXXXXX`
echo "To: $FROM" >$FILENAME
echo "" >> $FILENAME
echo "$NAMA, anda telah registrasi dengan ID $KODE" >>$FILENAME
else
#Membuat SMS konfirmasi ke client jika format salah
FILENAME=`mktemp /var/spool/sms/outgoing/REGSXXXXXX`
echo "To: $FROM" >$FILENAME
echo "" >> $FILENAME
echo "Format SMS anda salah. Ketik REG#nama" >>$FILENAME
fi
BUPB_KRM_handler
#!/bin/sh
#script : BUPB_KRM_handler
#lokasi : /usr/local/bin
#
#Diimplementasikan untuk penerapan protokol BUPB
#di sisi server (bersama SMS Gateway sistem)
#untuk penanganan terhadap request kirim file ke server oleh client
#Fungsi :
#Mengecek tag 'krm', tidak menangani validasi ID dan nama.
#Jika tag benar, server akan memenuhi request client
#JIka tag salah, server akan mengirimkan sms konfirmasi ke client
#tag tidak case-censitive
if [ "$1" != "RECEIVED" ]; then
exit;
fi;
#parameter DB
SQL_HOST=localhost
SQL_USER=admin
SQL_PASSWORD=
SQL_DATABASE=bupbdb
SQL_TABLE=cltsms
#Mengekstrak data dari file SMS yang diterima
FROM=`formail -zx From: < $2`
TEXT=`formail -I "" <$2 | sed -e"1d"`
#Setting parameter SQL
if [ "$SQL_PASSWORD" != "" ]; then SQL_ARGS="-p $SQL_PASSWORD";
else
SQL_ARGS="";
fi
SQL_ARGS="-h $SQL_HOST -u $SQL_USER $SQL_ARGS -D $SQL_DATABASE -s -e"
TEXTS=`echo $TEXT|sed -e's/[\t]//g'`
#Mengecek SMS yang masuk, apakah mengandung tag 'krm'
if echo $TEXTS|grep -qi "krm"
then
NAMA=`echo $TEXTS|cut -f2 -d#`
#Mengirim SMS konfirmasi ke client jika format benar
FILENAME=`mktemp /var/spool/sms/outgoing/KRMBXXXXXX`
echo "To: $FROM" >$FILENAME
echo "" >> $FILENAME
echo "$NAMA, permintaan anda dipenuhi. Silahkan melakukan pengiriman file via SMS ke server" >>$FILENAME
else
#Membuat SMS konfirmasi ke client jika format salah
FILENAME=`mktemp /var/spool/sms/outgoing/KRMSXXXXXX`
echo "To: $FROM" >$FILENAME
echo "" >> $FILENAME
echo "Format SMS anda salah. Ketik KRM#Nama#ID" >>$FILENAME
fi
*all of that code using some Indonesian language in its.
Now my problem is :
How to store incoming sms in my database using eventhandler?
In this case I use my database (BUPBDB), table cltsms, and I want sms stored in that DB.
Could you help me about the eventhandler (shell) script? Plz..
Regard
Thanks.
|
Sat Aug 15, 2009 19:43
|
certain_death: Hi Keke,
Now my eventhandler (BUPB_handler) can generate ID for me (client), send me SMS confirmation if my format is wrong, and store ID+name+telnumber to database (if format valid).
Here is the code :
#!/bin/sh
#script : BUPB_handler
#location : /usr/local/bin
#Script for input data client from SMS
#It will be run if a SMS received as the format
#Data of client will be insert (store) into DB 'bupbdb' if contain tag 'reg'
#if empty
if [ "$1" != "RECEIVED" ]; then
exit;
fi;
#parameter of my DB
SQL_HOST=localhost
SQL_USER=admin
SQL_PASSWORD=
SQL_DATABASE=bupbdb
SQL_TABLE=cltsms
#Ekstract data from SMS that received
FROM=`formail -zx From: < $2`
TEXT=`formail -I "" <$2 | sed -e"1d"`
#Setting parameter of SQL
if [ "$SQL_PASSWORD" != "" ]; then SQL_ARGS="-p $SQL_PASSWORD";
else
SQL_ARGS="";
fi
SQL_ARGS="-h $SQL_HOST -u $SQL_USER $SQL_ARGS -D $SQL_DATABASE -s -e"
#Check message if contain tag 'reg'
TEXTS=`echo $TEXT|sed -e's/[\t]//g'`
if echo $TEXTS|grep -qi "reg"
then
KODE=`mktemp CXXXX`
NAMA=`echo $TEXTS|cut -f2 -d#`
ISITEKS=``
#Insert into table cltsms
A=`mysql $SQL_ARGS "insert into $SQL_TABLE (ID,notel,nama,file) values(\"$KODE\",\"$FROM\",\"$NAMA\",\"$ISITEKS\");"`
# NOTICE this: "$FROM\")",\"$NAME
#echo "A=mysql $SQL_ARGS insert into $SQL_TABLE (ID,notel,nama,file)
#values(\"$KODE\",\"$FROM\",\"$NAME\");"
#Create SMS confirmation to client if format is valid
#Include ID (generated by server) and client name
FILENAME=`mktemp /var/spool/sms/outgoing/REGBXXXXXX`
#FILENAME= `mktemp /tmp/REGBXXXXXX`
echo "To: $FROM" >$FILENAME
echo "" >> $FILENAME
echo "$NAMA, you are registered with ID $KODE" >>$FILENAME
else
#Create SMS confirmation to client if format is wrong
FILENAME=`mktemp /var/spool/sms/outgoing/REGSXXXXXX`
#FILENAME=`mktemp /tmp/REGSXXXXXX`
echo "To: $FROM" >$FILENAME
echo "" >> $FILENAME
echo "Your SMS format is wrong. Type REG#nama" >>$FILENAME
fi
Now I'm want to add some script in BUPB_handler so that it can :
1. Check sms from client with format KRM#ID#nama
If format is wrong, then server will send client sms "Your format is wrong. Type KRM#ID#name"
If format is valid, but ID and or name wrong, then server will send sms to client "your ID and or name not correct. try again"
If both of them (format+ID+name) valid, server will send client a sms "Thanks."
Hint :
ID = ID that generated by server in registration phase.
Name = name client, registered by client.
Both of them (ID and name) checked on database.
2. Check sms from client with format GET#ID#nama (same like no 1)
if format is wrong, then server will send client sms "Your format is wrong. Type GET#ID#name"
If format is valid, but ID and or name wrong, then server will send sms to client "your ID and or name not correct. try again"
If both of them (format+ID+name) valid, server will send client a sms "Thanks."
Hint :
ID = ID that generated by server in registration phase.
Name = name client, registered by client.
Both of them (ID and name) checked on database.
But, until now, why it still error?
Could you help me plz? :(
Thanks.
|
Tue Aug 04, 2009 11:47
|
certain_death: Hi keke,
Thanks for reply. Seem my modem (motorola) still good.
My mistake that is my SIM is expired, so that it can't sent my sms. But now I've change it with new one, and my sms sent succcesfully :)
Also I've try to tes my eventhandler with ref#(name) and server reply with sms "your format is wrong. Type reg#name".
But, the problem is, why when I'm type as the format (reg#name), in database (I check in phpmyadmin), system didn't save my data (name, phone number) and also generate Id for client?And I didn't reveive sms confirmation from server that contain generated ID (by server) and my name :(
There's empty in bupbdb database :(
What should I do? Need your help. Thanks.
|
Mon Aug 03, 2009 18:31
|
certain_death: Hi keke,
Sorry, but my motorola C650 has a problem again :(
It can't send sms to destination (my another phone).
Here the log :
PDU:
( PRIVATE BLOCK )
2009-08-04 01:24:51,7, C650: -> ( PDU MOVED TO PRIVATE BLOCK ).
2009-08-04 01:25:09,7, C650: Command is sent, waiting for the answer
2009-08-04 01:25:12,7, C650: <- +CMS ERROR: 500 (Unknown error)
2009-08-04 01:25:12,3, C650: The modem answer was not OK: +CMS ERROR: 500 (Unknown error)
2009-08-04 01:25:12,5, C650: Waiting 10 sec. before retrying
2009-08-04 01:25:22,6, C650: Checking if modem is ready
2009-08-04 01:25:22,7, C650: -> AT
2009-08-04 01:25:23,7, C650: Command is sent, waiting for the answer
2009-08-04 01:25:23,7, C650: <- OK
2009-08-04 01:25:23,6, C650: Pre-initializing modem
2009-08-04 01:25:23,7, C650: -> ATE0+CMEE=1
2009-08-04 01:25:27,7, C650: Command is sent, waiting for the answer
2009-08-04 01:25:27,7, C650: <- OK
2009-08-04 01:25:27,6, C650: Checking if modem needs PIN
2009-08-04 01:25:27,7, C650: -> AT+CPIN?
2009-08-04 01:25:30,7, C650: Command is sent, waiting for the answer
2009-08-04 01:25:30,7, C650: <- +CPIN: READY OK
2009-08-04 01:25:30,7, C650: -> AT+CSQ
2009-08-04 01:25:33,7, C650: Command is sent, waiting for the answer
2009-08-04 01:25:33,7, C650: <- +CSQ: 27,99 OK
2009-08-04 01:25:33,6, C650: Checking if Modem is registered to the network
2009-08-04 01:25:33,7, C650: -> AT+CREG?
2009-08-04 01:25:36,7, C650: Command is sent, waiting for the answer
2009-08-04 01:25:36,7, C650: <- +CREG: 0,1 OK
2009-08-04 01:25:36,6, C650: Modem is registered to the network
2009-08-04 01:25:36,6, C650: Selecting PDU mode
2009-08-04 01:25:36,7, C650: -> AT+CMGF=0
2009-08-04 01:25:39,7, C650: Command is sent, waiting for the answer
2009-08-04 01:25:39,7, C650: <- OK
2009-08-04 01:25:39,7, C650: -> AT+CMGS=27
2009-08-04 01:25:43,7, C650: Command is sent, waiting for the answer
2009-08-04 01:25:43,7, C650: <- >
2009-08-04 01:25:43,7, C650: -> ( PDU REMOVED ).
2009-08-04 01:26:00,7, C650: Command is sent, waiting for the answer
2009-08-04 01:26:03,7, C650: <- +CMS ERROR: 500 (Unknown error)
2009-08-04 01:26:03,3, C650: The modem answer was not OK: +CMS ERROR: 500 (Unknown error)
2009-08-04 01:26:03,5, C650: Waiting 10 sec. before retrying
2009-08-04 01:26:13,6, C650: Checking if modem is ready
2009-08-04 01:26:14,7, C650: -> AT
2009-08-04 01:26:15,7, C650: Command is sent, waiting for the answer
2009-08-04 01:26:15,7, C650: <- OK
2009-08-04 01:26:15,6, C650: Pre-initializing modem
2009-08-04 01:26:15,7, C650: -> ATE0+CMEE=1
2009-08-04 01:26:19,7, C650: Command is sent, waiting for the answer
2009-08-04 01:26:19,7, C650: <- OK
2009-08-04 01:26:19,6, C650: Checking if modem needs PIN
2009-08-04 01:26:19,7, C650: -> AT+CPIN?
2009-08-04 01:26:22,7, C650: Command is sent, waiting for the answer
2009-08-04 01:26:22,7, C650: <- +CPIN: READY OK
2009-08-04 01:26:22,7, C650: -> AT+CSQ
2009-08-04 01:26:24,7, C650: Command is sent, waiting for the answer
2009-08-04 01:26:24,7, C650: <- +CSQ: 27,99 OK
2009-08-04 01:26:24,6, C650: Checking if Modem is registered to the network
2009-08-04 01:26:25,7, C650: -> AT+CREG?
2009-08-04 01:26:27,7, C650: Command is sent, waiting for the answer
2009-08-04 01:26:27,7, C650: <- +CREG: 0,1 OK
2009-08-04 01:26:27,6, C650: Modem is registered to the network
2009-08-04 01:26:27,6, C650: Selecting PDU mode
My configuration (/etc/smsd.conf)
# Example smsd.conf. Read the manual for a description
devices = C650
logfile = /var/log/smsd.log
failed = /var/spool/sms/failed
sent = /var/spool/sms/sent
incoming = /var/spool/sms/incoming
checked = /var/spool/sms/checked
outgoing = /var/spool/sms/outgoing
loglevel = 7
eventhandler = /usr/local/bin/BUPB_handler
store_received_pdu = 3
[C650]
device = /dev/ttyACM1
check_memory_method = 3
baudrate = 460800
incoming = yes
cs_convert = yes
rtscts = yes
send_delay = 300
report = yes
pin = 1111
maybe it cause by this?
2009-08-04 01:25:12,7, C650: <- +CMS ERROR: 500 (Unknown error)
2009-08-04 01:25:12,3, C650: The modem answer was not OK: +CMS ERROR: 500 (Unknown error)
What the error mean?
Hope you help me. Thanks.
|
Fri Jul 31, 2009 17:11
|
certain_death: OK
Thanks for your help keke.
Check your e-mail asap. Thanks.
|
Fri Jul 31, 2009 16:52
|
certain_death:
Okay, it was a sent message but now it's removed from the phone. There was no error while removing it, your log just did not show the result.
I've check the log and it's as you said.
As you do not have those problematic messages anymore, you can continue messaging normally. But do not use this phone manually to send messages (using it's own keyboard) and do not store sent messages into it as they will cause troubles. Or just ignore those messages with notifications about incorrect PDU. ;)
excuse me,
What "this phone" refer to? My Motorola 9as modem) or my Nokia?
when send sms from PC (motorola C650 as modem) to receiver (my Nokia), I'm use my keyboard in Pc to type the message.
and do not store sent messages into it as they will cause troubles. Or just ignore those messages with notifications about incorrect PDU. ;)
And what "it" refer to?
I need your help. Thanks keke.
|
Fri Jul 31, 2009 16:46
|
certain_death: Until now, my modem (C650) still can't send my Nokia the sms reply according to evenhandler script :(
I think my device (C650) is not so good as modem in this case.
This message is a sent message, not received. Probably your device cannot be used for successful communication, be aware to moving to some real modem...
I thinks this is true.
So, what your suggestion for this?What device that best for your suggestion (but I hope it so cheap :D )
Or any solution for my Motorola C650?
Thanks for your help.
|
Fri Jul 31, 2009 16:34
|
certain_death: Now using your suggestion store_received_pdu = 3, my mode (Motorola C650) success receive sms from my phone (Nokia N81) and store sms in incoming directory.
here is :
[root@astina-pura incoming]# ls -l
total 48
-rw-r--r-- 1 root root 996 2009-07-29 02:22 C650.5knf03
-rw-r--r-- 1 root root 229 2009-07-29 02:22 C650.eyM5GT
-rw-r--r-- 1 root root 228 2009-07-29 02:22 C650.hiIBQj
-rw-r--r-- 1 root root 302 2009-07-31 23:27 C650.K9VvpE
-rw-r--r-- 1 root root 228 2009-07-29 02:22 C650.VNtWWY
-rw-r--r-- 1 root root 228 2009-07-29 02:22 C650.x88i1S
and this is in the file (using vim)
[root@astina-pura incoming]# vim C650.K9VvpE
From: 6285237002263
From_TOA: 91 international, ISDN/telephone
From_SMSC: 6281100000
Sent: 09-07-31 23:26:34
Received: 09-07-31 23:27:11
Subject: C650
Modem: C650
IMSI: 510016330434151
Report: no
Alphabet: ISO
Length: 7
PDU: 06912618010000040D91265832072062F300119070133262438207D2B279145ED701
Ref#aku
Btw, I'm use my PC as server and it run in localhost (using IP private, not IP public), so that I think you can't remote it there using SSH. But I'm open SSH service.
|
Fri Jul 31, 2009 16:24
|
certain_death: Hai keke,
Soryy for the late. I've headache for 2 days because of this >_<
I've check file in /var/spool/sms/incoming/C650.5knf03
[root@astina-pura 8yt35c0d3]# cd /var/spool/sms/incoming/
[root@astina-pura incoming]# ls -l
total 40
-rw-r--r-- 1 root root 996 2009-07-29 02:22 C650.5knf03
-rw-r--r-- 1 root root 229 2009-07-29 02:22 C650.eyM5GT
-rw-r--r-- 1 root root 228 2009-07-29 02:22 C650.hiIBQj
-rw-r--r-- 1 root root 228 2009-07-29 02:22 C650.VNtWWY
-rw-r--r-- 1 root root 228 2009-07-29 02:22 C650.x88i1S
Here is C650.5knf03 using vim
[root@astina-pura incoming]# vim C650.5knf03
Error: Cannot decode PDU, see text part for details.
Warning: Length of numeric sender address is odd, but not terminated with 'F'.
Warning: Invalid character(s) in sender address.
From: C01808523700226300
From_TOA: FF reserved, reserved
Received: 09-07-29 02:22:58
Subject: C650
Modem: C650
IMSI: 510016330434151
Report: no
Alphabet: ISO
Length: 537
PDU: 0011FF0C818025730022360000AD064135FDDC2603
Pos: ....-....*....-....*....^^^^^^^^^^^^^^^^^^^^~here(25)
First tried with PDU mode new (with CSA):
The PDU data (11) says that this is a sent message. Can only decode received messages.
Next tried with PDU mode old (without CSA):
PDU ERROR: Position 25,20: While trying to read TP-PID, TP-DSC, TP-SCTS and TP-UDL: string is too short
No success. This PDU cannot be decoded. There is something wrong.
If you are unsure, confused or angry, please view the GSM 03.40
(ETSI TS 100 901) and related documents for details of correct
PDU format. You can also get some help via the Support Website.
|
Tue Jul 28, 2009 19:25
|
certain_death: Ups...sorry for my fool :(
OK, its run because of your suggestion :D
Here the log :
2009-07-29 02:22:54,7, C650: Command is sent, waiting for the answer
2009-07-29 02:22:54,7, C650: <- OK
2009-07-29 02:22:54,6, C650: Trying to get stored message 8156
2009-07-29 02:22:54,7, C650: -> AT+CMGR=8156
2009-07-29 02:22:58,7, C650: Command is sent, waiting for the answer
2009-07-29 02:22:58,7, C650: <- +CMGR: 2,,20 0011FF0C818025730022360000AD064135FDDC2603 OK
2009-07-29 02:22:58,5, C650: SMS received, From: C01808523700226300
2009-07-29 02:22:58,6, C650: Wrote an incoming message file: /var/spool/sms/incoming/C650.5knf03
2009-07-29 02:22:58,7, C650: Running eventhandler: /usr/local/bin/BUPB_handler RECEIVED /var/spool/sms/incoming/C650.5knf03
2009-07-29 02:22:58,7, C650: Done: eventhandler, execution time 0 sec., status: 0
2009-07-29 02:22:58,6, C650: Deleting message 8156
2009-07-29 02:22:59,7, C650: -> AT+CMGD=8156
But, still, my modem didn't send me the sms report that tell me my mistake (I type ref, not reg, so that, as evenhandle command, modem must send me sms report about that error format) :(
|
Tue Jul 28, 2009 19:08
|
certain_death: As you suggest, I do that.
But now, the problem is : I send sms from my phone to modem but my modem didn't store it to incoming folde (it only receive and show it in phone).
I check the log and found like this :
2009-07-29 02:02:00,6, C650: Pre-initializing modem
2009-07-29 02:02:00,7, C650: -> ATE0+CMEE=1
2009-07-29 02:02:03,7, C650: Command is sent, waiting for the answer
2009-07-29 02:02:04,7, C650: <- OK
2009-07-29 02:02:04,6, C650: Checking if modem needs PIN
2009-07-29 02:02:04,7, C650: -> AT+CPIN?
2009-07-29 02:02:07,7, C650: Command is sent, waiting for the answer
2009-07-29 02:02:07,7, C650: <- +CPIN: READY OK
2009-07-29 02:02:07,6, C650: Initializing modem
2009-07-29 02:02:07,7, C650: -> AT+CPMS="ME"
2009-07-29 02:02:11,7, C650: Command is sent, waiting for the answer
2009-07-29 02:02:11,7, C650: <- +CMS ERROR: 516
2009-07-29 02:02:21,7, C650: -> AT+CPMS="ME"
2009-07-29 02:02:25,7, C650: Command is sent, waiting for the answer
2009-07-29 02:02:25,7, C650: <- +CMS ERROR: 516
2009-07-29 02:02:25,3, C650: Modem did not accept the init string
2009-07-29 02:02:35,6, C650: Checking device for incoming SMS
2009-07-29 02:02:35,6, C650: Checking if modem is ready
2009-07-29 02:02:36,7, C650: -> AT
2009-07-29 02:02:36,7, C650: Command is sent, waiting for the answer
2009-07-29 02:02:37,7, C650: <- OK
2009-07-29 02:02:37,6, C650: Pre-initializing modem
2009-07-29 02:02:37,7, C650: -> ATE0+CMEE=1
2009-07-29 02:02:40,7, C650: Command is sent, waiting for the answer
2009-07-29 02:02:41,7, C650: <- OK
2009-07-29 02:02:41,6, C650: Checking if modem needs PIN
2009-07-29 02:02:41,7, C650: -> AT+CPIN?
2009-07-29 02:02:44,7, C650: Command is sent, waiting for the answer
2009-07-29 02:02:44,7, C650: <- +CPIN: READY OK
2009-07-29 02:02:44,6, C650: Initializing modem
2009-07-29 02:02:44,7, C650: -> AT+CPMS="ME"
2009-07-29 02:02:48,7, C650: Command is sent, waiting for the answer
2009-07-29 02:02:48,7, C650: <- +CMS ERROR: 516
2009-07-29 02:02:58,7, C650: -> AT+CPMS="ME"
2009-07-29 02:03:02,7, C650: Command is sent, waiting for the answer
2009-07-29 02:03:02,7, C650: <- +CMS ERROR: 516
2009-07-29 02:03:02,3, C650: Modem did not accept the init string
2009-07-29 02:03:12,6, C650: Checking device for incoming SMS
2009-07-29 02:03:12,6, C650: Checking if modem is ready
2009-07-29 02:03:13,7, C650: -> AT
2009-07-29 02:03:13,7, C650: Command is sent, waiting for the answer
2009-07-29 02:03:14,7, C650: <- OK
2009-07-29 02:03:14,6, C650: Pre-initializing modem
2009-07-29 02:03:14,7, C650: -> ATE0+CMEE=1
2009-07-29 02:03:17,7, C650: Command is sent, waiting for the answer
2009-07-29 02:03:18,7, C650: <- OK
2009-07-29 02:03:18,6, C650: Checking if modem needs PIN
2009-07-29 02:03:18,7, C650: -> AT+CPIN?
2009-07-29 02:03:21,7, C650: Command is sent, waiting for the answer
2009-07-29 02:03:21,7, C650: <- +CPIN: READY OK
2009-07-29 02:03:21,6, C650: Initializing modem
2009-07-29 02:03:21,7, C650: -> AT+CPMS="ME"
2009-07-29 02:03:25,7, C650: Command is sent, waiting for the answer
2009-07-29 02:03:25,7, C650: <- +CMS ERROR: 516
2009-07-29 02:03:35,7, C650: -> AT+CPMS="ME"
2009-07-29 02:03:39,7, C650: Command is sent, waiting for the answer
2009-07-29 02:03:39,7, C650: <- +CMS ERROR: 516
2009-07-29 02:03:39,3, C650: Modem did not accept the init string
What it's mean by this?
2009-07-29 02:03:39,3, C650: Modem did not accept the init string
What should I do now?
FYI :
I've fix my BUPB_handler and use it.
|
Tue Jul 28, 2009 18:47
|
certain_death: I've try it again and found in /var/spool/sms/incoming my sms that contain : ref#jhon
Seem that my modem received my sms and store it in that directory.
But why my eventhandler didn't handling that using evenhandler script?
The server must be send sms reply that said the format was wrong (reg, not ref).
What's happen with this?
Error in my evenhadler script (BUPB_handler) ?
Or my phone (motorola) can receive my sms (and store it in /var/spool/sms/incoming) but can't auto reply as command as in evenhandler script? :roll:
Need your help please..
Thanks.
|
Tue Jul 28, 2009 18:32
|
certain_death: Hi keke,
Thanks for your suggestion, it work :D
I think it didn't show error again, isn't it? :roll:
[root@astina-pura bin]# /usr/local/bin/BUPB_handler RECEIVED /var/spool/sms/incoming/C650.xxxx
[root@astina-pura bin]#
Oya, sorry, it must be console, not konsole. Forgive me.
But, hey, why in /var/spool/sms/incoming I didn't see the message from sms that I send from my another phone? It work or not? :roll:
This is some of log keke :
2009-07-29 01:29:57,6, C650: Trying to get stored message 130
2009-07-29 01:29:57,7, C650: -> AT+CMGR=130
2009-07-29 01:30:00,7, C650: Command is sent, waiting for the answer
2009-07-29 01:30:01,7, C650: <- +CMS ERROR: 321 (Invalid memory index)
2009-07-29 01:30:01,6, C650: Trying to get stored message 131
2009-07-29 01:30:01,7, C650: -> AT+CMGR=131
2009-07-29 01:30:04,7, C650: Command is sent, waiting for the answer
2009-07-29 01:30:05,7, C650: <- +CMS ERROR: 321 (Invalid memory index)
2009-07-29 01:30:05,6, C650: Trying to get stored message 132
2009-07-29 01:30:05,7, C650: -> AT+CMGR=132
2009-07-29 01:30:08,7, C650: Command is sent, waiting for the answer
2009-07-29 01:30:09,7, C650: <- +CMS ERROR: 321 (Invalid memory index)
2009-07-29 01:30:09,6, C650: Trying to get stored message 133
2009-07-29 01:30:09,7, C650: -> AT+CMGR=133
2009-07-29 01:30:12,7, C650: Command is sent, waiting for the answer
2009-07-29 01:30:13,7, C650: <- +CMS ERROR: 321 (Invalid memory index)
2009-07-29 01:30:13,6, C650: Trying to get stored message 134
2009-07-29 01:30:13,7, C650: -> AT+CMGR=134
2009-07-29 01:30:16,7, C650: Command is sent, waiting for the answer
2009-07-29 01:30:17,7, C650: <- +CMS ERROR: 321 (Invalid memory index)
2009-07-29 01:30:17,6, C650: Trying to get stored message 135
2009-07-29 01:30:17,7, C650: -> AT+CMGR=135
|
Tue Jul 28, 2009 17:54
|
certain_death: Ya, I'm use Kwrite before, and after that, I'm use vim and its show some character ^M there.
After that, I run it again and still show the error message : (
[root@astina-pura bin]# /usr/local/bin/BUPB_handler RECEIVED /var/spool/sms/incoming/C650.xxxxxx
bash: /usr/local/bin/BUPB_handler: /bin/sh^M: bad interpreter: No such file or directory
[root@astina-pura bin]#
Or vim also has saved the script file using CR characters??
Could you recommended me another editor which uses only LF for line termination? If yes, what's that?
Help me please.
Thanks.
FYI :
This is copy paste from my vim in terminal (konsole) :
[root@astina-pura bin]#vim /usr/local/bin/BUPB_handler
#!/bin/sh
#script : BUPB_handler
#location : /usr/local/bin
#script for insert client data via sms
#it will run when sms received
#the data of client will be insert to database mysql 'bupbdb' if contain 'reg'
if ["$1" !="RECEIVED"]; then
exit; fi;
#parameter of DB
SQL_HOST=localhost
SQL_USER=root
SQL_PASSWORD=root
SQL_DATABASE=bupbdb
SQL_TABLE=cltsms
#extract the data from sms file
FROM='formail -zx From : < $2'
TEXT='formail -I "" <$2 | sed -e"id"'
#setting some parameters of SQL
if ["$SQL_PASSWORD" !=""]; then SQL_ARGS="-p $SQL_PASSWORD";
else
SQL_ARGS="";
fi
SQL_ARGS="-h $SQL_HOST -u $SQL_USER $SQL_ARGS -D $SQL_DATABASE -s -e"
#check if the message contain 'reg'
TEXTS='echo $TEXT|sed -e's/[\t]//g''
if echo $TEXT|grep -qi "reg" then
KODE='mktemp Pxxxx'
NAME='echo $TEXTS|cut -f2 -d#'
#Insert data into cltsms table
A='mysql $SQL_ARGS "Insert into $SQL_TABLE (client_id,notel,name) values(\"$KODE\",\"$FROM\")",\"$NAME\"); "'
#Make sms that contain the reply of registration (for client), if true
FILENAME='mktemp /var/spool/sms/outgoing/REGBXXXXXX'
echo "To : $FROM" >$FILENAME
echo "" >> $FILENAME
echo "$NAME, you're registered with ID $CODE" >>$FILENAME
else
#Make sms that contain the reply of registraion (for client), if false
FILENAME='mktemp /var/spool/sms/outgoing/REGSXXXXXX'
echo "To : $FROM" >$FILENAME
echo "" >> $FILENAME
echo "Your format of SMS is wrong. Type : 'REG#nama'" >>$FILENAME
fi
|
Tue Jul 28, 2009 17:27
|
certain_death: I put BUPB+handler in /usr/local/bin and chmod +x to it.
But, why it show error message like this?
[root@astina-pura bin]# chmod +x BUPB_handler
[root@astina-pura bin]# /usr/local/bin/BUPB_handler RECEIVED /var/spool/sms/incoming/C650.xxxxxx
bash: /usr/local/bin/BUPB_handler: /bin/sh^M: bad interpreter: No such file or directory
[root@astina-pura bin]#
What it's mean by /bin/sh^M ?
Any suggestion?
Help me please.... :(
|
Tue Jul 28, 2009 16:39
|
|
Tue Jul 28, 2009 15:52
|
certain_death: Hi all,
I try to make a system where client can send their sms (contained contact file in it that compressed) to server using sms gateway concept. In this case, server must handle 3 condition : registration, request sending file to server (by client), and request take file in server (by client, and server will be send it to client).
In this case, I separate this plan by two side : client side and server side.
In client side, I'm develop an application (jar) using J2ME that can read/write phonebook (in symbian S60), compression contact (client can select how many contact that they want to compress), and send it to server via sms. In this thread, I think I didn't need to tell it more, because out of topic. My application run well in my Nokia N81 when I test it.
In server side, I'm use sms gateway concept to send and receive sms from and to client (also using database mysql). Database will saving 4 things (in 4 field) : ID client (generate by server in client registration phase), name+phone number of client (that contained in sms of registration), and file backup phone book (that send by client in sending file phase, in form of sms). My thread focus in server side.
I want to make an script for the eventhandler (will be add on /etc/smsd.conf) that contain with that three condition above :
1. ) In registration phase.
Check incoming sms from client that register to server via SMS.
If incoming sms contain "reg" (not case sensitive), server will generate an ID for client (ie : Cxxx) and send a sms : "$name, thanks for registration. Your ID is $id_client_that_generated_by_server_after_client_registration"
If sms didn't contain "reg", server will send client a sms "Sorry, your format is wrong. Type : REG#your_name".
2.) Request sending file to server (by client) phase.
Check incoming sms from client that contain "KRM#id_client" (KRM not case sensitive).
If incoming sms didn't contain "krm" and or wrong/not valid ID, server will send client a sms "The format of your sms and or your ID is wrong. Type KRM#ID"
If it's true, server will send a sms to client :"$name, now you may send files to server".
And after client send their file to server via sms and server received it, server will send sms report to client : "$name, your file was saved in the server".
3. Check incoming sms form client that contain "GET#id_client" (GET not case sensitive).
If incoming sms didn't contain "get" and or wrong/not valid ID, server will send client a sms "your format of sms or your ID is wrong. Type GEt#ID"
If it's true, server will send a sms to client :"$name, wait a minutes. We will send your file via SMS".
I've try to write the script (based on example of sms server tools and also my friend) to solve my problem in server side above (but "reg" only, I can't for "krm" and "get" :( ), like this :
#!/bin/sh
#script : BUPB_handler
#location : /usr/local/bin
#script for insert client data via sms
#it will run when sms received
#the data of client will be insert to database mysql 'bupbdb' if contain 'reg'
if ["$1" !="RECEIVED"]; then
exit; fi;
#parameter of DB
SQL_HOST=localhost
SQL_USER=root
SQL_PASSWORD=root
SQL_DATABASE=bupbdb
SQL_TABLE=cltsms
#extract the data from sms file
FROM='formail -zx From : < $2'
TEXT='formail -I "" <$2 | sed -e"id"'
#setting some parameters of SQL
if ["$SQL_PASSWORD" !=""]; then SQL_ARGS="-p $SQL_PASSWORD";
else
SQL_ARGS="";
fi
SQL_ARGS="-h $SQL_HOST -u $SQL_USER $SQL_ARGS -D $SQL_DATABASE -s -e"
#check if the message contain 'reg'
TEXTS='echo $TEXT|sed -e's/[\t]//g''
if echo $TEXT|grep -qi "reg" then
KODE='mktemp Pxxxx'
NAME='echo $TEXTS|cut -f2 -d#'
#Insert data into cltsms table
A='mysql $SQL_ARGS "Insert into $SQL_TABLE (client_id,notel,name) values(\"$KODE\",\"$FROM\")",\"$NAME\"); "'
#Make sms that contain the reply of registration (for client), if true
FILENAME='mktemp /var/spool/sms/outgoing/REGBXXXXXX'
echo "To : $FROM" >$FILENAME
echo "" >> $FILENAME
echo "$NAME, you're registered with ID $CODE" >>$FILENAME
else
#Make sms that contain the reply of registraion (for client), if false
FILENAME='mktemp /var/spool/sms/outgoing/REGSXXXXXX'
echo "To : $FROM" >$FILENAME
echo "" >> $FILENAME
echo "Your format of SMS is wrong. Type : 'REG#nama'" >>$FILENAME
fi
I'm save it in /usr/local/bin as BUPB_handler (or in BUPB_handler.sh? :roll: ) and put a line in /etc/smsd.conf.
The configuration like this :
# Example smsd.conf. Read the manual for a description
devices = C650
logfile = /var/log/smsd.log
failed = /var/spool/sms/failed
sent = /var/spool/sms/sent
incoming = /var/spool/sms/incoming
checked = /var/spool/sms/checked
outgoing = /var/spool/sms/outgoing
loglevel = 7
eventhandler = /usr/local/bin/BUPB_handler
[C650]
device = /dev/ttyACM1
baudrate = 460800
incoming = yes
cs_convert = yes
rtscts = yes
send_delay = 300
report = yes
pin = 1111
But unfortunatelly, it didn't run well. What's wrong with that? :(
Hope you help me.
Thanks.
Regard
|
Tue Jul 28, 2009 13:10
|
certain_death: OMG, I'm forget :(
ya, now it can, using space after it.
|
Tue Jul 28, 2009 12:51
|
certain_death: Hi keke and all,
I've try again my sms gateway using sms server tools and motorola C650 (as modem) in Fedora 8.
But, seem that any problem here.
My phone (motorola) detected by Fedora 8
[root@astina-pura Desktop]# lsusb
Bus 001 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 005: ID 22b8:4902 Motorola PCS E398 GSM Phone
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 002: ID 1131:1004 Integrated System Solution Corp.
Bus 002 Device 001: ID 0000:0000
But, when tyr to modprobe, why it's show message error like this?
[root@astina-pura Desktop]# modprobe usbserial vendor= 22b8 product= 4902
FATAL: Error inserting usbserial (/lib/modules/2.6.23.1-42.fc8/kernel/drivers/usb/serial/usbserial.ko): Invalid argument
[root@astina-pura Desktop]#
Something wrong with my phone?Or something wrong with Fedora 8 and or its configuration?
What should I do?
FYI :
Yesterday, my motorola is well and I'm success send a sms from PC to my another phone.
Hope you help me.
Thanks.
|
Mon Jul 27, 2009 17:02
|
certain_death: Hi keke, I'm success to send a sms from my PC (fedora 8) using sms server tools (Motorola C650 as modem).
here the log
2009-07-27 23:59:20,2, smsd: Smsd v3.1.5 started.
2009-07-27 23:59:20,2, smsd: Running as root:root.
2009-07-27 23:59:20,7, smsd: Running startup_check (shell): /tmp/smsd_script.K5L9mw /tmp/smsd_data.IPGRYM
2009-07-27 23:59:20,7, smsd: Done: startup_check (shell), execution time 0 sec., status: 0
2009-07-27 23:59:20,4, smsd: File mode creation mask: 022 (0644, rw-r--r--).
2009-07-27 23:59:20,5, smsd: Outgoing file checker has started. PID: 6384.
2009-07-27 23:59:20,5, C650: Modem handler 0 has started. PID: 6385.
2009-07-27 23:59:20,5, C650: Using check_memory_method 1: CPMS is used.
2009-07-27 23:59:21,6, C650: I have to send 1 short message for /var/spool/sms/checked/send_YZ6094
2009-07-27 23:59:21,6, C650: Sending SMS from to 6285xxxx
2009-07-27 23:59:21,6, C650: Checking if modem is ready
2009-07-27 23:59:21,7, C650: -> AT
2009-07-27 23:59:22,7, C650: Command is sent, waiting for the answer
2009-07-27 23:59:22,7, C650: <- AT OK
2009-07-27 23:59:22,6, C650: Pre-initializing modem
2009-07-27 23:59:22,7, C650: -> ATE0+CMEE=1
2009-07-27 23:59:26,7, C650: Command is sent, waiting for the answer
2009-07-27 23:59:26,7, C650: <- ATE0+CMEE=1 OK
2009-07-27 23:59:26,6, C650: Checking if modem needs PIN
2009-07-27 23:59:26,7, C650: -> AT+CPIN?
2009-07-27 23:59:29,7, C650: Command is sent, waiting for the answer
2009-07-27 23:59:29,7, C650: <- +CPIN: READY OK
2009-07-27 23:59:29,7, C650: -> AT+CSQ
2009-07-27 23:59:31,7, C650: Command is sent, waiting for the answer
2009-07-27 23:59:32,7, C650: <- +CSQ: 27,99 OK
2009-07-27 23:59:32,6, C650: Checking if Modem is registered to the network
2009-07-27 23:59:32,7, C650: -> AT+CREG?
2009-07-27 23:59:35,7, C650: Command is sent, waiting for the answer
2009-07-27 23:59:35,7, C650: <- +CREG: 0,1 OK
2009-07-27 23:59:35,6, C650: Modem is registered to the network
2009-07-27 23:59:35,6, C650: Selecting PDU mode
2009-07-27 23:59:35,7, C650: -> AT+CMGF=0
2009-07-27 23:59:38,7, C650: Command is sent, waiting for the answer
2009-07-27 23:59:38,7, C650: <- OK
2009-07-27 23:59:38,7, C650: -> AT+CIMI
2009-07-27 23:59:41,5, smsd: Moved file /var/spool/sms/outgoing/send_Yv6395 to /var/spool/sms/checked
2009-07-27 23:59:41,7, C650: Command is sent, waiting for the answer
2009-07-27 23:59:41,7, C650: <- +CIMI: 51001633043xxxx OK
2009-07-27 23:59:41,7, C650: -> AT+CGSN
2009-07-27 23:59:44,7, C650: Command is sent, waiting for the answer
2009-07-27 23:59:44,7, C650: <- +CGSN: IMEI35450800666xxxx OK
2009-07-27 23:59:44,5, C650: CGSN: 35450800666xxxx
2009-07-27 23:59:44,5, C650: IMSI: 51001633043xxxx
2009-07-27 23:59:44,6, C650: Checking if reading of messages is supported
2009-07-27 23:59:44,7, C650: -> AT+CPMS?
2009-07-27 23:59:47,7, C650: Command is sent, waiting for the answer
2009-07-27 23:59:47,7, C650: <- +CPMS: "MT",1,1016,"OM",1,254,"IM",0,254 OK
2009-07-27 23:59:47,7, C650: -> AT+CMGS=18
2009-07-27 23:59:50,7, C650: Command is sent, waiting for the answer
2009-07-27 23:59:51,7, C650: <- >
2009-07-27 23:59:51,7, C650: -> ( PDU REMOVED ).
2009-07-28 00:00:02,7, C650: Command is sent, waiting for the answer
2009-07-28 00:00:06,7, C650: <- +CMGS: 6 OK
2009-07-28 00:00:06,5, C650: SMS sent, Message_id: 6, To: 6285xxxx, sending time 45 sec.
2009-07-28 00:00:06,6, C650: Moved file /var/spool/sms/checked/send_YZ6094 to /var/spool/sms/sent/send_YZ6094
2009-07-28 00:00:07,6, C650: I have to send 1 short message for /var/spool/sms/checked/send_Yv6395
2009-07-28 00:00:07,6, C650: Sending SMS from to 6285xxxx
2009-07-28 00:00:07,6, C650: Checking if Modem is registered to the network
2009-07-28 00:00:07,7, C650: -> AT+CREG?
2009-07-28 00:00:10,7, C650: Command is sent, waiting for the answer
2009-07-28 00:00:10,7, C650: <- +CREG: 0,1 OK
2009-07-28 00:00:10,6, C650: Modem is registered to the network
2009-07-28 00:00:10,7, C650: -> AT+CMGS=18
2009-07-28 00:00:14,7, C650: Command is sent, waiting for the answer
2009-07-28 00:00:14,7, C650: <- >
2009-07-28 00:00:14,7, C650: -> ( PDU REMOVED ).
2009-07-28 00:00:26,7, C650: Command is sent, waiting for the answer
Thanks for your great help, keke.
Go Linux and open source .
|
Mon Jul 27, 2009 16:58
|
certain_death: OMG, fool again :(
here is :
[root@astina-pura 8yt35c0d3]# smsd -C C650
Communicating with C650. ( Press Ctrl-C to abort. )
( If you need to send Ctrl-Z, change the suspend character first, like stty susp \^N )
Default device is /dev/ttyACM0
Press Enter to start or type an another device name.
Opening device /dev/ttyACM0
Ready.
ATE1
OK
AT+CPMS=?
+CPMS: ("IM","OM","BM","MT","DM"),("OM","DM"),("IM")
OK
AT+CPMS?
+CPMS: "MT",1,1016,"OM",1,254,"IM",0,254
OK
[root@astina-pura 8yt35c0d3]#
Seem that it same as your example.
here the log :
2009-07-27 23:54:18,2, smsd: Smsd v3.1.5 started.
2009-07-27 23:54:18,2, smsd: Running as root:root.
2009-07-27 23:54:18,7, smsd: Running startup_check (shell): /tmp/smsd_script.Zkrcer /tmp/smsd_data.Vn2iIk
2009-07-27 23:54:18,7, smsd: Done: startup_check (shell), execution time 0 sec., status: 0
2009-07-27 23:54:18,4, smsd: File mode creation mask: 022 (0644, rw-r--r--).
2009-07-27 23:54:18,2, smsd: Running in terminal mode.
2009-07-27 23:54:18,5, smsd: Outgoing file checker has started. PID: 6355.
2009-07-27 23:54:18,2, C650: Communicating with terminal.
2009-07-27 23:54:55,2, smsd: Smsd mainprocess is awaiting the termination of all modem handlers. PID: 6355.
2009-07-27 23:54:55,2, C650: Modem handler 0 terminated. PID: 6357, was started 09-07-27 23:54:18.
2009-07-27 23:54:55,2, smsd: Smsd mainprocess terminated. PID 6355, was started 09-07-27 23:54:18.
Wait, I'll try to send a SMS and I will report here the result. Thanks.
|
Mon Jul 27, 2009 16:30
|
certain_death: OMG, I'm so stupid...
Thanks for your reply :)
OK, I'm try it (in /usr/bin)
But, it didn't open the modem like your example :(
[root@astina-pura bin]# smsd -C C650
Communicating with C650. ( Press Ctrl-C to abort. )
( If you need to send Ctrl-Z, change the suspend character first, like stty susp \^N )
Default device is /dev/ttyACM0
Press Enter to start or type an another device name.
And it is in log
2009-07-27 23:23:15,2, smsd: Running in terminal mode.
2009-07-27 23:23:15,5, smsd: Outgoing file checker has started. PID: 6119.
2009-07-27 23:23:15,2, C650: Communicating with terminal.
2009-07-27 23:28:20,2, C650: Unable to talk with modem.
2009-07-27 23:28:20,2, smsd: Smsd mainprocess is awaiting the termination of all modem handlers. PID: 6119.
2009-07-27 23:28:20,2, C650: Modem handler 0 terminated. PID: 6121, was started 09-07-27 23:23:15.
2009-07-27 23:28:20,2, smsd: Smsd mainprocess terminated. PID 6119, was started 09-07-27 23:23:15.
Something wrong with my phone or configuration?
If my phone (Motorola C650) didn't compatible with sms server tools, can I use my another phone (Nokia N81 8GB) as a modem?
Thanks for your great help.
|
Mon Jul 27, 2009 15:54
|
certain_death: "ME" value get from handphone memory (in default, handphone will check at SIM, CMIIW).
Sorry if my questions are too stupid... :
1.) You could try without init string. Comment it out in the smsd.conf.
OK, this is my conf at smsd.conf
# Example smsd.conf. Read the manual for a description
devices = C650
logfile = /var/log/smsd.log
failed = /var/spool/sms/failed
sent = /var/spool/sms/sent
loglevel = 7
#eventhandler = /usr/local/bin/sql_ku
[C650]
device = /dev/ttyACM0
baudtrate = 460800
incoming = yes
cs_convert = yes
rtscts = yes
send_delay = 300
report = yes
pin = 1111
2. ) Stop all smsd processes.
[root@astina-pura smstools3]# /etc/init.d/sms3 stop
3.) Then I didn't know where to do it ?
smsd -C C650, ATE1, AT+CPMS=? and AT+CPMS?
[root@astina-pura smstools3]# smsd -C C650
There was 1 error while reading the config file:
- Unknown setting for modem C650: baudtrate
There was 1 major problem found.
Cannot start. See the log file for details.
Need your help again sir. Thanks.
|
Page: 1 2 Next
Time in this board is UTC.
|
|
|
 |
|
 |
|