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

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.

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]
OK

Vodafones 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
OK

The 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.

https://www.base64encode.org/

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

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
OK

3.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
OK

3.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=15

3.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
OK

More 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.

image-20240202-154710.png

Then select Add device manually.

image-20240202-154938.png

Connect your LwM2M device via the Bootstrap server

image-20240325-131828.png

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.

image-20240325-132117.png

In the "Management server" field, select "This Management Server PSK". Confirm with the "Add device" button.

image-20240325-133526.png

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.

image-20240325-135605.png

This is what dashboard will look like for successfully registered device

image-20240325-135732.png

You can also use the m-center script to do this:

note

An alternative to the bootstrap management server is a management server. Read more about it:

https://exelonix.atlassian.net/wiki/x/AQCn6w

An alternative to the bootstrap management server is a management server. Read more about it:

https://exelonix.atlassian.net/wiki/x/AQCn6w