Application-Level APIs

Applications access software and hardware features of the phone using a number of APIs. Some features are not directly accessible to applications, either because they lack a suitable API that can be accessed from a Flatpak sandbox, or because they require elevated privileges on the underlying system.

Lower level access to features is described in some detail in the How To Guides for the Librem 5 development kit.

Audio

The audio services of the phone can be accessed in a number of ways. These include:

Examples:

Battery Gauge

Battery state and charge level can be read and monitored using the org.freedesktop.UPower D-Bus interface provided by the upowerd daemon. This is described in the UPower D-Bus API Reference documentation.

Bluetooth

Access to Bluetooth devices is managed using the gnome-bluetooth API – see also the GnomeBluetooth Python API.

Haptic Motor

The haptic (vibration) motor is accessed using the org.sigxcpu.Feedback D-Bus interface provided by the feedbackd daemon. This is described in the feedbackd D-Bus interface documentation.

Inertial Module

This sensor can be read and monitored using the net.hadess.SensorProxy D-Bus interface provided by the iio-sensor-proxy daemon. This is described in the net.hadess.SensorProxy documentation.

LEDs

The LEDs are accessed using the using the org.sigxcpu.Feedback D-Bus interface provided by the feedbackd daemon. This is described in the feedbackd D-Bus interface documentation.

Modem/WWAN

The modem can be accessed via the org.freedesktop.ModemManager1 D-Bus interface provided by ModemManager. This is described in the ModemManager D-Bus APIs documentation.

Networking

Access to information about network connections can be obtained using the org.freedesktop.NetworkManager D-Bus interface provided by NetworkManager. This is described in the NetworkManager D-Bus APIs documentation.

Examples:

Proximity and Ambient Light Sensors

These sensors can be read and monitored using the net.hadess.SensorProxy D-Bus interface provided by the iio-sensor-proxy daemon. This is described in the net.hadess.SensorProxy documentation.

Examples:

Push Buttons

The states of the push buttons, such as the volume up and down buttons, can be read using the standard GTK widget key press and key release events.

Examples: