We have received lots of questions about Client and Server addresses in DLMS. Client and Server addresses are also known as Primary Station ID, and Secondary Station addresses. Usually people are asking, where those values come from. I will try to explain this shortly.
DLMS is using HDLC Addressing in Client and Server addresses. In the perfect world everybody would act accordingly, but unfortunately there are device manufacturers, who misunderstand this standard. This is why all devices do not work like this, but at least most of them do.
Client addresses
Client address length is always 8 bits. Below is a list of reserved client HDLC addresses.
Reserved Client HDLC addresses | |
0x00 | NO_STATION Address |
0x01 | Client Management Process |
0x10 | Public client (lowest security level) |
0x7F | ALL_STATION (Broadcast) Address |
When authentication level is None, Client address is 16 (0x10). If authentication level is Low, Client address is 17 (0x11) and for High authentication level, Client address is 18 (0x12). The authentication used affects to Client address. If you have a new device, and you do not know anything of it, try using Client address 0x10.
Client address might depends from the meter!
Server address
Server address consist two parts, Physical device address and Logical Device Address. Lower HDLC address is reserved for Physical device address and Upper HDLC address is reserved for Logical device address. The idea of this is that because there can be several logical devices inside of one physical device, we can address to each logical device separately. For example, the communication unit of a physical device may be shown as a logical device.
This comes very handy, when the user can change the communication unit. In this case the Association View of the device does not change, even if the communication unit is changed. There are several manufacturers though, who do not use the logical device idea, and thus there is only the physical device.
Below is a list of reserved server HDLC addresses.
Reserved upper Server HDLC addresses | |
0x00 | NO_STATION Address |
0x01 | Management Logical Device Address |
0x2…0xF | Reserved for future use |
0x7F | ALL_STATION (Broadcast) Address |
Reserved lower Server HDLC addresses | |
0x00 | NO_STATION Address |
0x01…0x0F | Reserved for future use |
0x7E | CALLING Physical Device Address |
0x7F | ALL_STATION (Broadcast) Address |
Coding HDLC Address for server
The LSB bit is always set to Zero in the address of a logical device. In the address of a physical device, it is set to 1.
An example: The size of the Server address is one byte. The address of the logical device is 1, and the address of the physical device is 2. In this case the Server address is made as follows:
The address of the Logical Device is shifted by one, so the upper value is 2.
The address of the Physical server is shifted by one, and its LSB bit is set to 1, when the lower value is 5.
So the value in binary is 0010 0101, and in hex 0x25.