Integration of USB Connect LPWA into Vodafones business IOT device management platform with Bootstrap
This section describes the integration of the USB Connect LPWE into Vodafones business IOT device management platform with security keys.
Vodafone Business IoT Device Management
Endpoint: coaps://lwm2m.dm.iot.vodafone.com:5694
Preparation of the USB Connect LPWA Device
The USB Connect LPWA can be configured using the m-center app. It provides a convenient way to configure the cellular module insight the device and store the configuration in the module's EPROM.
Download m-center app: https://www.u-blox.com/en/product/m-center
Please follow our step-by-step instruction to connect the device with the device management:
1. Step: Check firmware version, reinstall if necessary
Query the current firmware version using the m-center app (AT-commands):
AT+CGMR
L0.0.00.00.05.12 [Mar 09 2022 17:00:00]
OKVodafones Device Management is based on the LwM2M protocol. This only works on USB Connect LPWA with firmware version 05.12 or higher. If you have an older version. Please install a new firmware.
Instructions for installing the new firmware: https://exelonix.atlassian.net/wiki/x/DAD56g
2. Read IMEI number from device
IMEI is required to create "Endpoint name"
AT+CGSN
356726108200015
OKThe name of your endpoint will look like this, for example: urn:imei:356726108200015
Endpoint name (Example data): urn:imei:356726108200015
2.1. Pre-shared keys for device management
We turn the IMEI number of the device into "Key identity" for the management server. And a HEX value is required for "Key".
Device Management (Example data):
Key identity: urn:imei:356726108200015
Key: ABCDEF
2.2. Pre-shared keys for USB Connect LPWA
Key identity must be converted to base64.
Base64 Encode and Decode - Online
Key we have to convert from HEX to base64
Hex to Base64: Encode and decode bytes online
USB Connect LPWA (Example data):
Key identity: dXJuOmltZWk6MzU2NzI2MTA4MjAwMDE1
Key: q83v
3. Step: Configure the USB Connect LPWA
Connect the device to your local PC via the USB port. Now the device can be configured via serial communication with AT commands.
With windows, the m-center app an be used for this purpose.
3.1. Enable LwM2M Client
The LwM2M client is not enabled by default. You can activate the client with the following AT-commands
# The check of the LwM2M client is enabled. 0 -enabled, 1 -disabled
AT+ULWM2M?
+ULWM2M: 1
OK
# Enable LwM2M client when disabled
AT+ULWM2M=0
OK
# Set module to Airplane mode
AT+CFUN=4
OK
# Reset the module
AT+CFUN=15
OK
# wait 10 sekonds
# The check of the LwM2M client is enabled
AT+ULWM2M?
+ULWM2M: 0
OK3.2. Activate the URC
The URCs (Unsolicited Result Code) indicate the state of readiness of the LwM2M client.
# Turn on the URC
AT+ULWM2MSTAT=1
OK
# Reset the module
AT+CFUN=15
OK3.3. Add Access Control for Vodafone Business IoT Device Management Server
By default, USB connect LPWA restricts the server's access to the data model. To solve this problem, you need to set specific access rights to the data model instances. Please send the following AT Commands to Device
AT+ULWM2MWRITE="{"bn":"/2/1/","e":[{"n":"2/1","v":15}]}"
AT+ULWM2MWRITE="{"bn":"/2/2/","e":[{"n":"2/1","v":15}]}"
AT+ULWM2MWRITE="{"bn":"/2/3/","e":[{"n":"2/1","v":15}]}"
AT+ULWM2MWRITE="{"bn":"/2/4/","e":[{"n":"2/1","v":15}]}"
AT+ULWM2MWRITE="{"bn":"/2/5/","e":[{"n":"2/1","v":15}]}"
AT+ULWM2MWRITE="{"bn":"/2/6/","e":[{"n":"2/1","v":31}]}"
AT+ULWM2MWRITE="{"bn":"/2/7/","e":[{"n":"2/1","v":31}]}"
AT+ULWM2MWRITE="{"bn":"/2/8/","e":[{"n":"2/1","v":31}]}"
AT+ULWM2MWRITE="{"bn":"/2/9/","e":[{"n":"2/1","v":31}]}"
AT+ULWM2MWRITE="{"bn":"/2/10/","e":[{"n":"2/1","v":31}]}"
AT+ULWM2MWRITE="{"bn":"/2/11/","e":[{"n":"2/1","v":31}]}"
AT+ULWM2MWRITE="{"bn":"/2/12/","e":[{"n":"2/1","v":31}]}"
AT+ULWM2MWRITE="{"bn":"/2/13/","e":[{"n":"2/1","v":31}]}"
AT+ULWM2MWRITE="{"bn":"/2/1/","e":[{"n":"3","v":1}]}"
AT+ULWM2MWRITE="{"bn":"/2/2/","e":[{"n":"3","v":1}]}"
AT+ULWM2MWRITE="{"bn":"/2/3/","e":[{"n":"3","v":1}]}"
AT+ULWM2MWRITE="{"bn":"/2/4/","e":[{"n":"3","v":1}]}"
AT+ULWM2MWRITE="{"bn":"/2/5/","e":[{"n":"3","v":1}]}"
AT+ULWM2MWRITE="{"bn":"/2/6/","e":[{"n":"3","v":1}]}"
AT+ULWM2MWRITE="{"bn":"/2/7/","e":[{"n":"3","v":1}]}"
AT+ULWM2MWRITE="{"bn":"/2/8/","e":[{"n":"3","v":1}]}"
AT+ULWM2MWRITE="{"bn":"/2/9/","e":[{"n":"3","v":1}]}"
AT+ULWM2MWRITE="{"bn":"/2/10/","e":[{"n":"3","v":1}]}"
AT+ULWM2MWRITE="{"bn":"/2/11/","e":[{"n":"3","v":1}]}"
AT+ULWM2MWRITE="{"bn":"/2/12/","e":[{"n":"3","v":1}]}"
AT+ULWM2MWRITE="{"bn":"/2/13/","e":[{"n":"3","v":1}]}"
AT+CFUN=153.4. Add Vodafone Business IoT Device Bootstrap Server to the Client
Do not forget to replace the AT Command example Keys with your own.
# Remove security object instance
AT+ULWM2MDELETE="/1/1"
OK
# Remove old server object instance
AT+ULWM2MDELETE="/0/1"
# Reset the module
AT+CFUN=15
OK
# Addition of a new security object instance for CoAP
AT+ULWM2MCREATE="{"bn":"/0/1/","e":[{"n":"0","sv":"coaps://lwm2m.dm.iot.vodafone.com:5694"},{"n":"1","bv":true},{"n":"2","v":0},{"n":"3","sv":"dXJuOmltZWk6MzU2NzI2MTA4MjAwMDE1"},{"n":"10","v":123},{"n":"5","sv":"q83v"}]}",123
OK
# Security configuration
AT+ULWM2MCONFIG=123,1,1,1,0
OK
# Security configuration
AT+ULWM2MCONFIG=1,0,1,1,0
OK
# Reset the module
AT+CFUN=15
OKMore information about configuration LwM2M can be found under the following link:
4. Step: Register your device on the Vodafone Business IoT Device Management portal.
After local configuration of the device, it needs to be registered in Vodafones Business IoT Device Management.
4.1. Add Device
In Vodafone Business IoT Device Management, go to the Device Inventory tab and pressing the “Add Device” button.
Then select Add device manually.
Connect your LwM2M device via the Bootstrap server
Enter your endpoint name in the corresponding field. And in the "Security mode" field, select "Pre-Shared Key". Enter your key identity. And for key format select Hex and enter your key. Confirm with the "Configuration" button.
In the "Management server" field, select "This Management Server PSK". Confirm with the "Add device" button.
Restart the device or disconnect it from the computer and reconnect it. Wait until the device successfully establishes communication with the server. Confirm with the "Go to device" button.
This is what dashboard will look like for successfully registered device
You can also use the m-center script to do this:
An alternative to the bootstrap management server is a management server. Read more about it: