This guide covers the interfaces that are available on the Librem 5 (USB, Wi-Fi, Bluetooth, cellular) and discusses how each of them are used for network communication. In addition, it describes various tasks that applications may need to perform, such as checking for network availability.
The Librem 5 has a number of different interfaces that enable data communication with external networks and devices. These all allow network protocols to be used for communication and are managed using standard tools and frameworks (NetworkManager and ModemManager). As a result, application developers do not need to know about the precise mechanisms used to manage them, but may need to know how to request access to each type of network interface.
Wireless networking is configured and enabled using the GNOME Control Center application.
When wireless networking is enabled, applications will be able to access it without any further configuration as long as they have requested permission to access the network in general. For applications distributed as flatpaks, this is achieved by specifying the
--share=network permission in the manifest file. See the Application Permissions guide for details.
It is expected that USB networking will be configured by a system component that exposes a general networking interface to applications. This section will be revised and updated with more details later.
This section will be completed later to outline how NetworkManager can be used to set up network connections via Bluetooth, and also to cover the permissions needed by applications to specifically use Bluetooth networking, if relevant.
This section will be completed later to outline how ModemManager can be used to set up cellular network connections at the command line and using a GUI, as well as describing any permissions needed by applications to specifically use cellular networking, if relevant.
There are a number of common tasks that network-aware applications may need to perform.
Since the network interfaces are managed by a common framework, it is possible to obtain information about network availability and any limitations on network usage.
The Network State example shows how to access these kinds of information, showing the level of access to the network, availability of the network, and whether the connection is metered.
This information is obtained using methods of the Gio.NetworkMonitor class.
Although the application may request full network access, the system may limit the connectivity in some way depending on the user’s preferences.