---
title: DLMS Blue Book CH8
tags: work
description: DLMS doc.
---
# Blue Book CH8
## Structure of the data link layer

---

---

---
## Protocol specification for the LLC sublayer

### field explain
- Source_LSAP
- The value of the Source_LSAP is 0xE6 or 0xE7. The least significant bit is used as a command/response identifier. When set to 0, it identifies a ‘command’ and when set to 1 it identifies a “response”
- LLC_Quality
- It is reserved for future use.
- Currently, it must be set always to 0x00;
- information
- The information field consists of an integral number (including zero) of octets and it carries the LSDU.
---
## Protocol specification for the MAC sublayer

- information field of zero length do not contain an HCS and an FCS, only an FCS.
---
### Flag field
- `flag` field is one byte and its value is `0x7E`
When two or more frames are transmitted continuously

---
### Frame format field
- sub-field (4 bit) (****is fixed***)
- the Segmentation bit (S, 1 bit)
- the frame **length** sub-field (11 bit)

---
### Destination and source address fields
#### Use of extended addressing
- The address field range can be extended **by reserving the first transmitted bit (low-order)** of each address octet which would then be set to binary zero to indicate that the following octet is an extension of the address field.
- The last octet of an address field is indicted by setting the low-order bit to binary one.
- **the range of single octet addresses to 0x7F(0111 1111) and for two octet addresses to 0...0x3FFF(0011 1111 1111 1111)**
#### client address and server address
- The client address shall always be expressed on one byte.
- The server address – to enable addressing more than one logical device within a single physical device
- the upper HDLC address is used to address a Logical Device (within a physical device)
- the lower HDLC address is used to address a Physical Device
#### Address field structure
- the length of a complete server address field is restricted to be one, two or four bytes long

#### An example

- **the range of single octet addresses to 0x7F(0111 1111) and for two octet addresses to 0...0x3FFF(0011 1111 1111 1111)**
---
### Control field
what is P/F?
- Source_LSAP
- The value of the Source_LSAP is 0xE6 or 0xE7. The least significant bit is used as a command/response identifier. When set to 0, it identifies a ‘command’ and when set to 1 it identifies a “response”

detail: http://www.cs.nthu.edu.tw/~nfhuang/chap03.htm#3.4
---
### ~~Header check sequence (HCS) field~~
---
### ~~Information field~~
---
### Frame check sequence (FCS) field
check code
including the data, except the FCS
---
ref:
- Pic.
OSI layers - http://www.firewall.cx/networking-topics/the-osi-model/179-osi-data-encapsulation.html
sub layers - http://seat.massey.ac.nz/159334/Lectures/Week2_3_1s.pdf
MAC sublayer frame format - https://aticleworld.com/hdlc-protocol/LLC