Page
27
of
60
©
2019 Radiocrafts AS
MBUS User Manual (ver 2.01)
MBUS USER MANUAL
6.7 Examples
Example 3
– Message with Link Layer encryption
Example
Given that the conditions below are met, the packet shown below can be sent over
the air and will be encrypted.
•
Slave is registered on master
•
Slave has it’s own key in key register 1
•
Master has the slave
’s key at the register where slave is installed
•
Encrypt/decrypt flags are set in flag registers
L C
LL_HEADER
ELL
APP DATA - NO TPL_HEAD
M
ID2
M
ID1
UID4
UID3
UID2
UID1
VE
R
D
EV
CI
CC
ACC
CI
D
IF
VIF
D
A
TA
D
A
TA
D
IF
VIF
D
A
TA
D
A
TA
R
SS
I
C
R
C
Field
Hex
Comment/Note
L
0xyy
Length
C
0x44
C-field (0x44 = SND-NR). Added automatically.
Set value in configuration mode during initialization
MAN_ID2
MAN_ID1
0xAB
0xCD
Manufacturer ID. MSB first. Added automatically.
Set value in configuration mode during initialization
.
U_ID4
U_ID3
U_ID2
U_ID1
0x12
0x34
0x56
0x78
Unique ID. MSB first. Added automatically.
Set value in configuration mode during initialization
.
VER
0x01
Version. Added automatically.
Set value in configuration mode during initialization
.
DEV
0x04
Device Type (0x04 = Heat meter). Added automatically
Set value in configuration mode during initialization.
CI
CI field for the Extended Link Layer
CC
ACC
CI
0x78
CI field for the Application Layer. No header.
DIF
0x01
User data DIF field
VIF
0x02
User data VIF field
DATA
0x03
User data
DATA
0x04
User data
DIF
0x05
User data DIF field
VIF
0x06
User data VIF field
DATA
0x07
User data
DATA
0x08
User data
RSSI
-
Optional. Controlled by RSSI_MODE
CRC
-
Optional. Controlled by DATA_INTERFACE
Based on the above this translates to the following packet when sent over UART
0x14 0xAB 0xCD 0x12 0x34 0x56 0x78 0x01 0x04 0xyy 0xyy 0xyy 0xaa 0x01 0x02
0x03 0x04 0x05 0x06 0x07 0x08