Preparing for production
Before deploying devices that use the LwM2M carrier library, consider the following prerequisites.
Root CA certificates
You can optimize your application by removing or adding certificates based on your product needs. Refer to the respective documentation of one or more of your operators for more information on which certificates apply.
The Cellular: LwM2M carrier sample contains a couple of root CA certificates that are typically used for out-of-band firmware updates. The carrier with which you plan to certify your product might not require the included certificates. Also, the certificates needed by the carrier might not be present in the sample. Hence it might become necessary to program the required certificates.
Pre-programming the certificates
The certificates are typically stored in the modem. The LwM2M carrier sample writes the certificates to the modem if they are not already present. Alternatively, you can also write the certificates beforehand using the Cellular: AT Client sample.
To pre-program the certificates, use one of the following methods:
Build and flash the Cellular: AT Client sample and provision the certificates using AT commands and the Cellular Monitor application. See Managing credentials for more information.
Build and flash the LwM2M carrier sample, while making sure that:
The appropriate certificates (
*.pem
) are included in thecerts
folder.The certificate is automatically converted to a HEX format in the
CMakeLists.txt
file. The generated.inc
file is then included in the code, where it is provisioned to the modem.
Other samples and applications like Asset Tracker v2 and Cellular: Modem Shell with the carrier library integration do not write any certificates in the application.
Carrier configuration and testing
The library supports carriers which have specific device management requirements. Not all requirements are documented here. You must contact your carrier for more information as mentioned in the Certification and version dependencies documentation.
With a few exceptions, if you leave the
lwm2m_carrier_config_t
structure empty when callinglwm2m_carrier_main()
, it configures the carrier library to behave correctly in the operator network it is currently connected to.
The settings required to test and certify your product with the carrier will be different from the settings needed for mass deployment.
When
CONFIG_LWM2M_CARRIER_CUSTOM_URI
is not set (whenlwm2m_carrier_config_t
is empty), the URI is predetermined to connect to the live device management server of the currently connected operator network.During certification process, the
CONFIG_LWM2M_CARRIER_CUSTOM_URI
andCONFIG_LWM2M_CARRIER_SERVER_SEC_TAG
Kconfig options must be set accordingly to connect to the carrier’s test (certification) servers instead of the live (production) servers. See Application integration for more information on the required configurations.During certification, only one carrier should be enabled using
carriers_enabled
. For example, when connecting to the Verizon’s test servers,CONFIG_LWM2M_CARRIER_VERIZON
must be set toy
, and the other Kconfig options must be explicitly set ton
, as they are enabled by default.
LG U+ operator requirements
Following are the configurations are required for using the library with the LG U+ operator network:
Once the initial connection to device management is compete, the application must use
lwm2m_carrier_request()
when it wishes to reboot, or connect/disconnect from the network.CONFIG_DFU_TARGET_MCUBOOT
is required to perform application FOTA. This in turn enables the Kconfig optionCONFIG_LWM2M_CARRIER_LG_UPLUS
.CONFIG_LWM2M_CARRIER_LG_UPLUS_SERVICE_CODE
must be set. This service code is reflected in the Model Number resource of the Device object. Contact the carrier to obtain the correct service code.CONFIG_LWM2M_CARRIER_LG_UPLUS_DEVICE_SERIAL_NUMBER
can be changed depending on your product. Contact the carrier for more information.CONFIG_LWM2M_CARRIER_CUSTOM_APN
is not used when the subscriber ID isLG U+
.