The Cellular Network service ensures that the modem is registered on the network when an user application makes a request for network access. This includes:
If all of the above conditions are met, then the service indicates that the network is available.
All the functions of this API are provided by the cellNetService application service.
Here's a code sample binding to Cellular Network services:
bindings: { clientExe.clientComponent.le_cellnet -> cellNetService.le_cellnet }
The Cellular Network can be requested using le_cellnet_Request(). The le_cellnet_Request function will turn on the radio if it is switched off and it will unlock the SIM if a PIN code is required (it will retrieve the needed information from the config DB, cf. Cellular Network configuration tree). Before the cellular network is requested, an application should register a network state handler using le_cellnet_AddStateEventHandler(). Once the cellular network becomes available, the handler will be called to indicate that the modem is now registered on the network.
If the state of the network changes, then the handler will be called with the new state.
To release the cellular network, an application can use le_cellnet_Release(). Once all user applications release the cellular network access, then the service will turn off the radio.
All configuration data required for a network registration, such as the PIN code of the SIM, will be stored in the Config DB.
Some applications may have network requirements that are not met by the default cellular network service. For example, it would specify the SIM on which it wants to operate.
In this case, an application can create a request object using le_cellnet_CreateRequest(), set optional values on that request object, using le_cellnet_SelectSim() and then submits that object to a cellular network request, using le_cellnet_SubmitRequest().
The configuration database path for the SIM is:
/ modemServices/ sim/ 1/ pin<string> == <PIN_CODE>
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.