Integration of USB Connect LPWE into Vodafones business IOT device management platform
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: coap://46.108.248.106:5684
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. 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.
2.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
OK2.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. 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.4. 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.5. Pre-shared keys for USB Connect LPWA
Key identity must be converted to base64.
Key we have to convert from HEX to base64
https://cryptii.com/pipes/hex-to-base64
USB Connect LPWA (Example data):
Key identity: dXJuOmltZWk6MzU2NzI2MTA4MjAwMDE1
Key: q83v
2.6. Add Vodafone Business IoT Device Management Server to the Client
Do not forget to replace the AT Command example Keys with your own.
# Delete an object instance
AT+ULWM2MDELETE="/1/1"
OK
# Delete an object instance
AT+ULWM2MDELETE="/0/1"
OK
# Reset the module
AT+CFUN=15
OK
# Wait of ULWM2MSTAT: 4, 0
+ULWM2MSTAT: 4, 0
# Addition of a new security object instance for CoAP
AT+ULWM2MCREATE="{"bn":"/0/1/","e":[{"n":"0","sv":"coaps://lwm2m.dm.iot.vodafone.com:5684"},{"n":"1","bv":false},{"n":"2","v":0},{"n":"3","sv":"dXJuOmltZWk6MzU2NzI2MTA4MjAwMDE1"},{"n":"10","v":123},{"n":"5","sv":"q83v"}]}",123
OK
# Create the Server object instance
AT+ULWM2MCREATE="{"bn":"/1/1/","e":[{"n":"0","v":123},{"n":"1","v":300},{"n":"2","v":10},{"n":"3","v":60},{"n":"5","v":86400},{"n":"6","bv":false},{"n":"7","sv":"UQ"}]}",123
OK
# Security configuration
AT+ULWM2MCONFIG=123,0,1,1,0
OK
# Reset the module
AT+CFUN=15
OK
2.7. 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/123","v":15}]}"
AT+ULWM2MWRITE="{"bn":"/2/2/","e":[{"n":"2/123","v":15}]}"
AT+ULWM2MWRITE="{"bn":"/2/3/","e":[{"n":"2/123","v":15}]}"
AT+ULWM2MWRITE="{"bn":"/2/4/","e":[{"n":"2/123","v":15}]}"
AT+ULWM2MWRITE="{"bn":"/2/5/","e":[{"n":"2/123","v":15}]}"
AT+ULWM2MWRITE="{"bn":"/2/6/","e":[{"n":"2/123","v":31}]}"
AT+ULWM2MWRITE="{"bn":"/2/7/","e":[{"n":"2/123","v":31}]}"
AT+ULWM2MWRITE="{"bn":"/2/8/","e":[{"n":"2/123","v":31}]}"
AT+ULWM2MWRITE="{"bn":"/2/9/","e":[{"n":"2/123","v":31}]}"
AT+ULWM2MWRITE="{"bn":"/2/10/","e":[{"n":"2/123","v":31}]}"
AT+ULWM2MWRITE="{"bn":"/2/11/","e":[{"n":"2/123","v":31}]}"
AT+ULWM2MWRITE="{"bn":"/2/12/","e":[{"n":"2/123","v":31}]}"
AT+ULWM2MWRITE="{"bn":"/2/13/","e":[{"n":"2/123","v":31}]}"
AT+ULWM2MWRITE="{"bn":"/2/15/","e":[{"n":"2/123","v":31}]}"
AT+ULWM2MWRITE="{"bn":"/2/1/","e":[{"n":"3","v":123}]}"
AT+ULWM2MWRITE="{"bn":"/2/2/","e":[{"n":"3","v":123}]}"
AT+ULWM2MWRITE="{"bn":"/2/3/","e":[{"n":"3","v":123}]}"
AT+ULWM2MWRITE="{"bn":"/2/4/","e":[{"n":"3","v":123}]}"
AT+ULWM2MWRITE="{"bn":"/2/5/","e":[{"n":"3","v":123}]}"
AT+ULWM2MWRITE="{"bn":"/2/6/","e":[{"n":"3","v":123}]}"
AT+ULWM2MWRITE="{"bn":"/2/7/","e":[{"n":"3","v":123}]}"
AT+ULWM2MWRITE="{"bn":"/2/8/","e":[{"n":"3","v":123}]}"
AT+ULWM2MWRITE="{"bn":"/2/9/","e":[{"n":"3","v":123}]}"
AT+ULWM2MWRITE="{"bn":"/2/10/","e":[{"n":"3","v":123}]}"
AT+ULWM2MWRITE="{"bn":"/2/11/","e":[{"n":"3","v":123}]}"
AT+ULWM2MWRITE="{"bn":"/2/12/","e":[{"n":"3","v":123}]}"
AT+ULWM2MWRITE="{"bn":"/2/13/","e":[{"n":"3","v":123}]}"
AT+ULWM2MWRITE="{"bn":"/2/15/","e":[{"n":"3","v":123}]}"More information about configuration LwM2M can be found under the following link:
3. 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.
3.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 Management 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 "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 "Next" button.
Confirm with the "Go to Summary" button.
And at the end, finish device registration with the "Finish" button.
This is what dashboard will look like for successfully registered device
You can also use the m-center script to do this: