sms4you

Personal gateway connecting SMS with XMPP.

sms4you logo

sms4you forwards messages from and to SMS and connecting it with with Extensible Messaging and Presence Protocol (XMPP). Nice for receiving or sending SMS, independently from carrying a SIM card.

sms4you on a Raspberry Pi

Idea

Connect a suitable GSM modem or phone containing a SIM card into a computer (e.g. a Raspberry Pi) at a fixed place. Give sms4you access to a small xmpp server. It will use this connection to receive xmpp messages to be sent out as SMS and to send out xmpp messages with received SMS messages.

Concretely - why?

There can be many reasons, why you want to use sms4you. Here are some examples:

Dependencies

sms4you is implemented as a Python daemon, using Asynchronous I/O and depends on the following python packages:

In addition it requires the following services to be installed on the system:

Installation

Prosody

Add the following lines to your prosody configuration, e.g. /etc/prosody/prosody.cfg.lua:

Component "sms4you.localhost"
    component_secret = "Mb2.r5oHf-0t"

Run sms4you as unprivileged user

$ sudo addgroup --force-badname --system _sms4you
$ sudo adduser --force-badname --home /nonexistent \
      --ingroup _sms4you --no-create-home --system _sms4you
$ sudo cp sms4you.conf /etc/dbus-1/system.d/
$ sudo cp sms4you.pkla /var/lib/polkit-1/localauthority/30-site.d/
$ sudo chown root:_sms4you /etc/sms4you/{sim_pin,xmpp_component_password}
$ sudo chmod 640 /etc/sms4you/{sim_pin,xmpp_component_password}

sms4you-xmpp

Save the password (Mb2.r5oHf-0t) in /etc/sms4you/xmpp_component_password.txt. and configure the XMPP account (JID), which should be allowed to send and receive SMS in /etc/sms4you/sms4you.ini:

USER_JID=user@jabberserver.foo.bar

You probably need to configure more details in /etc/systemd/system/sms4you-xmpp.service. Look at the command line arguments: /usr/local/sbin/sms4you-xmpp --help.

Let's Go