This is an old revision of the document!


xAP SMS

The xap-sms daemon allows the Livebox to send and receive SMS messages with a mobile phone.

The SMS messages are converted into xAP for transport on our bus so that other software can deal with them and react. Usage of this hardware requires additional programming to setup the control structures that you require. It doesn't do anything out of the box - see the sample programs section below.

Testing was done using a NOKIA-7110 your mileage may vary with other handsets. However if they are compatible with the COMMAND SET then they should just work.

Connecting the phone to the Livebox will requires a DLR-3 cable and a USB/Serial cable.

xap-sms connects at 19200baud.

The command line options:

# xap-sms --help

SMS Connector for xAP v12
Copyright (C) DBzoo, 2009

xap-sms: [options]
  -n, --instance NAME    Default sms
  -i, --interface IF     Default br0
  -p, --port NUM         Default 3639
  -s, --serial DEV       Default /dev/ttyUSB1
  -d, --debug            0-9
  -h, --help

Schema for the body of outgoing xAP message

xap-header
{
v=12
hop=1
UID=FF00DD00
target=dbzoo.livebox.SMS
source=dbzoo.acme.test
class=SMS.message
}
outbound
{
msg=(Message text upto 128 characters)
num=(Telephone number to send to)
}

Schema for the body of an incoming SMS message

xap-header
{
v=12
hop=1
UID=FF00DD00
source=dbzoo.livebox.SMS
class=SMS.message
}
inbound
{
msg=(message text)
num=(Telephone number of sender)
timestamp=(date time)
}

There are two configuration parameters in /etc/xap-livebox.ini that xap-sms honours. Whether the daemon should be started or not and the USB serial device where the phone can be found. These can also be updated via the WEB interface.

[sms]
enable=1
usbserial=/dev/ttyUSB1

Sample python programs, also see the HAH xAP Python page

  • xaplib.zip - Support library
  • xap-sms-lcd.zip - Watch out for inbound SMS messages when one is detected broadcast its message to the Livebox LCD
  • xap-sms-event.zip - Watch out for an RF or RELAY event when one if detected send an SMS of the change