Pi-900 Wireless Documentation

Chapter 0 About

This manual applies to the wireless program version 2.01.06

Manual version 2018-12-10

Chapter 1 Web Interface

Section 1.1 Configuration

Pi-900 Wireless configuration page
Internal Primary Address:
Address of the internal meter. The internal meter contains the wireless meter list with hop counts and RSSI values.
Wireless Mode:
Wireless mode, possible modes: S1, T1, T1+C
Enable Leds:
Leds S4 are used to signal communication to and from the Wireless slaveport.
Remove Cache Files:
Clears the meter list. This is needed if the include/exclude files are changed.
Set Include/Exclude file:
Select name of the wireless include/exclude file from drop down list. The name must start with wireless and end with .csv. It is not case sensitive. "No file" means the file is not enabled. Check "Remove Cache Files" and press "Save Settings" for every change.
Telegram Preserve Time:
Max age of a telegram. If no new telegram is received within the telegram preserve time, the meter will stop responding to REQ_UD2. The meter will however continue to respond to SND_NKE and SLV_SEL with an E5 until the Cache is removed. If a new telegram arrives, the meter will start responding again.
Type:
Slaveport type. Ethernet (UDP, TCP) or Serial (RS-232, RS-485, M-Bus Slave)
Local port (ethernet):
Portnumber of ethernet port. Default 10011.
Com port (Serial)n:
Serial port. RS-232, RS-485, M-Bus Slave1, M-Bus Slave2.
Baud rate:
Default 2400 baud.
Bit number:
Default 8
Parity:
Default Even Parity.
Stop Bit:
Default 1.
M-Bus timeout:
Slaveport timeout in ms. Default 500ms. This can be set low, much lower than for the wired M-Bus since the telegrams are either cached or unavailable.
Enable Log File:
Enables a log file that logs the up to several thousand incoming telegrams. The telegram file can be downloaded and sent to PiiGAB in case of error.
Download Log File:
Downloads the telegrams log file to a PC.

Section 1.2 Logging

Pi-900 Wireless configuration page
Start:
Start logging. Logging will stop automatically when the log file becomes too big.
Show:
Shows the incoming logging information.
Clear:
Clears the log file.
Startup Log:
Logging information at startup. Contains information about open ports, wireless circuit hardware and software version as well as the wireless mode.

Section 1.3 MeterList Page

The header contains the following information.

Fabrication Number:
This is the same number as the Pi-900S serial number which is also equal to the ID-number in the secondary address. It can be used to select which Pi-900S to read from if more than one Pi-900S are connected in an M-Bus loop.
Secondary address:
The ID-number is the Pi-900S serial number, Manufacturer = 4129 (PII), Version = 01, Medium = 36. Notice that the secondary address of the wireless program is different from the MBusHub program. The version and medium is different.
Primary Address:
Shows the internal meter primary address.
Wireless Mode:
Shows the wireless mode being used.
Active Meters:
Meters that are not excluded, have sent telegram at some time and are marked as active in the include file (Active not equal to 0). Active meters will fill upp the license and the max number of active meters is equal to the wireless license. Max number of Active + Passive meters is 2000 which should be enough to optimise distribution of wireless meters between Pi-900 nodes.
Available Meters:
Meters that are not excluded and have sent a telegram within "Telegram Preserve Time".
Active and available meters:
Meters that are both active and available. All meters in the meter list will respond to SND_NKE. Meters that are both active and available will respond to SND_NKE and REQ_UD2.
Pi-900 Wireless configuration page

Subsection 1.3.1 Meterlist

The meterlist contains information about the wireless meters that have sent a telegram at some time. The list has an upper limit of 2000 meters.

A meter is excluded if it is listed in the exclude file and not listed in the include file. It will then never appear in the meter list.

Secondary Address:
Meter secondary address in the format 12345678.1111.22.33 (METER-ID . MANUFACTURER . VERSION . MEDIUM)
Prim Addr:
Meters primary address. Wireless meters don't have a primary address but the program can assign a user defined primary address to every meter. The primary address is set in the wireless_include file. It can also be set via M-Bus command but if the cache file is removed, the primary address will default to the one defined in the wireless_include file.
MFCT:
Manufacturer in text format ("PII" for PiiGAB).
Meter Type:
The M-Bus MEDIUM number in text format.
RSSI0:
Signal strength directly from meter with hop count = 0.
RSSI1:
Signal strength of the last incoming telegram from a repeater. There may be repeaters with higher RSSI values but only the last incoming value is saved.
Active:
0 if meter is passive, 1 if meter is active (see definition above).
Available:
1 if meter is available, 0 if unavailable (see definition above).
Time Stamp:
Time when telegram arrives in local time (according to Time Zone definition).

Chapter 2 Functionality

The wireless program receives messages from wireless meters, decrypts and translates them into wired telegrams.

The wireless telegrams contain different CI-Fields. CI-fields supported are:

  • 0x72 Tested
  • 0x78 Tested
  • 0x79 Ignored, see below
  • 0x7A Tested
  • 0x8C
  • 0x8D Tested
  • 0x8E
  • 0x8F
  • 0x90 Tested
  • 0xA0--0xB7 Tested

Kamstrup meters do use CI-field 0x79 for compact unencrypted telegrams. Every eight'h telegram is a full telegram (CI-field = 0x78) but 7 of 8 telegrams are compact (Ci-field = 0x79). Expansion of compact telegrams is not supported and the telegram is not put into an LVAR container like for other unsupported telegrams but ignored. 0x78 telegrams are unencrypted and converted to wired telegrams but the 0x79 telegrams are thrown away because all other actions other than expanding them correctly will spoil the wired telegram.

Subsection 2.1 Meter Telegram

The wired telegram

Datarecord 1: Fabrication number (Pi-900S serial number) 0C 78 XX XX XX XX

Datarecord 2: Duration [sec] 03 74 XX XX XX

Datarecord 3: RF signal strength (RSSI) [dBm] 01 FD 71 XX

Datarecord 4: Date/Time CP48 (UTC) 06 6D XX XX XX XX XX XX

If the wireless meter is unencrypted with a known CI-field or correctly decrypted, datarecord 5 will be wireless datarecord 1. If the wireless meter is either not decrypted or contains an unknown CI-field, datarecord 5 will be an L-var that contains the full wireless telegram.

Datarecord 4 is a timestamp of the incoming telegram in UTC (or Greenwich Mean Time). Most wired M-Bus application make timestamps when the telegram is read out but this is not acceptable with wireless meters since the value can be cached for hours before readout. This datarecord makes a timestamp when the telegram is sent which will give a much better timestamp and it is also more easily configurated than reading the meters timestamp.

Subsection 2.2 Internal Telegram (Reference only)

The internal telegram is the telegram that can be read with the Wireless programs secondary address <serialno>.4129.01.36 or primary address (default 250).

Telegram 1

Datarecord 1: Fabrication number (Pi-900S serial number) 0C 78 XX XX XX XX

Datarecord 2: Date/Time CP48 06 6D XX XX XX XX XX XX

Datarecord 3: More datarecords in the next telegram 1F

Datarecord 4--: LVAR one per included meter 0D FD 76 10 (16 bytes)

The content of the 16 byte LVAR is defined in the following way:

4 bytes: M-Bus ID Little endian

2 bytes: Manufacturer Little endian

1 byte: Version

1 byte: Medium

1 byte: Primary address

2 bytes: Duration [min]

1 byte: RSSI0 + Hop count

1 byte: RSSI1 + Hop count

2 bytes: Reserved

1 byte: Included and available.
Bit 0 Meter listed in include file or not listed in exclude file. Bit 1 Meter activated (listed in include file with active not equal to 0). Bit 2 Meter available. Has sent a telegram within "Telegram Preserve Time". Bits 3--7, reserved.

Chapter 3 Include/Exclude files

The wireless Include/exclude files are semicolon separated CSV files (Comma Separated Values). The include/exclude system is a very powerful system to include the meters in your own system and exclude the neighbours meters to keep the total number of meters within license.

The filename must be on the format wireless_XXX.csv. The filename is case sensitive meaning that Wireless_include_T1C.csv and wireless_INCLUDE_t1C.CsV are two different files. Both will show up in the selection dropdown list.

Example:

wireless_include_T1C.csv and wireless_exclude_T1C.csv.

The files can be uploaded via the web interface. Configuration->Basic Configuration->"Upload CSV/XML-File"

By default, there are two files shipped with the Pi-900S: wireless_include_default.csv and wireless_exclude_default.csv. The files are only examples and must be renamed to take effect. They can be downloaded from Configuration->Basic Configuration->"Download CSV/XML-File"

Subsection 3.1 Exclude files

The exclude file is a list of unwanted wireless meters. Wildcards can be used at will.

Example:

12345678.1111.22.33 Exclude a single meter (not very useful). If meter is registered in include file, it will be included.

FFFFFFFF.4129.FF.FF Exclude all PiiGAB wireless products that are not registered in the include file.

FFFFFFFF.FFFF.FF.FF Exclude all meters that are not registerd in the include file.

Subsection 3.2 Include files

The include file is used either to override the exclude file or to add extra configuration parameters. It supports wildcards.

Include File Format:
Full secondary address;Primary address;Wireless Key;Active
"Full secondary address":
The include file supports both addresses with and without wildcards. And as normally, addresses with wildcards are used to specify a groop of meters but addresses without wildcards specify a single meter. A wildcard address can for example be used to include a group of meters and to set the same wireless key to the whole group. If there are two addresses, with and without wildcards, that refer to the same meter, the program will always look first for addresses without wildcards (See examples).
"Primary Address":
A number in the range of 1 to 249. If the primary address is empty, the address will be set to 0. If two or more meters have same primary address, the meter that was registered latest will get the address.
"Wireless key":
32 token hex string, needed for decrypting of encrypted wireless meters, example "0123456789ABCDEF0123456789abcdef" The hex string is not case sensitive. Leave empty for unencrypted meters.
"Active":
Only needed for installations of more than number of meters in license (most often 500 meters). If "Active" is set to 0 the meter will be passive, see definition of "Active" above. Empty field (or any token except for zero) means meter will be active.

Examples:

12345678.1111.22.33;1;0123456789ABCDEF0123456789ABCDEF Primary address = 1, Wireless key.

FFFFFFFF.1111.FF.FF Include all meters with manufacturer = 1111. No decryption key

FFFFFFFF.1112.FF.FF;;;0 Include all meters with manufacturer = 1112. Passive (active = 0) unless included with full addresses

23456789.1112.22.44;200 Include meter and set primary address to 200. Not encrypted. Included and available

FFFFFFFF.2222.FF.FF;;0123456789ABCDEF0123456789ABCDE0 All meters with this MFCT = 2222 will have the same encryption key

12345678.2222.11.22;;0123456789ABCDEF0123456789ABCDE1 except this meter that has a different key even if it is further down the list.