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 the MQTT-SN protocol.

Upon activation, the device will attempt to connect to its configured bootstrap server via the mobile (NBIoT) 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.

The module will thereafter connect to the MQTT-SN gateway and perform a DTLS handshake 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 53. All LwM2M configuration parameters

LwM2M object

LwM2M resources

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

("CMi6160")

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

0..8

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

String

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

Update

5/0/2

E

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

RW

LwM2M APN Connection Profile

Profile name

11/[0,1]/0

String

RW

LwM2M APN Connection Profile

APN

11/[0,1]/1

String

Manual APN

Writable in object resource 1.

RW

LwM2M APN Connection Profile

Auto select APN by device

11/[0,1]/2

Boolean

Auto APN Mode

Writable in object resource 1.

RW

LwM2M APN Connection Profile

Authentication Type

11/[0,1]/4

Integer

0..3

3 = None

Writing currently not supported


Elvaco product specific LwM2M objects

Table 54. All product specific LwM2M objects

LwM2M object name

ID

Name

Op.

Type

Range or Enumeration

Description

Elvaco MCM Config

33906/./0

Meter Readout Interval

RW

Integer

Interval in minutes

Elvaco MCM Config

33906/./1

Report data encoding

RW

Integer

0 = SenML/CBOR

1 = JSON

2 = MBus

Elvaco MCM Config

33906/./2

Report frame type

RW

Integer

56 = CMi6160_Standard

57 = CMi6160_Tariff

Elvaco MCM Config

33906/./3

Eco mode enabled

RW

Boolean

Elvaco MCM Config

33906/./4

NFC Enabled

RW

Boolean

Elvaco MCM Config

33906/./5

NFC Configlocked

R

Boolean

Elvaco MCM Config

33906/./6

Adjust time

W

Integer

Adjustment in seconds

Elvaco MCM Config

33906/./10

Instantaneous readout trigger

E

Trigger a meter readout.

Elvaco MCM Config

33906/./13

Historic resend trigger

E

Trigger upload of all historic data

Elvaco MCM Config

33906/./14

Historic resend status

R

Integer

Number of messages in uplink queue

Elvaco MCM Config

33906/./15

Apply APN staging profile

E

Apply APN staging profile.

Elvaco MCM Config

33906/./16

Config write status

R

Boolean

Result of last config write to flash

Elvaco MCM Config

33906/./17

Meter Report Interval

RW

Integer

Interval in minutes

Elvaco MCM Config

33906/./18

Meter Transmit Interval

RW

Integer

Interval in minutes

Elvaco MCM Config

33906/./19

Meter Transmit Offset

RW

Integer

Offset in minutes

Elvaco MCM Config

33906/./20

Meter Transmit Delay

RW

Integer

Delay in minutes

Elvaco MCM Config

33906/./21

Meter Uploads Per Tx

RW

Integer

Max number of messages per tx interval

Elvaco MCM Config

33906/./22

DTLS Min Timeout

RW

Integer

Timeout in seconds

Elvaco MCM Config

33906/./23

DTLS Max Timeout

RW

Integer

Timeout in seconds

Elvaco MCM Config

33906/./24

MQTT-SN Communication Timeout

RW

Integer

Timeout in seconds

Elvaco MCM Config

33906/./25

MQTT-SN Communication Attempts

RW

Integer

Total number of attempts

Elvaco MCM Config

33906/./26

MQTT-SN Register Timeout

RW

Integer

OBSOLETE!

Timeout in seconds

Elvaco MCM Config

33906/./27

MQTT-SN Register Attempts

RW

Integer

OBSOLETE!

Total number of attempts

Elvaco MCM Config

33906/./28

MQTT-SN Publish Timeout

RW

Integer

OBSOLETE!

Timeout in seconds

Elvaco MCM Config

33906/./29

MQTT-SN Publish Attempts

RW

Integer

OBSOLETE!

Total number of attempts

Elvaco MCM Config

33906/./30

CoAP ACK Timeout

RW

Integer

Timeout in seconds

Elvaco MCM Config

33906/./31

CoAP Max Retransmit

RW

Integer

Number of retransmissions

Elvaco MCM Config

33906/./32

IOWA DTLS Min Timeout

RW

Integer

Timeout in seconds

Elvaco MCM Config

33906/./33

IOWA DTLS Max Timeout

RW

Integer

Timeout in seconds

Elvaco MCM Config

33906/./34

IOWA Communication Retry Count

RW

Integer

Number of retries

Elvaco MCM Config

33906/./35

IOWA Communication Retry Delay

RW

Integer

Delay in seconds

Elvaco MCM Config

33906/./36

IOWA Communication Sequence Retry Count

RW

Integer

Number of retries

Elvaco MCM Config

33906/./37

IOWA Communication Sequence Retry Delay

RW

Integer

Delay in seconds

Elvaco MCM Config

33906/./38

Network Connection Maximum Hold-off

RW

Integer

Delay in seconds

Elvaco MCM Config

33906/./39

Network Search Period

RW

Integer

Period in seconds

Elvaco MCM Config

33906/./40

Modem Restart Backoff Intervals

RW

String

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

Elvaco MCM Config

33906/./41

MDM Reconnect Backoff Intervals

RW

String

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

Elvaco MCM Config

33906/./42

LwM2M Resume Backoff Intervals

RW

String

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

Elvaco MCM Config

33906/./43

Meter Max Retry Count

RW

Integer

Max number of retries when meter communication fails

Elvaco MCM Config

33906/./44

Auto Upload Age Limit

RW

Integer

Max age in minutes of unsent measurements to upload

Elvaco MCM Config

33906/./45

Auto Upload Order

RW

Integer

In what order should unsent measurements be uploaded.

0 = FIFO

1 = LIFO.

Elvaco MCM Config

33906/./46

Time Sync Source

RW

Integer

Which source to use for time synchronization.

0 = Manual

1 = Network.

Elvaco MCM Config

33906/./47

MDM Communication Failures

RW

Integer

Maximum number of failures before connection is considered broken.

Elvaco MCM Config

33906/./48

Upload Protocol

RW

Integer

0..1

Protocol to use for meter data upload

0 = MQTT-SN

1 = LwM2M

Elvaco MCM Config

33906/./49

Use PSM

RW

Integer

0..3

Power saving mode:

0 = Disabled

1 = eDRX

2 = PSM

3 = PSM + eDRX

Elvaco MCM Config

33906/./50

eDRX Mode

RW

Integer

0..1

eDRX mode:

0 = Automatic

1 = Manual

Elvaco MCM Config

33906/./51

Enable RAI

RW

Integer

0..1

Enable RAI:

0 = RAI Disabled

1 = RAI=2 for MQTT-SN QoS=1

Elvaco MCM Config

33906/./52

Power Source

RW

Integer

0..1

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

0 = Battery

1 = PSU

Elvaco MCM Config

33906/./53

NB-IoT Radio Bands

RW

String

NB-IoT Radio Bands to use:

band0,band1,...

Elvaco MCM Config

33906/./54

Meter Identification source

RW

Integer

0..1

Use Fabrication number (aka Serial number) or Customer number as identification.

0 = Fabrication nbr

1 = Customer nbr

Elvaco MDM Server

33905/./0

URI

RW

String

URI to the meter data server

Elvaco MDM Server

33905/./1

Protocol

RW

Integer

0..

0 = MQTT-SN

Elvaco MDM Server

33905/./2

Transport Security Mode

RW

Integer

0..4

0 = PSK mode

3 = No security

Elvaco MDM Server

33905/./5

Transport Secret Key

W

Opaque

Key to use with the selected security mode

Elvaco MDM Server

33905/./10

Connection config

RW

Integer

0..1

0 = Optimized

1 = Compliant

Elvaco MDM Server

33905/./11

Topic

RW

String

MQTT-SN topic

Elvaco Meter Data

33911/./0

Message Type

R

Integer

Elvaco Meter Data

33911/./1

Message Encoding

R

Integer

Elvaco Meter Data

33911/./2

Message Data

R

Opaque

Elvaco Meter Info

33908/./0

Meter Model

R

String

User-friendly string

Elvaco Meter Info

33908/./1

Meter ID

R

Integer

Elvaco Meter Info

33908/./2

Communication status

R

Integer

0..2

0 = OK

1 = No meter detected

2 = Error

Elvaco Meter Info

33908/./3

Error flags

R

Opaque

Elvaco NB-IoT info

33909/./0

IMSI

R

Integer

International mobile subscriber identity

Elvaco NB-IoT info

33909/./1

ICCID

R

String

Integrated circuit card identifier

Elvaco NB-IoT info

33909/./2

Registrations

R

Integer

Number of network registrations done

Elvaco NB-IoT info

33909/./3

Last registration duration

R

Integer

Duration in seconds

Elvaco NB-IoT info

33909/./4

Modem model

R

String

Elvaco NB-IoT info

33909/./5

Modem firmware

R

String

Elvaco NB-IoT info

33909/./6

Registration uptime

R

Integer

Last network registration uptime in seconds

Elvaco NB-IoT info

33909/./7

Modem firmware update

E

Trigger modem FOTA. Parameter

0 = <url>

Elvaco NB-IoT info

33909/./8

Modem firmware update result

R

Integer

0..3

Result of modem FOTA.

0: Initial value

1: Modem Firmware updated successfully

2: Error during download

3: Error during update

Elvaco NB-IoT status

33907/./0

Uptime

R

Integer

Uptime in seconds

Elvaco NB-IoT status

33907/./1

Average current consumption

R

Integer

Consumption in uA (micro-amps)

Elvaco NB-IoT status

33907/./2

Network classification

R

Integer

0 = Excellent

1 = Good

2 = Fair

3 = Poor

Elvaco NB-IoT status

33907/./3

ECL

R

Integer

0..2

Elvaco NB-IoT status

33907/./4

RSSI

R

Integer

In tenths of dBm

Elvaco NB-IoT status

33907/./5

SNR

R

Integer

In tenths of dB

Elvaco NB-IoT status

33907/./10

MDM connection status

R

Integer

0..7

0 = OK

1 = Connecting

2 = No credentials

3 = DTLS failed

4 = Communication failed

6 = Socket failed

7 = Idle

Elvaco NB-IoT status

33907/./11

Current radio band

R

Integer

0..85

Current radio band id

Elvaco Transaction statistics

33910/./0

Reset statistics

E

Resets statistics for what this object instance is tracking.

Elvaco Transaction statistics

33910/./1

Transactions

R

Integer

Number of transactions.

Elvaco Transaction statistics

33910/./2

Retransmissions

R

Integer

Number of retransmissions.

Elvaco Transaction statistics

33910/./3

Lost transactions

R

Integer

Number of lost transactions.

Elvaco Transaction statistics

33910/./4

Average response time

R

Integer

Elvaco Transaction statistics

33910/./5

Minimum response time

R

Integer

Elvaco Transaction statistics

33910/./6

Maximum response time

R

Integer


DIEHL METERING SHARKY & SCYLAR error codes

The error codes transported from an MCM is the status byte of the M-Bus header. Bits 71:64 of M-Bus header.

Meaning of Error Codes

The following information is from the documentation received from Diehl Metering. It has only been enhanced by formatting, contents is as-is straight from the document. For latest error description please use the latest documentation available from DIEHL Metering. Table 55, “DIEHL error codes” corresponds to Table 7 of EN 13757-3:2013 for M-Bus.

Table 55. DIEHL error codes

Bit

Description

Usage

0

Reserved

-

1

Any application error

-

2

Power low

E-8, E-9

3

Permanent error

C-1, E-4

4

Temporary error

E-1, E-3, E-6, E-7, leak error

5

Manufacturer specific

See Table 56, “Error code positioning”

6

manufacturer specific

See Table 56, “Error code positioning”

7

manufacturer specific

See Table 56, “Error code positioning”


Table 56, “Error code positioning” explains the position of error codes from the User’s Manual of the meter.

Table 56. Error code positioning

Error

C-1

E-8

E-4

E-1

E-7

E-9

E-3

E-6

Leak error

E-5

M-bus status Byte

0x08

0x04

0x28

0x50

0x70

0x84

0xB0

0xD0

0xF0

0x10

Prio

Highest

Lowest


Table 57, “Error code translation” contains error display codes and corresponding explanations.

Table 57. Error code translation

Error display

Meaning

C-1

C-1

E-1

Temperature measurement error

Temperature range exceeded [-9.9 °C … 190 °C]

Sensor short-circuit

Sensor break

E-3**

Temperature sensors reversed in hot and cold lines

E-4

E-4

Ultrasonic transducer defective

Short-circuit in ultrasonic transducer

E-5

E-5

M-Bus communication not possible for short time

E-6**

Wrong direction of flow

Flow sensor incorrectly installed

E-7

No meaningful ultrasonic receive signal

No meaningful ultrasonic receive signal

E-8

E-8

Powered by back-up battery

E-9

Warning: battery nearly exhausted

E-A*

Warning: battery nearly exhausted

E-b*

Leakage: leakage detected in energy meter

E-C*

Leakage: leakage pulse input 1

E-d*

Leakage: leakage pulse input


* Optional

** application-dependent

Changing APN via the DM system

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.