Data Channel Service
The Data Channel Service (DCS) provides an interface for a client application to configure and use the available data channels on its target.
"Data channel" is a generic term meant to include and cover the data "connection", "link", or similiar, named for and established by various connectivity technologies as a communication channel or pipe for sending and receiving data packets on a network or with another endpoint. DCS's currently supported connectivity technologies are cellular and WiFi, both of which would bring up the network layer for their connections and employ IP addressing and routing to communicate.
The following diagram illustrates at the overview level where the DCS interfaces are relative to client applications and the physical technologies underneath, as well as what the "channel", "connection", "technology", etc., terminologies refer to.
The Data Channel Service contains two sets of APIs:
le_data.api
- legacy API interface that has been supported prior Legato Release 18.10.le_dcs.api
andle_net.api
- new API interfaces that are currently in experimental state.
Getting Started
This service is automatically included in the Legato Framework by including default.sdef
in your system and the service loads automatically on startup.
The following line in the default.sdef
is responsible for adding the Data Channel Service to your system:
apps: { $LEGATO_ROOT/apps/platformServices/dataConnectionService }
le_data vs le_dcs
The new interfaces le_dcs
and le_net
consist of an expanded architecture for supporting multiple active data channels of the same or different technologies which the legacy le_data
interface doesn't have. They offer flexible choices to client applications over which specific technology and data channel to pick, and the querying capability to learn about all the choices available. Unlike them, the legacy le_dcs.api
supports only one single channel on a device at any time and offers no choices over which technology and channel to select.
Please refer to the diagram above to see how multiple active data connections can now be supported in the le_dcs
architecture.
- Warning
- Any client application that continues to use the
le_data
interface needs to beware of the new reality that multiple data channels could have been active if some others have started them via thele_dcs
interface. The one that it has started might not have the device's default gateway and DNS server addresses set on its network interface, because although these network configurations would be automatically inserted by thele_data
interface, some other data channel that got established later viale_dcs
andle_net
could have set these configurations onto another network interface instead. Thus, the network admin of any Legato device on which bothle_data
andle_dcs
plusle_net
would be used together has to understand the network topology and manage its routing configurations properly at any time.
Concepts
The concepts section is in the process of being written.
APIs
The Data Channel Service now provides the following API interfaces for managing and operating over network connections.
API Guide | API Reference | File Name | Description |
---|---|---|---|
le_dcs Interface | le_dcs_interface.h | le_dcs.api | Provides multi-connection data channel services |
le_net Interface | le_net_interface.h | le_net.api | Provides network services to data channels managed by le_dcs |
IPC Interface Binding to DCS
For an application to be able to use the le_dcs
and le_net
APIs, it needs to perform the bindings in the application's .adef as done below:
bindings: { clientExe.clientComponent.le_dcs -> dataConnectionService.le_dcs clientExe.clientComponent.le_net -> dataConnectionService.le_net }
App Implementation
The Data Channel Service is implemented by the dataConnectionService that relies on the following services for connection technologies:
When an application needs to use such connection technologies, it has to create IPC bindings and service connections to them as done in the following sample.
To create IPC bindings:
bindings: { clientExe.clientComponent.le_mdc -> modemService.le_mdc clientExe.clientComponent.le_wifiClient -> <root>.le_wifiClient }
To create service connections, in the application's COMPONENT_INIT() code:
le_mdc_ConnectService(); le_wifiClient_ConnectService();
How Tos & Samples
- Migration tips from le_data to le_dcs.
- Sample apps using DCS. Please search through the code there for API calls to
le_dcs
andle_net
.
Copyright (C) Sierra Wireless Inc.