Ofono driver

Domotcl driver for mobile phone telephony service. This driver requires the ofono library to be able to operate.

Ofono library

These are the instructions for installation of the ofono library on a Raspberry Pi. For other linux distributions slight adaptations may be necessary.
Install prerequisites
To be able to compile the ofono library, a number of development packages must be installed.
    sudo apt-get install libglib2.0-dev libdbus-1-dev libudev-dev
    sudo apt-get install mobile-broadband-provider-info
Download and compile
These instructions were tested with ofono 1.18. You may choose to use a newer version, if available.
    cd /tmp
    wget https://www.kernel.org/pub/linux/network/ofono/ofono-1.18.tar.gz
    tar xvf ofono-1.18.tar.gz 
    cd ofono-1.18/
    ./configure
    make
Install and configure
With the normal installation, ofono will not start on boot. Provisions have to be taken to start it when accessed via dbus.
    sudo make install
    cd /usr/share/dbus-1/system-services
    sudo bash -c "cat > org.ofono.service" << 'EOF'
    [D-BUS Service]
    Name=org.ofono
    Exec=/bin/false
    User=root
    SystemdService=ofono.service
    EOF
Edit /etc/dbus-1/system.d/ofono.conf to include a policy for the bluetooth group:
    <policy group="bluetooth">
      <allow send_destination="org.ofono"/>
    </policy>
Also make sure the account running domotcl is part of the bluetooth group. If necessary, add the user to that group.
    usermod -a -G bluetooth domotcl

Mobile type

Arguments

address

Properties

battery
An integer value between 0 and 100.
signal
An integer value between 0 and 100.
service
Boolean (true or false).
call
callerid
connected
Boolean (true or false).
online
Boolean (true or false).

Events

battery
Fires whenever the value of the battery property changes.
signal
Fires whenever the value of the signal property changes.
service
Fires whenever the value of the service property changes.
call
Fires whenever the value of the call property changes.
callerid
Fires whenever the value of the callerid property changes.
connected
Fires whenever the value of the connected property changes.
online
Fires whenever the value of the online property changes.