I got Raspberry Pi, Raspbian, Nokia CS-17 and SMS Tools 3 (v. 3.1.15). I use EXIM4 for sending emails.
Read documents and community forum for SMS Tools 3:
http://smstools3.kekekasvi.com/index.php?p=configure
http://smstools3.kekekasvi.com/index.php?p=run
http://smstools3.kekekasvi.com/board.php
I did use this document for EXIM4, works well.
http://library.linode.com/email/exim/se ... -6-squeeze
Why this way? Why not latest and greatest smart phone on the road? This way it is so much more fun

Here is RasPi with Nokia CS-17:

SMS Diary - http://www.arkki.info/ (in finnish only, sorry for that)
SMS Diary - https://twitter.com/AsmoStJamesWay (in finnish only, sorry for that)
SMS Diary - https://www.facebook.com/asmo.koskinen (in finnish only, sorry for that)
I send SMS to RasPi66, RasPi66 sends it to Gmail. Postie from Wordpress fetches email as a blog update and WP to Twitter updates Twitter. And finally Twitter updates Facebook status.
SMS in Wordpress:

Link in Twitter:

Link in Facebook:

http://wordpress.org/extend/plugins/postie/
http://wordpress.org/extend/plugins/wp-to-twitter/
RasPi66 sends to me a SMS about it's uptime every day at noon.
Good friend of mine, Mikael, improved my original bash scripts (he is professional, me - just another hobbyist). Thank you, Mikael!
-----
Here is my working setup, comments are welcome

1. Raspberry Pi, Raspbian, SMS Tools 3 and Nokia CS-17 work together.
Code: Select all
[ 99.324483] usb 1-1.2: new high-speed USB device number 5 using dwc_otg
[ 99.426069] usb 1-1.2: New USB device found, idVendor=0421, idProduct=0623
[ 99.426100] usb 1-1.2: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[ 99.426117] usb 1-1.2: Product: Nokia Datacard
[ 99.426131] usb 1-1.2: Manufacturer: Nokia
[ 99.426145] usb 1-1.2: SerialNumber: 1DE419ABDA600E71611474367488B1DCFFA70132
[ 99.945175] cdc_acm 1-1.2:1.1: ttyACM0: USB ACM device
[ 100.051434] cdc_acm 1-1.2:1.3: ttyACM1: USB ACM device
a. /etc/smsd.conf
Code: Select all
devices = GSM
outgoing = /var/spool/sms/outgoing
sent = /var/spool/sms/sent
checked = /var/spool/sms/checked
incoming = /var/spool/sms/incoming
failed = /var/spool/sms/failed
logfile = /var/log/smstools/smsd.log
infofile = /var/run/smstools/smsd.working
pidfile = /var/run/smstools/smsd.pid
stats = /var/log/smstools/smsd_stats
loglevel = 5
receive_before_send = yes
autosplit = 0
decode_unicode_text = yes
filename_preview = 6
date_filename = 1
datetime_format = %Y-%m-%d-%H-%M
incoming_utf8 = yes
language_file = /usr/local/etc/language-UTF-8.fi
eventhandler = /usr/local/bin/clean_up_and_mailx
[GSM]
init = AT+CPMS="ME","ME","ME"
check_memory_method = 5
device = /dev/ttyACM0
incoming = yes
outgoing = yes
cs_convert = yes
report = no
signal_quality_ber_ignore = yes
report_device_details = yes
Code: Select all
#!/bin/bash
# To whom
TO=(username here)@gmail.com
# Directory for SMS messages
INCOMING=/var/spool/sms/incoming
# Directory for messages
EMAIL=/var/spool/sms/email
# Directory for emailed messages
EMAILED=/var/spool/sms/emailed
# Add subject to the email
SUBJECT="$(date '+%a %d/%m/%Y %H:%M')"
# Exit with error
die() {
[[ -n $1 ]] && echo $1
exit 1
}
# Remove lines and send cleaned up SMS to Gmail/Postie/Wordpress
process_message() {
message="${1}"
echo "PROCESSING $message"
sed '1,12d' "${message}" | /usr/bin/mailx -s "$SUBJECT" $TO
mv ${message} $EMAILED || die
return 0
}
### MAIN ###
# Make sure the directories exist
for dir in $INCOMING $EMAIL $EMAILED; do
if [ ! -e ${dir} ]; then
mkdir -p ${dir} || die
fi
done
# For eventhandler
if [ "$1" = "RECEIVED" ]; then
for incoming_sms in ${INCOMING}/*; do
case $incoming_sms in
# Check for "Laudes", "Sextam" and "Vesper"
*Laudes* | *Sextam* | *Vesper* )
process_message $incoming_sms
;;
# Remove anything else
*)
if [ -e $incoming_sms ]; then
rm -f $incoming_sms || die
echo "$incoming_sms is trashed"
fi
;;
esac
done
fi
exit 0
# EOF
Code: Select all
#!/bin/bash
TO=35845xxxxxxxx
OUTGOING=/var/spool/sms/outgoing
# Exit with error
die() {
[[ -n $1 ]] && echo $1
exit 1
}
### MAIN ###
# Make sure the outgoing directory exists
if [ ! -e ${OUTGOING} ]; then
mkdir -p ${OUTGOING} || die
fi
# Construct uptime SMS message
(
echo -e "To: $TO\n"
/usr/bin/uptime
) > ${OUTGOING}/UPTIME-SMS || die
exit 0
Code: Select all
root@RasPi66:~# crontab -l
0 12 * * * /usr/local/bin/uptime_sms
*/5 * * * * /usr/bin/curl -O /dev/null http://www.arkki.info/wp-content/plugins/postie/get_mail.php >/dev/null 2>&1
Code: Select all
root@RasPi66:/var/spool/sms/emailed# cat 2013-03-15.GSM.iK0tQw-Laudes
Lähettäjä: 35845xxxxxxx
Osoitetyyppi: 91 international, ISDN/telephone
Viestikeskus: 358508771035
Lähetetty: 15.03.2013 11:31:45
Vastaanotettu: 15.03.2013 11:31:53
Otsikko: GSM
Modeemi: GSM
Liittymätunniste: 244915810098636
Raportti: ei
Merkistö: UTF-8
Pituus: 175
Laudes TESTI Tässä viestissä on enemmän kuin 140 merkiää... Osaako SMS Tools 3 käsitellä moniosaisia viestejä? Katsotaan, kun lähetän tämän viestin. Nämä merkit ovat osassa 2.
a. tail -f /var/log/smsd.log
Code: Select all
2013-03-15 11:31:53,5, GSM: SMS received (part 1/2), From: 35845xxxxxxx
2013-03-15 11:31:53,5, GSM: SMS received (part 2/2), From: 35845xxxxxxx
2013-03-15 11:31:54,3, GSM: Exec: eventhandler said something:
2013-03-15 11:31:54,3, GSM: ! PROCESSING /var/spool/sms/incoming/2013-03-15.GSM.iK0tQw-Laudes
2013-03-15 11:35:31,5, GSM: SMS received, From: 35845xxxxxxx
2013-03-15 11:35:31,3, GSM: Exec: eventhandler said something:
2013-03-15 11:35:31,3, GSM: ! /var/spool/sms/incoming/2013-03-15.GSM.26Rutg-Tama_v is trashed
Code: Select all
2013-03-15 11:31:59 1UGQzS-0003LA-5z => (username_here)@gmail.com R=dnslookup T=remote_smtp H=gmail-smtp-in.l.google.com [173.194.71.26] X=TLS1.2:RSA_ARCFOUR_SHA1:128 DN="C=US,ST=California,L=Mountain View,O=Google Inc,CN=mx.google.com"
2013-03-15 11:31:59 1UGQzS-0003LA-5z Completed
Best Regards Asmo Koskinen.