Integration

Introduction

Note

This section only describes device-specific information and is meant to be used with the “Elvaco NB-IoT MCM Integrator’s guide” which contains common information.

For device management, the module will act as a LwM2M client connecting to a LwM2M server. The Device Management system enables configuration and monitoring of the module remotely. This includes setting configuration parameters, update the firmware and trigger momentaneous/historical readouts of the module. For meter data transport, the module uses either the MQTT-SN protocol or LwM2M send.

Upon activation, the device will attempt to connect to its configured bootstrap server via the mobile (NB-IoT) network. When successful, the module will receive connection credentials, i.e. IP addresses to the DM server and the meter data server.

The module will thereafter connect to the DM server and perform a DTLS handshake to generate the session key used to encrypt the data that is transmitted between DM server and module. Note that using DTLS is optional, and the product also support unencrypted communication.

If using MQTT-SN as for meter data delivery, the module will after connection to the DM server try toconnect to the MQTT-SN gateway. If succesful, a DTLS handshake will be performed to generate the sessions keys used to encrypt the session key used to encrypt the meter data transport if configured to do so.

Each module has a security chip where a device-unique set of keys are stored. These are provisioned to the module during production. The UDP transport of both DM and MDM can be secured using DTLS 1.2. Either the pre-provisioned keys can be used, or new keys can be provisioned during the bootstrap phase.

Status and configuration parameters

Standard LwM2M status and configuration parameters

Table 34. All LwM2M configuration parameters

LwM2M object

LwM2M resource

ID

Type

Op.

Range or Enumeration

Comment

LwM2M Security

LWM2M Server URI

0/0/0

String

R

Bootstrap URI

LwM2M Security

Bootstrap server

0/0/1

Bool

R

TRUE

LwM2M Security

Security Mode

0/0/2

Integer

R

0..4

BS Security mode

0 = PSK mode

3 = No security

LwM2M Security

PSK Identity

0/0/3

Opaque

R

DevEUI

LwM2M Security

Secret Key

0/0/4

Opaque

-

Bootstrap PSK

LwM2M Security

Short Server ID

0/0/10

Integer

R

1..65534

LwM2M Server

Short Server ID

1/0/0

Integer

R

1..65534

LwM2M Server

Lifetime

1/0/1

Integer

R

LwM2M Server

Bootstrap Request Trigger

1/0/9

E

LwM2M Security

LWM2M Server URI

0/1/0

String

R(W)

DM ServerURI

Writable by Bootstrap server

LwM2M Security

Bootstrap server

0/1/1

Bool

R

FALSE

LwM2M Security

Security Mode

0/1/2

Int

R(W)

0..4

DM Security mode

Writable by Bootstrap server

LwM2M Security

PSK Identity

0/1/3

Opaque

R

DM PSK identity

(DevEUI)

LwM2M Security

Secret Key

0/1/4

Opaque

(W)

DM PSK

Writable by Bootstrap server

LwM2M Security

Short Server ID

0/1/10

Integer

R

1..65534

LwM2M Server

Short Server ID

1/1/0

Integer

R

1..65534

LwM2M Server

Lifetime

1/1/1

Integer

R

DM lifetime

LwM2M Server

Registration Update Trigger

1/1/8

E

Device

Manufacturer

3/0/0

String

R

Manufacturer

("Elvaco")

Device

Model Number

3/0/1

String

R

Product model

("CMi6140")

Device

Serial Number

3/0/2

String

R

DevEUI

Device

Firmware Version

3/0/3

String

R

Firmware version

Device

Reboot

3/0/4

E

Reboot

Device

Available Power Sources

3/0/6/0

Integer

R

0..7

Power source

1: Internal battery

2: External battery

6: AC (Mains) power

Device

Power Source Voltage

3/0/7/0

Integer

R

Power source voltage

(Millivolt)

Device

Battery level

3/0/9

R

0..100

Battery level (in %)

Device

Error Code

3/0/11/0

R

Error codes, according to LwM2M 1

Device

Current Time

3/0/13

Time

RW

Current time

Device

UTC Offset

3/0/14

String

RW

UTC Offset

UTC+X (ISO 8601)

Device

Hardware version

3/0/18

String

R

Hardware version

Connectivity Monitoring

Network Bearer

4/0/0

Integer

R

0..50

7 = NB-IoT

Connectivity Monitoring

Available Network Bearer

4/0/1/0

Integer

R

0..50

7 = NB-IoT

Connectivity Monitoring

Radio Signal Strength

4/0/2

Integer

R

RSRP

(NRSRP)

Connectivity Monitoring

APN

4/0/7/0

R

APN

Connectivity Monitoring

Cell ID

4/0/8

Integer

R

Cell ID

Connectivity Monitoring

SMNC

4/0/9

Integer

R

0..999

MNC

PLMN = SMNC + SMCC

Connectivity Monitoring

SMCC

4/0/10

Integer

R

0..999

MCC

PLMN = SMNC + SMCC

Firmware Update

Package URI

5/0/1

W

Firmware Update URI

Firmware Update

Update

5/0/2

E

Firmware Update Trigger

Firmware Update

State

5/0/3

Integer

R

0..3

Firmware Update Status

0: Idle

1: Downloading

2: Downloaded

3: Updating

Firmware Update

Update result

5/0/5

Integer

R

Firmware Update Result

Firmware Update

Firmware Update Protocol Support

5/0/8/0

Integer

R

0..5

0 = CoAP

Firmware Update

Firmware Update Delivery Method

5/0/9

Integer

R

0..2

0 = Pull only

LwM2M Cellular Connectivity

PSM Timer

10/0/4

Integer

'R

NB-IoT T3412.

LwM2M Cellular Connectivity

Active Timer

10/0/5

Integer

R

NB-IoT T3324.

LwM2M Cellular Connectivity

eDRX parameters for NB-S1 mode

10/0/9

Opaque

R

8 bit

NB-IoT eDRX.

LwM2M Cellular Connectivity

Activated Profile names

10/0/11

ObjLink

R

Link to APN Connection Profile object

LwM2M APN Connection Profile

Profile name

11/[0,1]/0

String

RW

LwM2M APN Connection Profile

APN

11/[0,1]/1

String

RW

Manual APN

Writable in object resource 1.

LwM2M APN Connection Profile

Auto select APN by device

11/[0,1]/2

Boolean

RW

Auto APN Mode

Writable in object resource 1.

LwM2M APN Connection Profile

Authentication Type

11/[0,1]/4

Integer

RW

0..3

3 = None, Writing currently not supported


Elvaco product specific LwM2M objects

Table 35. All product specific LwM2M objects

LwM2M object

LwM2M resource

ID

Type

Op.

Range or Enumeration

Comment

Elvaco MCM Config

Meter Readout Interval

33906/./0

Integer

RW

Interval in minutes

Elvaco MCM Config

Report data encoding

33906/./1

Integer

RW

0 = SenML/CBOR

1 = JSON

2 = MBus

Elvaco MCM Config

Report frame type

33906/./2

Integer

RW

66 = Standard

67 = Extended

68 = Combined

69 = Pulse

Elvaco MCM Config

Eco mode enabled

33906/./3

Boolean

RW

Elvaco MCM Config

NFC Enabled

33906/./4

Boolean

RW

Elvaco MCM Config

NFC Configlocked

33906/./5

Boolean

R

Elvaco MCM Config

Adjust time

33906/./6

Integer

W

Adjustment in seconds

Elvaco MCM Config

Instantaneous readout trigger

33906/./10

E

Trigger a meter readout.

Elvaco MCM Config

Historic resend trigger

33906/./13

E

Trigger upload of all historic data

Elvaco MCM Config

Historic resend status

33906/./14

Integer

R

Number of messages in uplink queue

Elvaco MCM Config

Apply APN staging profile

33906/./15

E

Apply APN staging profile.

Elvaco MCM Config

Config write status

33906/./16

Boolean

R

Result of last config write to flash

Elvaco MCM Config

Meter Report Interval

33906/./1 7

Integer

RW

Interval in minutes

Elvaco MCM Config

Meter Transmit Interval

33906/./18

Integer

RW

Interval in minutes

Elvaco MCM Config

Meter Transmit Offset

33906/./19

Integer

RW

Offset in minutes

Elvaco MCM Config

Meter Transmit Delay

33906/./20

Integer

RW

Delay in minutes

Elvaco MCM Config

Meter Uploads Per Tx

33906/./21

Integer

RW

Max number of messages per tx interval

Elvaco MCM Config

DTLS Min Timeout

33906/./22

Integer

RW

Timeout in seconds

Elvaco MCM Config

DTLS Max Timeout

33906/./23

Integer

RW

Timeout in seconds

Elvaco MCM Config

MQTT-SN Communication Timeout

33906/./24

Integer

RW

Timeout in seconds

Elvaco MCM Config

MQTT-SN Communication Attempts

33906/./25

Integer

RW

Total number of attempts

Elvaco MCM Config

MQTT-SN Register Timeout

33906/./26

Integer

RW

OBSOLETE!

Timeout in seconds

Elvaco MCM Config

MQTT-SN Register Attempts

33906/./27

Integer

RW

OBSOLETE!

Total number of attempts

Elvaco MCM Config

MQTT-SN Publish Timeout

33906/./28

Integer

RW

OBSOLETE!

Timeout in seconds

Elvaco MCM Config

MQTT-SN Publish Attempts

33906/./29

Integer

RW

OBSOLETE!

Timeout in seconds

Elvaco MCM Config

CoAP ACK Timeout

33906/./30

Integer

RW

Timeout in seconds

Elvaco MCM Config

CoAP Max Retransmit

33906/./31

Integer

RW

Number of retransmissions

Elvaco MCM Config

IOWA DTLS Min Timeout

33906/./32

Integer

RW

Timeout in seconds

Elvaco MCM Config

IOWA DTLS Max Timeout

33906/./3 3

Integer

RW

Timeout in seconds

Elvaco MCM Config

IOWA Communication Retry Count

33906/./3 4

Integer

RW

Number of retries

Elvaco MCM Config

IOWA Communication Retry Delay

33906/./3 5

Integer

RW

Delay in seconds

Elvaco MCM Config

IOWA Communication Sequence Retry Count

33906/./3 6

Integer

RW

Number of retries

Elvaco MCM Config

IOWA Communication Sequence Retry Delay

33906/./3 7

Integer

RW

Delay in seconds

Elvaco MCM Config

Network Connection Maximum Hold-off

33906/./3 8

Integer

RW

Delay in seconds

Elvaco MCM Config

Network Search Period

33906/./3 9

Integer

RW

Period in seconds

Elvaco MCM Config

Modem Restart Back-off Intervals

33906/./4 0

String

RW

min0-max0,min1-max1,... in minutes

Elvaco MCM Config

MDM Re-connect Back-off Intervals

33906/./4 1

String

RW

min0-max0,min1-max1,... in minutes

Elvaco MCM Config

LwM2M Resume Back-off Intervals

33906/./4 2

String

RW

min0-max0,min1-max1,... in minutes

Elvaco MCM Config

Meter Max Retry Count

33906/./4 3

Integer

RW

Max number of retries when meter communication fails

Elvaco MCM Config

Auto Upload Age Limit

33906/./4 4

Integer

RW

Max age in minutes of unsent measurements to upload

Elvaco MCM Config

Auto Upload Order

33906/./45

Integer

RW

In what order should unsent measurements be uploaded.

0 = FIFO

1 = LIFO.

Elvaco MCM Config

Time Sync Source

33906/./46

Integer

RW

Which source to use for time synchronization.

0 = Manual

1 = Network.

Elvaco MCM Config

MDM Communication Failures

33906/./47

Integer

RW

Maximum number of failures before connection is considered broken.

Elvaco MCM Config

Upload Protocol

33906/./48

Integer

RW

0..1

Protocol to use for meter data upload

0 = MQTT-SN

1 = LwM2M

Elvaco MCM Config

Use PSM

33906/./49

Integer

RW

0..3

Power saving mode:

0 = Disabled

1 = eDRX

2 = PSM

3 = PSM + eDRX

Elvaco MCM Config

eDRX Mode

33906/./50

Integer

RW

0..1

eDRX mode:

0 = Automatic

1 = Manual

Elvaco MCM Config

Enable RAI

33906/./51

Integer

RW

Enable RAI:

0 = RAI Disabled

1 = RAI=2 for MQTT-SNQoS=1

Elvaco MCM Config

Power Source

33906/./52

Integer

RW

Configuration value for power source. Used when hardware unit cannot determine source.

0 = Battery

1 = PSU

Elvaco MCM Config

NB-IoT Radio Bands

33906/./53

String

RW

NB-IoT Radio Bands to use: band0,band1,...

Elvaco MDM Server

URI

33905/./0

String

RW

URI to the meter data server

Elvaco MDM Server

Protocol

33905/./1

Integer

RW

0..

0 = MQTT-SN

Elvaco MDM Server

Transport Security Mode

33905/./2

Integer

RW

0 = PSK mode

3 = No security

Elvaco MDM Server

Transport Secret Key

33905/./5

Opaque

W

Key to use with the selected security mode

Elvaco MDM Server

Connection config

33905/./10

Integer

RW

0..1

0 = Optimized

1 = Compliant

Elvaco MDM Server

Topic

33905/./11

String

RW

MQTT-SN topic

Elvaco Meter Data

Message Type

33911/./0

Integer

R

Elvaco Meter Data

Message Encoding

33911/./1

Integer

R

Elvaco Meter Data

Message Data

33911/./2

Opaque

R

Elvaco Meter Info

Meter Model

33908/./0

String

R

User-friendly string

Elvaco Meter Info

Meter ID

33908/./1

Integer

R

Elvaco Meter Info

Communication status

33908/./2

Integer

R

0..2

0 = OK

1 = No meter detected

2 = Error

Elvaco Meter Info

Error flags

33908/./3

Opaque

R

Elvaco NB-IoT info

IMSI

33909/./0

Integer

R

International mobile subscriber identity

Elvaco NB-IoT info

ICCID

33909/./1

String

R

Integrated circuit card identifier

Elvaco NB-IoT info

Registrations

33909/./2

Integer

R

Number of network registrations done

Elvaco NB-IoT info

Last registration duration

33909/./3

Integer

R

Duration in seconds

Elvaco NB-IoT info

Modem model

33909/./4

String

R

Elvaco NB-IoT info

Modem firmware

33909/./5

String

R

Elvaco NB-IoT info

Registration uptime

33909/./6

Integer

R

Last network registration uptime in seconds

Elvaco NB-IoT status

Uptime

33907/./0

Integer

R

Uptime in seconds

Elvaco NB-IoT status

Average current consumption

33907/./1

Integer

R

Consumption in uA (micro-amps)

Elvaco NB-IoT status

Network classification

33907/./2

Integer

R

0 = Excellent

1 = Good

2 = Fair

3 = Poor

Elvaco NB-IoT status

ECL

33907/./3

Integer

R

0..2

Elvaco NB-IoT status

RSSI

33907/./4

Integer

R

In tenths of dBm

Elvaco NB-IoT status

SNR

33907/./5

Integer

R

In tenths of dB

Elvaco NB-IoT status

MDM connection status

33907/./1 0

Integer

R

0..5

0 = OK

1 = Connecting

2 = No credentials

3 = DTLS failed

4 = Communication failed

6 = Socket failed

7 = Idle

Elvaco NB-IoT status

Current radio band

33907/./1 1

Integer

R

0..85

Current radio band id

Elvaco Transaction statistics

Reset statistics

33910/./0

Integer

E

Resets statistics for what this object instance is tracking.

Elvaco Transaction statistics

Transactions

33910/./1

Integer

R

Number of transactions.

Elvaco Transaction statistics

Retransmissions

33910/./2

Integer

R

Number of retransmissions

Elvaco Transaction statistics

Lost transactions

33910/./3

Integer

R

Number of lost transactions.

Elvaco Transaction statistics

Average response time

33910/./4

Integer

R

Elvaco Transaction statistics

Minimum response time

33910/./5

Integer

R

Elvaco Transaction statistics

Maximum response time

33910/./6

Integer

R


Kamstrup MC403, MC603, MC803 error codes

The following table lists error codes, or info codes, for Kamstrup MC403/603/803. It is a verbatim copy from Kamstrup document “Kamstrup Meter Protocol” version AB1, section 6.4. The same information is publicly available on Kamstrup’s website

Table 36. Kamstrup error codes (info codes)

Bit

Display

Description

403

603

803

0

10000000

Power off

1

20000000

Low battery

2

90000000

External alarm (i.e. via KMP)

3

01000000

t1 above range or disconnected

4

00100000

t2 above range or disconnected

5

02000000

t1 below range or short circuited

6

00200000

t2 below range or short circuited

7

09900000

Wrong dt (t1-t2)

8

00003000

V1 air

9

00004000

V1 reverse

10

00005000

V1 low signal

11

00006000

V1 > qs for more than 1 hour

12

00000080

InA water system leak

13

00000008

InB water system leak

14

00000090

InA external alarm

15

00000009

InB external alarm

16

00001000

V1 com. error

x

17

00002000

V1 pulse error

x

18

00000070

InA2 water system leak

x

19

00000007

InB2 water system leak

x

20

00010000

t3 or t4 above range or disconnected

x

21

00020000

t3 or t4 below range or short circuit

x

22

00000100

V2 com. error

x

23

00000200

V2 pulse error

x

24

00000300

V2 air

x

25

00000400

V2 reverse

x

26

00000500

V2 low signal

x

27

00000600

V2 > qs for more than 1 hour

x

28

00007000

V1V2 Burst Out

x

29

00000700

V1V2 Burst In

x

30

00008000

V1V2 Leak Out

x

31

00000800

V1V2 Leak In

x

>=32

????????

Reserved

x

x

x


Changing APN via LwM2M

Since changing APN is a potentially hazardous operation that may render the device disconnected from the mobile network, there is a rollback functionality in place when changing the APN.

To change APN, write the APN to the resource /10/1/1 and set APN mode to manual in /10/1/2. Once done, stage the changes by executing /33906/0/15. When executed, the device will reset and try to use the new APN. If the device manages a successful bootstrapping, the new APN will be saved as the default. If a successful bootstrapping has not happened for some time, the device will roll back to the old APN and reset again.

Was this article helpful?

0 out of 0 found this helpful
Have more questions? Submit a request

Comments (0 comments)

Article is closed for comments.