Keywords: Mode: All keywords (AND) |
Tue Jun 01, 2010 02:36
|
weixla: Thank you keke . It works good.
|
Mon May 31, 2010 10:03
|
weixla: yes , but what can I recode the text part not all pary.
|
Mon May 31, 2010 09:46
|
weixla: It`s done. Thanks, edo.
And what can I do that I use checkhandler. how can I convert the outgoing files character set the text only.
If I use
#!/bin/sh
FILE=`mktemp /tmp/smsd_XXXXXX`
iconv -t ucs-2be -f UTF-8 < $1 > $FILE
mv $FILE $1
chmod 644 $1
It will failed. the error is 'No destination in file /var/spool/sms/outgoing/send_001'.
Thank you.
|
Mon May 31, 2010 08:41
|
weixla:
sendsms is designed to work with 7bit ascii only.
you need something like this:
#!/bin/sh
FILE=`mktemp /tmp/smsd_XXXXXX`
DEST=$1
TEXT=$2
if [ -z "$DEST" ]; then
printf "Destination: "
read DEST
fi
if [ -z "$TEXT" ]; then
printf "Text: "
read TEXT
fi
echo "To: $DEST" >> $FILE
echo "Alphabet: UCS" >> $FILE
echo "" >> $FILE
echo -n "$TEXT" | iconv -t ucs-2be >> $FILE
chmod 644 $FILE
mv $FILE /var/spool/sms/outgoing/
ps: sorry, i don't test this script ;)
:oops:
I create a new file named out-convert.pl with your script. and edit the smsd.conf,add one line with 'checkhandler = /bin/smsd/out-convert.pl'.
when I execute the command with '/etc/init.d/sms3 start', I get the arguments $1,$2 is '/var/spool/sms/outgoing/send_B16223' and empty.
|
Mon May 31, 2010 04:48
|
weixla: Operating system name and version: Linux version 2.6.24-19-generic,Ubuntu 4.2.3-2ubuntu7
Version of smsd: smstools3-3.1.8
Smsd installed from: sources
Name and model of a modem / phone: GSM MODEM
Interface: USB
Please excuse for my poor english. I am a common chinese coder.
The problem was that I send a short messge by using command "sendsms 8613708203321 '测试'".
when my phone received this message, I saw the content was Mis-coding/Disorderly code,like 'au@e'.
the smsd.conf was
devices = GSM1
logfile = /var/log/smsd.log
loglevel = 5
delaytime = 3
checked = /var/spool/sms/checked
failed = /var/spool/sms/failed
incoming = /var/spool/sms/incoming
outgoing = /var/spool/sms/outgoing
sent = /var/spool/sms/sent
[GSM1]
device = /dev/ttyUSB0
baudrate = 9600
incoming = yes
memory_start=0
check_memory_method=2
Can you tell me what can I do. thanks
|