En nuestro sitio web (y en todas las demás plataformas digitales, incluidas las aplicaciones móviles) se utilizan distintos tipos de cookies. Consulte aquí nuestro nuevo TEXTO INFORMATIVO SOBRE LA LPDP Y LA PRIVACIDAD. Google Analytics Las cookies analíticas nos ayudan a mejorar nuestro sitio web recopilando e informando sobre su uso. Google Ads y Remarketing Utilizamos cookies de marketing para mejorar la relevancia de las campañas publicitarias que recibe.
He leído los apartados anteriores
To read meters with meter reading software, this page is all you need. The steps use the Bluetooth serial port (SPP) on a Windows PC; Bluetooth Low Energy is in Chapter 3.2. Each step links to the chapter that explains it; the table at the end shows which chapters to read if you want to do more.
Your product: KMK118, KMK138, KMK119, KMK139.

KMK118 - read a meter in five steps

A KMK118 on the optical port of an IEC meter

KMK138 - read a meter in four steps

A KMK138 on the optical port of an ANSI meter

KMK119 - read a meter in five steps

A KMK119 on the optical port of an IEC meter

KMK139 - read a meter in five steps

A KMK139 on the optical port of an ANSI meter
| You want to | Read |
| read meters with meter reading software | this page; Chapter 3 connecting, Chapter 4 working modes, Chapter 11 battery, Chapter 10 firmware updates, Chapter 15 troubleshooting; our software: Chapter 12 abcZ for Windows, Chapter 13 ZRobo for Android |
| write your own software | Chapter 6 integration, Chapter 7 every command, Chapter 8 status and identity, Chapter 9 stored settings, Appendix A replies and refusals |
The probes of this manual connect the optical port of a meter to your software over Bluetooth - the Bluetooth serial port (SPP) and Bluetooth Low Energy (BLE). In the automatic modes the probe handles the optical line by itself, so meter reading software that works with a cable probe can use it as it is; in command mode your software sets the line and can ask the probe about itself (Chapter 4).

Figure 1.1 - From the meter to your software
| Product | Optical head | Board | Working mode chosen with |
| KMK118 | ![]() IEC 62056-21 | torch, no mode switch | 0xD5 |
| KMK138 | ![]() ANSI C12.18 Type 2 | torch, no mode switch | 0xD5 |
| KMK119 | ![]() IEC 62056-21 | mode switch and mode LEDs | the mode switch |
| KMK139 | ![]() ANSI C12.18 Type 2 | mode switch and mode LEDs | the mode switch |
KMK118 and KMK119 are the IEC versions, KMK138 and KMK139 the ANSI versions of the same two boards. The hardware is shown in Chapter 2; how each product works as it leaves the factory is in Chapter 4. Firmware for a particular meter or protocol is available as a project-specific variant (Chapter 10.5).
To read a meter right away, follow the Quick Start - a few steps for each product.
This manual describes firmware v6.4 290926 and our software abcZ 4.2.0 for Windows (Chapter 12) and ZRobo 3.0.0 for Android (Chapter 13). A probe with firmware v5.x behaves differently in places; Chapter 14 lists the differences.
The Bluetooth probes come on two boards. KMK119 and KMK139 have a mode switch and mode LEDs; KMK118 and KMK138 have no switch and a built-in torch. KMK118 and KMK119 have an IEC 62056-21 optical head, KMK138 and KMK139 an ANSI C12.18 Type 2 optical head (2.2.2). The working modes are in Chapter 4.
![]() | ![]() |
| Figure 2.1 - KMK119 front | Figure 2.2 - KMK139 front |
![]() | ![]() |
| Figure 2.3 - KMK118 front | Figure 2.4 - KMK138 front |
![]() | ![]() |
| Figure 2.5 - KMK119 side | Figure 2.6 - KMK139 side |
On the side are the USB charging port - USB Type-C or Micro-USB, depending on the hardware version - and the two mode switches. The switch positions are printed on the case:
| Switch 1 | Switch 2 | Switch position |
| OFF | OFF | 1 |
| ON | OFF | 2 |
| OFF | ON | 3 |
| ON | ON | 4 |
The probe reads the switches only at power-on. After you change them, switch the probe off and on again. What each position does is in Chapter 4.
![]() | ![]() |
| Figure 2.7 - KMK119 optical head (IEC 62056-21) | Figure 2.8 - KMK139 optical head (ANSI C12.18 Type 2) |
![]() | ![]() |
| Figure 2.9 - KMK118 optical head (IEC 62056-21) | Figure 2.10 - KMK138 optical head (ANSI C12.18 Type 2) |
KMK118 and KMK119 have an IEC 62056-21 optical head with a flat face that sits on the meter's optical port; KMK138 and KMK139 have an ANSI C12.18 Type 2 optical head with a cavity that fits over it. All probes hold on the meter with an N38 magnet. On KMK118 and KMK138 the head also carries the torch.
The CHARGE LED (on KMK118 and KMK138 the LED with the battery symbol) turns red in three cases:
| The LED is | Meaning |
| On, red | The battery is low (below 3000 mV) - charge the probe (Chapter 11.2). |
| Blinking slowly, about once a second | The probe is checking the settings of its wireless module, for example after a module factory reset - wait until it stops. |
| Blinking fast | The bootloader is at work: a firmware update is being applied, or the probe waits for a firmware load (Chapter 10). |
The probe offers two Bluetooth links. The Bluetooth serial port (SPP, classic Bluetooth) appears on a PC as a COM port; abcZ, meter reading software and most PC programs use it. Bluetooth Low Energy (BLE) is for phones and your own apps. A probe with firmware v6.x has both links on as it leaves the factory.

Figure 3.1 - Windows 10, Bluetooth and other devices

Figure 3.2 - Windows 11, Devices: Bluetooth devices discovery set to Advanced
![]() | ![]() |
| Figure 3.3 - Add a device: choose Bluetooth | Figure 3.4 - The probe is listed twice |
![]() | ![]() |
| Figure 3.5 - Paired, no PIN asked | Figure 3.6 - COM Ports: use the Outgoing port |
Nothing has to be switched on. To see BLE at work, scan with ZRobo on an Android phone: the probe then offers BT BLE next to BT SPP (Figure 3.7, Chapter 13). If you write your own app, the service and characteristic UUIDs, the write size and the connection interval are in Chapter 6.5.

Figure 3.7 - ZRobo after Scan: the probe offers BT SPP and BT BLE
A probe that still runs firmware v5.x left the factory with its BLE data link off: it shows up in a Bluetooth LE scan, but it does not answer over BLE. Updating it to firmware v6.x (Chapter 10) turns the BLE data link on.
A terminal program that sends bytes given in hex is enough - for example RealTerm. Open the probe's COM port and send:
FE FE 42 4C 55 45 30 38 4E 31 A1 FF
The probe answers with its battery voltage in millivolts as ASCII text, followed by 00 - for example 3287 (0xA1). The LINK LED is on while the port is open. With firmware v6.x this works in every working mode (Chapter 6.1.1). The frame is explained in Chapter 6.1.2; the same test in Python and C# is in Chapter 6.6.
Put the optical head on the meter and select the probe's outgoing COM port in your meter reading software - for example our ZR meter reading software. Choose the working mode that suits the meter and the software first (Chapter 4). On an Android phone use ZRobo (Chapter 13).
The working mode decides what the probe does on the optical line: follow an IEC 62056-21 or DLMS/COSEM session by itself, pass data at a fixed speed, or take commands from your software (command mode). The command frames of Chapter 7 are answered in every mode; only the line commands need command mode.

Figure 4.1 - The working modes and how each product selects them
These probes have no mode switch. The function is stored in the probe and changed with 0xD5; the probe then restarts in the new function.
| 0xD5 value | Function | What the optical line does | Shipped on |
| 0 | Command mode | Takes commands from your software. The line starts with the stored settings (factory 300 baud 7E1). | KMK118 |
| 1 | IEC auto | Starts at 300 baud 7E1 and follows the IEC 62056-21 baud change-over by itself (mode C or E: 0xD3). | - |
| 2 | Fixed 9600 8N1 | Passes data both ways at 9600 baud 8N1, for example for ANSI C12.18 meters. | KMK138 |
| 3 | DLMS auto | Starts at 300 baud 7E1 with the IEC opening and changes to DLMS/COSEM by itself (start framing: 0xD4). | - |
Send 0xD5 alone to read the active function. 0xD5 with 0xFF returns to the default of the loaded firmware. KMK138 is shipped in fixed 9600 8N1 for ANSI C12.18 meters; the other functions are one command away.
The 4-position switch selects the working mode, and the mode LEDs show the position. The switch is read only at power-on: switch the probe off, move the switch, switch it on again. Commands 0xD1 - 0xD4 restart the probe, so the switch is read after them too.
KMK119 - the standard firmware variant:
| Position | LED | Working mode | What the optical line does | Options |
| 1 | IEC AUTO | IEC auto | Starts at 300 baud 7E1 and follows the IEC 62056-21 baud change-over (for example Elster, EMH and Landis+Gyr meters). | Mode C or E: 0xD3 |
| 2 | DLMS AUTO | DLMS auto | Starts at 300 baud 7E1 with the IEC opening and changes to DLMS/COSEM (for example Itron and Landis+Gyr meters). | Start framing 7E1 or 8N1: 0xD4 |
| 3 | MODE 3 | Fixed line | Passes data both ways at a fixed speed: 9600 8N1 unless changed. | 9600 8N1, 9600 8E1, 19200 8N1, 28800 8N1, 1200 8N1: 0xD2 |
| 4 | MODE 4 | Command mode | Takes commands from your software. The line starts with the stored settings (factory 300 baud 7E1). | Line: 0x30 - 0x38, 0x40 - 0x44; store with 0xE0 |
KMK139 - the ANSI2 firmware variant, as shipped:
| Position | LED | Working mode | What the optical line does | Options |
| 1 | MODE 1 | Fixed line | Passes data both ways at 4800 baud 8N1. | none |
| 2 | MODE 2 | Fixed line | Passes data both ways at 9600 baud 8N1. | none |
| 3 | MODE 3 | Fixed line | Passes data both ways at 19200 baud 8N1. | none |
| 4 | MODE 4 | Command mode | Takes commands from your software. The line starts with the stored settings (factory 300 baud 7E1). | Line: 0x30 - 0x38, 0x40 - 0x44; store with 0xE0 |
KMK139 is the KMK119 with the ANSI (recessed) optical head. It leaves the factory with the ANSI2 firmware variant: switch positions 1 - 3 are fixed lines for ANSI C12.18 meters (4800 8N1 / 9600 8N1 / 19200 8N1), position 4 is command mode. 0xD2, 0xD3 and 0xD4 are settings of the standard variant (position 3, IEC auto, DLMS auto); a KMK139 stores them, but its line does not change.
The variant is stored in the probe and changed with 0xD1; a variant set with 0xD1 stays when a different firmware image is loaded. A probe whose variant was never set uses the variant of the loaded image, so update a KMK139 with its ANSI2 file (Chapter 10.1.1). Other variants are project-specific.
| Product | How |
| KMK118 | As shipped. Otherwise send 0xD5 with 0; the probe restarts in command mode. |
| KMK138 | Send 0xD5 with 0; the probe restarts in command mode. Send 0xD5 with 2 (or 0xFF) to go back to fixed 9600 8N1. |
| KMK119 / KMK139 | Switch position 4, then switch the probe on. |
To check the mode from your software read 0xDA: field 3 is the working mode and field 9 the switch position (field list). The stored choices are kept by a factory reset and by firmware updates over the air - Chapter 9.
The line is the optical connection between the probe and the meter. In the automatic and fixed modes the probe sets the line itself; in command mode your software sets it.
| Working mode | Line at the start | Changed by | Data you receive |
| IEC auto | 300 baud 7E1 | the probe, following the meter | 7-bit characters: the parity bit is removed |
| DLMS auto | 300 baud 7E1 (8N1 with 0xD4 = 1) | the probe, following the meter | 7-bit characters during the IEC opening; after the change-over 8N1 bytes, unchanged |
| Fixed line | 9600 baud 8N1 on KMK118 / KMK138; switch position 3 of KMK119: set with 0xD2; switch positions 1 - 3 of KMK139: 4800 8N1 / 9600 8N1 / 19200 8N1 | nobody - it stays fixed | 8N1: bytes unchanged |
| Command mode | the stored setting, factory 300 baud 7E1 | your software (5.2.1) | 7E1: 7-bit characters; 8N1, 8E1, 8O1, 8N2: bytes unchanged |
In IEC auto and DLMS auto the probe passes nothing to the meter before the sign-on request that starts with /: bytes your software sends before it - for example NUL bytes meant to wake a battery-powered meter - are dropped.
The command byte itself carries the value: 0x30 - 0x38 set the speed (300 - 38400 baud), 0x40 - 0x44 the data format (7E1, 8N1, 8E1, 8O1, 8N2), and 0x50 / 0x51 hold or release a break. They take effect at once and send no reply. Outside command mode they are refused with 15 (reason 10).
A line setting you send lives in RAM. In command mode the probe applies the STORED line settings again every time a new connection is made. If the connection drops and you reconnect, the line is back at the stored speed and format - a job that carries on without noticing reads garbage. For a long job, store the line settings with 0xE0 before you start.
In the IEC and DLMS auto modes a new connection restarts the automatic sequence at 300 baud.
IEC 62056-21 optical communication goes up to 19200 baud, and up to 19200 baud the probe was measured byte-exact in both directions. 28800 and 38400 baud are outside the standard. They can work with a given meter, but may need a higher optical sensitivity (0xD0), and bytes can be lost - in our measurements in the probe-to-meter direction. Use them only with a protocol that checks its own data (for example with a CRC), and test with your meter first.
How your own software talks to the probe. The rules below are the same over the Bluetooth serial port (SPP) and Bluetooth Low Energy (BLE); transport notes are in 6.5 and working code in 6.6.
Everything you send goes to the meter over the optical line, except a command frame: the probe recognises its 12-byte frame, answers it itself and does not pass it on. On firmware v6.x the frame is recognised in every working mode, so you can query the probe without stopping a reading session. On v5.x the frame was recognised in command mode and in the fixed-speed modes, not in the automatic IEC and DLMS modes; firmware without a command mode answered only 0xA0 - 0xA2.

Figure 6.1 - The 12 bytes of a command frame
| Byte | 1 - 2 | 3 - 10 | 11 | 12 |
| Value | FE FE | 42 4C 55 45 30 38 4E 31 | command | FF |
| Meaning | start | "BLUE08N1" in ASCII | the command code | end |
Only byte 11 changes. Example - read the firmware name (0xA0):
FE FE 42 4C 55 45 30 38 4E 31 A0 FF
Most commands reply with ASCII text or a status byte, followed by 00. The status bytes are 06 (ACK, accepted), 15 (NACK, refused - 0xDC tells why) and 00 (end of the reply): Appendix A.2. These commands reply differently:
| Commands | Reply |
| 0x30 - 0x38, 0x40 - 0x44, 0x50, 0x51 | none - the new setting applies at once |
| 0xC2 | none - the probe switches off |
| 0xBC, 0xBD | a single 06, no 00 after it |

Figure 6.2 - Form A and Form B: the bytes and the 1 s parameter window
The probe answers 06 00, waits up to 1 s for one parameter byte, and answers 06 00 again when the value is applied. Without a parameter it answers 15 00 after 1 s and nothing changes. Send the parameter in the same write as the frame.
Set the sensitivity to 30 (0x1E):
-> FE FE 42 4C 55 45 30 38 4E 31 D0 FF
<- 06 00 frame accepted
-> 1E the value - send it in the same write as the frame
<- 06 00 value applied
The same frame without the value:
-> FE FE 42 4C 55 45 30 38 4E 31 D0 FF
<- 06 00
... 1 s ...
<- 15 00 nothing changed; 0xDC then reads "208,7"
After the frame the probe sends nothing and waits up to 1 s for one parameter byte. If it arrives, the probe answers 06 00, stores the value and restarts. Send the frame alone to read the value: after 1 s the probe answers 15 00 and then the value. The 15 00 is normal for a query - read on to the second 00.
Set switch position 3 to 19200 8N1 (0xD2 = 2):
-> FE FE 42 4C 55 45 30 38 4E 31 D2 FF
-> 02 the value - within 1 s; nothing comes back before it
<- 06 00 stored; the probe restarts
Read the value:
-> FE FE 42 4C 55 45 30 38 4E 31 D2 FF
... 1 s ...
<- 15 00 32 00 "2" = 19200 8N1
Value out of range:
-> FE FE 42 4C 55 45 30 38 4E 31 D2 FF
-> 09
<- 15 00 nothing changed; 0xDC then reads "210,9"
Back to the default of the firmware (v6.2 and later):
-> FE FE 42 4C 55 45 30 38 4E 31 D2 FF
-> FF
<- 06 00 stored value cleared; the probe restarts
0xFE always starts a new frame, so it is never taken as a parameter. After 0xC3 or 0xD0 the probe answers 15 00 (reason 8) and reads the 0xFE as the start of the next frame; this is why 254 cannot be sent to them. After 0xD1 - 0xD5 the 0xFE is not taken as a value either: the probe answers it like a query (15 00, the value, 00), and 0xDC does not record it. Send each frame and its parameter in one write, and do not start the next command before the parameter has gone.
The line commands and the factory reset (0x30 - 0x38, 0x40 - 0x44, 0x50, 0x51, 0xE1) work only in command mode, because changing the line in the middle of an automatic session would break it. In any other mode they are refused with 15 (reason 10). All other commands work in every mode.
0xD1 - 0xD5 store their value, answer 06 00 and restart the probe about 50 ms later, so the new setting is applied cleanly. A firmware update also ends with a restart. After a restart:
Do not send commands while a meter transfer is running: no data is lost, but the reply is inserted into the meter data at that point, and your software may not find it.
Serial port (SPP): on Windows the first open of a Bluetooth COM port can fail with a timeout ("semaphore timeout"); open it again.
Bluetooth Low Energy: the probe is a serial port over GATT. Service 26cc3fc0-6241-f5b4-5347-63a3097f6764 holds one characteristic, bf8796f1-64f7-70b5-1e41-09bb46d79100 (read, notify, write, write without response) - the same on BT v4.1 and BT v5.1 models. Enable notifications on it to receive replies and meter data, and write commands and data to it. The service is not in the advertisement (only the Battery service 0x180F is): find the probe by its name, then look up the service after connecting.
The write size depends on the Bluetooth version of the probe (0xDA field 11): BT v4.1 models take 20-byte writes (MTU 23), BT v5.1 models up to 240 bytes after the MTU exchange (both measured). Use write without response: it works on both, while BT v4.1 models have refused write with response in some tests. Keep a frame and its parameter in one write where possible.
The BLE connection interval is chosen by the phone, not by the probe. On one Android phone the default was 48.75 ms; requestConnectionPriority(CONNECTION_PRIORITY_HIGH) brought it to 15 ms and made command and reply traffic much faster. iOS has no equivalent call.
In a BLE scan list only about the first 15 characters of the device name are shown. Production names are short - "KMK118 xxxxxx", where xxxxxx is the end of the Bluetooth address - so every probe is still unique.
Both examples read the name, the battery and two settings, then set the sensitivity. The Python example was run unchanged on a KMK118 and a KMK119 with firmware v6.4 290926; the C# example was compiled and tested against a simulated probe. Adjust the COM port name.
"""Talk to a Bluetooth optical probe from Python over its Bluetooth serial (SPP) port.
Needs pyserial: pip install pyserial
"""
import time
import serial
FRAME = bytes.fromhex("FE FE 42 4C 55 45 30 38 4E 31")
def command(port, code, param=None, wait=1.3):
"""Send one command frame (and an optional parameter byte); return the raw reply."""
port.reset_input_buffer()
data = FRAME + bytes([code, 0xFF])
if param is not None:
data += bytes([param]) # the parameter goes in the same write
port.write(data)
reply = b""
end = time.monotonic() + wait # a query answers after its 1 s parameter window
while time.monotonic() < end:
reply += port.read(port.in_waiting or 1)
return reply
def text(reply):
"""The ASCII text of a reply, without the 00 terminators."""
return reply.replace(b"\x00", b"").decode("ascii", "replace")
def main(port_name="COM5"):
# The probe's Bluetooth COM port. The baud rate value is not used by a Bluetooth port.
with serial.Serial(port_name, 9600, timeout=0.1) as probe:
print("name :", text(command(probe, 0xA0)))
print("battery :", text(command(probe, 0xA1)), "mV")
fields = text(command(probe, 0xDA)).split(",")
print("mode :", fields[2], " switch position:", fields[8])
print("0xD0 = 30:", command(probe, 0xD0, 30).hex(" ")) # 06 00 06 00 = applied
if __name__ == "__main__":
main()
// Talk to a Bluetooth optical probe from C# over its Bluetooth serial (SPP) port.
using System;
using System.Collections.Generic;
using System.IO.Ports;
using System.Text;
using System.Threading;
static class ZtSerial
{
static readonly byte[] Frame = { 0xFE, 0xFE, 0x42, 0x4C, 0x55, 0x45, 0x30, 0x38, 0x4E, 0x31 };
// Send one command frame (and an optional parameter byte); return the raw reply.
static byte[] Command(SerialPort port, byte code, int param = -1, int waitMs = 1300)
{
port.DiscardInBuffer();
var data = new List<byte>(Frame);
data.Add(code);
data.Add(0xFF);
if (param >= 0)
data.Add((byte)param); // the parameter goes in the same write
port.Write(data.ToArray(), 0, data.Count);
var reply = new List<byte>();
var end = DateTime.UtcNow.AddMilliseconds(waitMs); // a query answers after 1 s
while (DateTime.UtcNow < end)
{
while (port.BytesToRead > 0)
reply.Add((byte)port.ReadByte());
Thread.Sleep(20);
}
return reply.ToArray();
}
// The ASCII text of a reply, without the 00 terminators.
static string Text(byte[] reply)
{
return Encoding.ASCII.GetString(reply).Replace("\0", "");
}
static void Main()
{
// The probe's Bluetooth COM port. The baud rate value is not used by a Bluetooth port.
using (var probe = new SerialPort("COM5", 9600))
{
probe.Open();
Console.WriteLine("name : " + Text(Command(probe, 0xA0)));
Console.WriteLine("battery : " + Text(Command(probe, 0xA1)) + " mV");
string[] fields = Text(Command(probe, 0xDA)).Split(',');
Console.WriteLine("mode : " + fields[2] + " switch position: " + fields[8]);
Console.WriteLine("0xD0 = 30: " + BitConverter.ToString(Command(probe, 0xD0, 30)));
}
}
}
Every command is a 12-byte frame: FE FE 42 4C 55 45 30 38 4E 31, the command byte, then FF. Only the command byte changes. This chapter describes firmware v6.4; where older firmware behaves differently, the card says so in its "On v5.x" row. Refusal reasons and status bytes are in Appendix A; service commands are in Appendix B.
| Code | Command | KMK118 / KMK138 | KMK119 / KMK139 | Since |
| 0xA0 | Read the firmware name | Y | Y | v5.x |
| 0x9E | Read the image identity | Y | Y | v6.2 |
| 0xDA | Read all settings | Y | Y | v6.0 |
| 0xDB | Read the capabilities | Y | Y | v6.0 |
| 0xDC | Why was it refused? | Y | Y | v6.0 |
| 0x30 - 0x38 | Set the line speed | C | C | v5.x |
| 0x40 - 0x44 | Set the data format | C | C | v5.x |
| 0x50 - 0x51 | Break on / off | C | C | v5.x |
| 0xA1 | Read the battery voltage | Y | Y | v5.x |
| 0xA9 | Read the battery charge | Y | Y | v6.0 |
| 0xA2 | Keep the probe awake | Y | Y | v5.x |
| 0xC2 | Switch off | Y | Y | v5.x |
| 0xC3 | Set the auto power-off time | Y | Y | v5.x |
| 0xD0 | Set the optical sensitivity | Y | Y | v5.x |
| 0xD5 | Select the working function | Y | - | v6.0 |
| 0xD1 | Select the firmware variant | - | Y | v6.0 |
| 0xD2 | Switch position 3 line settings | (-) | Y | v6.0 |
| 0xD3 | IEC baud change-over mode | Y | Y | v6.0 |
| 0xD4 | DLMS start framing | Y | Y | v6.0 |
| 0xE0 | Store the settings | Y | Y | v5.x |
| 0xE1 | Factory reset | C | C | v5.x |
| 0xBD | Restart the wireless module | Y | Y | v6.0 |
| 0xBC | Factory-reset the wireless module | Y | Y | v6.0 |
Y = works in every working mode. C = command mode only (refused with 15 in other modes). - = not on this product: no reply. (-) = accepted, but has no effect on this product.
Read the firmware name and version. Send it first: it tells you the product, the working mode and the firmware generation.
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | All versions (v5.x and v6.x) |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 A0 FF |
| Reply | ASCII text, then 00. Example: "N23221133 v6.4 290926". |
| On v5.x | Answered in command mode and in the fixed-speed modes; the automatic IEC and DLMS modes did not answer commands, and there was no refusal reply (15). Name format: free text up to v5.3; from v5.4 nine characters with c5 - c7 always 000. |
| Char | Position | Meaning | Values | Fixed or live |
c0 | position 1 | Optical sensor | N = current sensor, O = older sensor | fixed |
c1 | position 2 | Product | 1 = KMK119 / KMK139, 2 = KMK118 / KMK138, 7 = KMK179 | fixed |
c2 | position 3 | Working mode or variant | KMK118 / KMK138: 1 command mode, 2 IEC auto, 3 fixed 9600 8N1, 4 DLMS auto. KMK119 / KMK179: 0 standard; KMK139: 6 ANSI2 (as shipped); other values are project-specific variants | live |
c3 | position 4 | DLMS start framing | 1 = 8N1, 2 = 7E1 | live |
c4 | position 5 | IEC change-over mode | 1 = mode E, 2 = mode C | live |
c5 | position 6 | Bootloader | 0 = legacy, 1 = A/B (staged update possible) | live |
c6 | position 7 | Update capability | 0 = legacy only, 1 = staged and armed trigger | fixed |
c7 | position 8 | Generation | 3 = v6.x, 0 = v5.x | fixed |
c8 | position 9 | Wireless module | 3 = Bluetooth (BT v4.1 and BT v5.1 models), 4 = WiFi (KMK179); 1 and 2 on older units | fixed |
The live characters show what the probe is doing now, so they can differ from the code in the firmware file name - that is not a fault. Only the version and date (for example v6.4 290926) must match your firmware package.
Read the build identity of the running firmware image.
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | From v6.2 - not in v5.x |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 9E FF |
| Reply | A number as ASCII decimal, then 00. Example: "1301". |

NOTE:
Compare it for EQUALITY with the value published for your firmware package; it is not a version order.
Read every setting in one reply.
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | From v6.0 - not in v5.x |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 DA FF |
| Reply | Thirty-two comma-separated fields, then 00. Field 11 is text, the others are ASCII decimal. |

NOTE:
New firmware only ADDS fields at the end: read the fields you need by position and ignore fields you do not know.
| Field | Meaning | Example |
| 1 | Line speed in use: code 48-56 = 0x30-0x38 | 53 = 9600 baud |
| 2 | Data format in use: code 64-68 = 0x40-0x44 | 65 = 8N1 |
| 3 | Working mode: 0 IEC auto, 1 DLMS auto, 2 DLMS auto with a fixed 8N1 start, 3 fixed line 8N1, 4 command mode, 5 fixed line 8E1. Modes 3 and 5 do not tell the speed - read field 1. | 3 |
| 4 | Auto power-off time, s (255 = never) | 240 |
| 5 | Optical sensitivity | 30 |
| 6 | Sleep: 1 enabled, 0 disabled | 1 |
| 7 | Stored power-on line speed code | 48 = 300 baud |
| 8 | Stored power-on data format code | 64 = 7E1 |
| 9 | Switch position: 1-4 on KMK119 / KMK139 / KMK179, 0 on KMK118 / KMK138 | 3 |
| 10 | Out-of-production flag: 1 = the wireless module was factory-reset (0xBC) and not reconfigured since | 0 |
| 11 | Wireless module type as text: BT43H on BT v4.1 models, BT53B on BT v5.1 models, WF52 on the KMK179 (WiFi); 0 = not determined yet | BT53B |
Fields 12 - 32 are service diagnostics: Appendix B.1.1.
Ask which features this firmware image has.
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | From v6.0 - not in v5.x |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 DB FF |
| Reply | A number as ASCII decimal, then 00. Each bit is one feature - see the table below. |

NOTE:
Test single bits - never compare the whole number with a constant. Read it as an unsigned 32-bit value. Firmware built before August 2026 does not answer.
| Bit value | Hex | Feature |
| 1 | 0x1 | Staged (A/B) firmware update |
| 2 | 0x2 | Firmware update trigger at any time |
| 4 | 0x4 | Module settings: write |
| 8 | 0x8 | Module settings: read |
| 16 | 0x10 | Module factory reset and restart (0xBC, 0xBD) |
| 32 | 0x20 | Line options 0xD2 - 0xD4 |
| 64 | 0x40 | Settings dump (0xDA) |
| 128 | 0x80 | Diagnostic counters |
| 256 | 0x100 | Resume an interrupted update |
| 512 | 0x200 | Refusal reason (0xDC) |
| 1024 | 0x400 | Variant selection (0xD1) |
| 2048 | 0x800 | Function selection (0xD5) |
| 4096 | 0x1000 | Module setting values are checked before writing |
| 8192 | 0x2000 | Queries are answered during an update session |
| 16384 | 0x4000 | Last module read can be fetched again |
| 32768 | 0x8000 | Bluetooth Low Energy self-repair at module start |
| 65536 | 0x10000 | Second diagnostic block |
| 131072 | 0x20000 | Image identity (0x9E) |
Ask why the last command was refused (NACK).
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | From v6.0 - not in v5.x |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 DC FF |
| Reply | Command code and reason code as two ASCII decimals, then 00. Example: "213,9" = command 0xD5, reason 9. Command 0 = nothing refused since power-on. All reason codes: Appendix A.1. |
| Stored | Kept until the next refusal overwrites it; reading it does not clear it. |
Set the speed of the optical (meter-side) line. The command byte itself is the speed.
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | All versions (v5.x and v6.x) |
| Works in | Command mode only |
| Send | FE FE 42 4C 55 45 30 38 4E 31 XX FF - XX is the command byte |
| Command byte |
|
| Reply | No reply. The new speed applies at once. |
| Stored | RAM only - send 0xE0 to keep it as the power-on default. |
| If refused (v6.0 and later) | Outside command mode: 15 (NACK), reason 10 - Appendix A.1. |
| On v5.x | Only on firmware with a command mode, which answered it in command mode and also in the fixed-speed modes (the mode was not checked); the automatic IEC and DLMS modes did not answer commands, and there was no refusal reply (15). |

NOTE:
28800 and 38400 baud are above what the optical standard covers: they may need a sensitivity adjustment (0xD0) and bytes can be lost. Use them only with a protocol that has its own checksum (Chapter 5.3).
Set the data format of the optical line. The command byte itself is the format.
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | All versions (v5.x and v6.x) |
| Works in | Command mode only |
| Send | FE FE 42 4C 55 45 30 38 4E 31 XX FF - XX is the command byte |
| Command byte |
|
| Reply | No reply. The new format applies at once. |
| Stored | RAM only - send 0xE0 to keep it as the power-on default. |
| If refused (v6.0 and later) | Outside command mode: 15 (NACK), reason 10 - Appendix A.1. |
| On v5.x | Only on firmware with a command mode, which answered it in command mode and also in the fixed-speed modes (the mode was not checked); the automatic IEC and DLMS modes did not answer commands, and there was no refusal reply (15). 0x44 (8N2) from v5.2. |
Hold the optical transmit line in the break state, or release it.
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | All versions (v5.x and v6.x) |
| Works in | Command mode only |
| Send | FE FE 42 4C 55 45 30 38 4E 31 XX FF - XX is the command byte |
| Parameter |
|
| Reply | No reply. |
| Stored | RAM only - a power cycle also releases the break. |
| If refused (v6.0 and later) | Outside command mode: 15 (NACK), reason 10 - Appendix A.1. |
| On v5.x | Only on firmware with a command mode, which answered it in command mode and also in the fixed-speed modes (the mode was not checked); the automatic IEC and DLMS modes did not answer commands, and there was no refusal reply (15). |

NOTE:
For meters that need a break condition before a session.
Read the battery voltage in millivolts.
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | All versions (v5.x and v6.x) |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 A1 FF |
| Reply | ASCII decimal, then 00. Example: "3206". |
| On v5.x | Answered in command mode and in the fixed-speed modes; the automatic IEC and DLMS modes did not answer commands, and there was no refusal reply (15). |

NOTE:
The lowest voltage measured since power-on. Measured after the regulator, so a nearly empty battery can still read high. The useful range is 3000 - 3200 mV. Charge the probe before a firmware update.
Read the battery charge as a percentage.
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | From v6.0 - not in v5.x |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 A9 FF |
| Reply | ASCII decimal 0 - 100, then 00. Example: "78". |

NOTE:
Linear between 3000 mV (0%) and 3200 mV (100%); the same caveat as 0xA1.
Stop the probe from entering its low-power sleep.
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | All versions (v5.x and v6.x) |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 A2 FF |
| Reply | 06 00 (ACK). |
| Stored | RAM only - send 0xE0 to keep it after a power cycle. |
| On v5.x | Answered in command mode and in the fixed-speed modes; the automatic IEC and DLMS modes did not answer commands, and there was no refusal reply (15). |

NOTE:
Without a connection the probe otherwise sleeps after 60 s. This does not stop the auto power-off (0xC3). Send it again after anything that restarts the probe.
Switch the probe off, as with the power button.
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | All versions (v5.x and v6.x) |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 C2 FF |
| Reply | None - the probe switches off. |
| On v5.x | Only on firmware with a command mode, which answered it in command mode and also in the fixed-speed modes (the mode was not checked); the automatic IEC and DLMS modes did not answer commands, and there was no refusal reply (15). |
Set how long the probe waits without activity before it switches itself off.

WARNING:
0 switches the probe off as soon as the connection closes. Do not store a time under 60 s with 0xE0: at power-up the probe would switch itself off before you can connect.
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | All versions (v5.x and v6.x) |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 C3 FF |
| Parameter |
|
| Reply |
|
| If refused (v6.0 and later) | No parameter within 1 s: 15 00 and nothing changes. |
| Stored | RAM only - send 0xE0 to keep it after a power cycle. |
| On v5.x | Only on firmware with a command mode, which answered it in command mode and also in the fixed-speed modes (the mode was not checked); the automatic IEC and DLMS modes did not answer commands, and there was no refusal reply (15). Factory value 254 s; a connected probe never switched itself off. |

NOTE:
Factory value 240 s. The countdown runs only while no connection is open; a connected probe without traffic switches off after about 11 minutes (Chapter 11.3). 254 (0xFE) cannot be sent: 0xFE always starts a new frame (Chapter 6.2.3).
Set the sensitivity of the optical receiver.
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | All versions (v5.x and v6.x) |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 D0 FF |
| Parameter |
|
| Reply |
|
| If refused (v6.0 and later) | No value within 1 s: 15 00 and nothing changes. |
| Stored | RAM only - send 0xE0 to keep it after a power cycle. |
| On v5.x | Only on firmware with a command mode, which answered it in command mode and also in the fixed-speed modes (the mode was not checked); the automatic IEC and DLMS modes did not answer commands, and there was no refusal reply (15). Factory value 26; a factory reset (0xE1) set 49 on older units. |

NOTE:
Factory value 30 (49 on older units). Raise it step by step for meters with a weak optical output; lower it if you see duplicated bytes from reflections. On KMK119, KMK139 and KMK179 stay at or below 0x55. 254 (0xFE) cannot be sent: 0xFE always starts a new frame (Chapter 6.2.3).
Select what the optical line does on KMK118 / KMK138.
| Products | KMK118 · KMK138 |
| Firmware | From v6.0 - not in v5.x |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 D5 FF |
| Parameter |
|
| Reply |
|
| If refused | Value out of range: 15 00 and nothing changes (reason 9, Appendix A.1). |
| Stored | Stored at once. Kept by a factory reset (0xE1) and by firmware updates. |

NOTE:
Before v6.0 each function was a separate firmware. The functions: Chapter 4.1.
Select the firmware variant on KMK119 / KMK139 / KMK179.
| Products | KMK119 · KMK139 |
| Firmware | From v6.0 - not in v5.x |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 D1 FF |
| Parameter |
|
| Reply |
|
| If refused | Value out of range: 15 00 and nothing changes (reason 9, Appendix A.1). |
| Stored | Stored at once. Kept by a factory reset (0xE1) and by firmware updates. |

NOTE:
Loading a different firmware image does NOT change a variant set with this command. A probe whose variant was never set uses the variant of the loaded image.
Choose the line settings of switch position 3.
| Products | KMK119 · KMK139 (accepted on KMK118 / KMK138 without effect; a KMK139 with the ANSI2 variant stores it, but its line does not change) |
| Firmware | From v6.0 - not in v5.x |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 D2 FF |
| Parameter |
|
| Reply |
|
| If refused | Value out of range: 15 00 and nothing changes (reason 9, Appendix A.1). |
| Stored | Stored at once. Kept by a factory reset (0xE1) and by firmware updates. |
Choose the IEC 62056-21 baud change-over mode used by the IEC auto mode.
| Products | KMK118 · KMK138 · KMK119 · KMK139 (a KMK139 with the ANSI2 variant stores it, but its line does not change) |
| Firmware | From v6.0 - not in v5.x |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 D3 FF |
| Parameter |
|
| Reply |
|
| If refused | Value out of range: 15 00 and nothing changes (reason 9, Appendix A.1). |
| Stored | Stored at once. Kept by a factory reset (0xE1) and by firmware updates. |
Choose the data format at the start of a DLMS session in the DLMS auto mode.
| Products | KMK118 · KMK138 · KMK119 · KMK139 (a KMK139 with the ANSI2 variant stores it, but its line does not change) |
| Firmware | From v6.0 - not in v5.x |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 D4 FF |
| Parameter |
|
| Reply |
|
| If refused | Value out of range: 15 00 and nothing changes (reason 9, Appendix A.1). |
| Stored | Stored at once. Kept by a factory reset (0xE1) and by firmware updates. |
Store the current session settings as the power-on defaults.
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | All versions (v5.x and v6.x) |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 E0 FF |
| Reply | 06 00 - two bytes; read both. |
| Stored | Yes - this is the command that makes settings survive a power cycle |
| On v5.x | Only on firmware with a command mode, which answered it in command mode and also in the fixed-speed modes (the mode was not checked); the automatic IEC and DLMS modes did not answer commands, and there was no refusal reply (15). |

NOTE:
Stores sleep, auto power-off, sensitivity, line speed and data format. The working-mode commands 0xD1 - 0xD5 store themselves. The stored bytes: Appendix A.3.
Restore and store the factory settings.
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | All versions (v5.x and v6.x) |
| Works in | Command mode only |
| Send | FE FE 42 4C 55 45 30 38 4E 31 E1 FF |
| Reply | 06 00. |
| Stored | Yes - written to EEPROM immediately |
| If refused (v6.0 and later) | Outside command mode: 15 (NACK), reason 10 - Appendix A.1. |
| On v5.x | Only on firmware with a command mode, which answered it in command mode and also in the fixed-speed modes (the mode was not checked); the automatic IEC and DLMS modes did not answer commands, and there was no refusal reply (15). It restored an auto power-off of 254 s and sensitivity 26 (49 on older units). |

NOTE:
Restores: sleep on, auto power-off 240 s, sensitivity 30 (49 on older units), 300 baud 7E1. It does not change the working mode or variant (0xD1 - 0xD5).
Restart the Bluetooth or WiFi module of the probe.
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | From v6.0 - not in v5.x |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 BD FF |
| Reply | 06, then the module restarts and the connection drops. |
| If refused | 15 if a module configuration is pending (reason 2) or the meter is sending (reason 3). |

NOTE:
The connection drops about 26 s after the 06 and you can reconnect after about 36 s (measured on a Windows PC over the Bluetooth serial port). Useful when the connection is up but data no longer passes.
Return the Bluetooth or WiFi module to its own factory configuration.

WARNING:
Service use only. The module loses its production settings: the device name and the link parameters return to the module defaults, and on BT v5.1 models Bluetooth Low Energy stays off until the probe restores it at its next module start. Drop the connection right after the 06 - while the link is held open the reset does not happen. Restoring the production settings needs abcZ in service mode - contact us.
| Products | KMK118 · KMK138 · KMK119 · KMK139 |
| Firmware | From v6.0 - not in v5.x |
| Works in | Every working mode |
| Send | FE FE 42 4C 55 45 30 38 4E 31 BC FF |
| Reply | 06 (single byte). |
| If refused | 15 if a module configuration is pending (reason 2) or the meter is sending (reason 3). |
| Stored | Written into the module. |
A few read-only commands tell you what a probe is and what it is doing. They work in every working mode and change nothing, so you can send them at any time - except in the middle of a meter transfer (Chapter 6.4).
| Question | Command | Example reply | Details |
| Which product, firmware and mode? | 0xA0 | "N23221133 v6.4 290926" | name code |
| Exactly which firmware image is running? | 0x9E | "1301" | compare for equality with the value published with your firmware |
| What are all the settings now? | 0xDA | 32 comma-separated fields | fields 1 - 11 |
| Which features does this firmware have? | 0xDB | a 32-bit number | capability bits |
| Why was my last command refused? | 0xDC | "213,9" | reason codes |
The name has a nine-character code, the version and the build date. Example "N23221133 v6.4 290926":
| Char | Value | Means |
| c0 | N | current optical sensor |
| c1 | 2 | KMK118 / KMK138 |
| c2 | 3 | fixed 9600 8N1 |
| c3 | 2 | DLMS start 7E1 |
| c4 | 2 | IEC mode C |
| c5 | 1 | A/B bootloader |
| c6 | 1 | staged update supported |
| c7 | 3 | firmware v6.x |
| c8 | 3 | Bluetooth module (BT v4.1 or BT v5.1 model) |
The firmware file name carries the same code, but only with the defaults of the image. Characters c2 - c5 are read from the probe at start-up, so after a mode change, or on a probe that still has the legacy bootloader, the name differs from the file name. That is not a fault: only the version and the date must match.
Before you use a feature that not every firmware has, read 0xDB and test its bit. Never compare the whole number with a fixed value: a newer firmware adds bits. Firmware without the capability read (built before August 2026, and every v5.x) does not answer 0xDB at all - treat silence as "no extra features".
The probe keeps two kinds of settings. Knowing which is which saves surprises after a power cycle, a factory reset or a firmware update.
| Session settings | Identity settings | |
| Settings | sleep, auto power-off time, optical sensitivity, power-on line speed and data format | KMK118 function, DLMS start framing, IEC change-over mode, switch position 3 line, KMK119 variant |
| Stored bytes | 0 - 4 | 5 - 9 |
| Changed by | 0xA2, 0xC3, 0xD0, line commands - in RAM, at once | 0xD1 - 0xD5 - stored at once, applied by a restart |
| After a power cycle | kept only after 0xE0 | kept |
| Factory reset (0xE1) | back to the factory values | kept |
| Firmware update over the air | kept | kept |
| Programming with a programmer | set to the programmed defaults | set to the defaults of the loaded image |
0xE0 stores the session settings as they are now; they become the power-on settings. 0xE1 restores and stores the factory values - sleep on, auto power-off 240 s, sensitivity 30 (49 on older units), 300 baud 7E1 - and works only in command mode. Neither touches the identity settings, so a factory reset never changes what kind of probe it is.
Every stored byte: Appendix A.3. The line settings are also re-applied from the stored values at every new connection (Chapter 5.2.2).
A firmware update keeps the probe's stored settings and its identity (Chapter 9). Update with abcZ on a Windows PC (section 10.2) or with ZRobo on an Android phone (section 10.3). A probe with firmware v6.x takes an update at any time and in every working mode; you do not need to switch it off and on - abcZ and ZRobo prepare the probe themselves. A probe with firmware v5.x takes an update only in the first 10 s after it is switched on, so abcZ and ZRobo ask you to switch it off and on (Chapter 14.2.1).

Figure 10.1 - Which file for which probe
For each firmware image your firmware package has two files for abcZ and ZRobo. Which one a probe takes depends on its bootloader; abcZ shows the bootloader on the Overview page (Chapter 12.2.1).
| File | For | How it loads |
| _OTA.bin | probes with the A/B bootloader | staged: the probe keeps running its firmware until the new one is complete and checked |
| _LEGACY.bin | probes with the legacy bootloader: every probe with firmware v5.x, and v6.x probes that were moved from v5.x over the air | legacy load: not protected against interruption (section 10.4.2) |

WARNING:
Never load an _OTA.bin into a probe with the legacy bootloader: the old bootloader writes the compressed file as it is, and the probe does not start again - only a programmer brings it back. abcZ and ZRobo check the bootloader before they send anything and refuse such a file. An older abcZ may not check: update with abcZ 4.2.0 (Chapter 12).
Your own software can read the bootloader from character c5 of the firmware name (Chapter 8.1).
Download the file for your model from its product page on probeformeters.com (Latest Firmware), or use the one we supply with your probes; abcZ and ZRobo refuse a file made for another model. Loading a firmware image does not change a stored working mode or variant (Chapter 4).
For a KMK139 use the KMK119 file with Ansi2 in its name: it carries the ANSI2 variant the KMK139 leaves the factory with (Chapter 4.2). A probe whose variant was never set with 0xD1 uses the variant of the loaded image, so the standard file would change the switch positions of a KMK139.
A probe with firmware v6.x refuses to start an update while its battery is below 3100 mV (0xA1). abcZ skips such a probe and tells you why; ZRobo reads the battery before it sends anything and warns you.
Open the probe in abcZ (Chapter 12.1) and choose the Firmware page - or, for several probes at once, tick them in the Devices list and press "Update firmware...". Then:
A probe with firmware v5.x is updated over the legacy path, with a _LEGACY.bin file; when abcZ needs the probe restarted, its row asks you to switch it off and on (Chapter 14.2.1).
![]() | ![]() |
| Figure 10.2 - Firmware: one image per model | Figure 10.3 - Choose a .bin: the _OTA.bin file for the model |
![]() | ![]() |
| Figure 10.4 - Every model has an image | Figure 10.5 - Review before anything is sent |

Figure 10.6 - Updated and verified
Video - updating a KMK119 with abcZ over Bluetooth:
Watch the video at probeformeters.com/download/abcz-firmware-update.mp4.
![]() | ![]() |
| Figure 10.7 - ZRobo, Firmware page | Figure 10.8 - The file is chosen and checked |
![]() | ![]() |
| Figure 10.9 - The file is being sent | Figure 10.10 - Done: the probe is back with the new firmware |
Video - updating a KMK119 with ZRobo over the Bluetooth serial port (SPP):
Watch the video at probeformeters.com/download/zrobo-firmware-update.mp4.
| Link | Update | Time for one probe (measured) |
| Bluetooth serial port (SPP) | staged (_OTA.bin) | about 10 - 20 s |
| BLE, BT v5.1 models | staged (_OTA.bin) | about 35 - 50 s |
| BLE, BT v4.1 models | staged (_OTA.bin) | about 160 s |
| Bluetooth serial port (SPP) | legacy (_LEGACY.bin) | about 60 s |
Connecting and the final check add some time. abcZ shows its own estimate in the review, before anything is sent (section 10.2).
During a staged update the probe shows no progress: its LEDs keep their normal meaning. When the transfer ends the probe restarts, and its red LED blinks fast while the new firmware is applied (2.3).
With the A/B bootloader the running firmware stays until the new one is complete and checked; a power loss during the switch-over is completed at the next power-up. An interrupted staged update can simply be started again.
A legacy load (_LEGACY.bin) is not protected: if it is interrupted, the row says "in the bootloader". The probe then has no firmware and waits in its bootloader - also after it is switched off and on; it does not answer and its red LED blinks. Do not start another update before the probe has been switched off and on: an update started without that can be written to the wrong place.
If the row then says "bootloader stuck", nothing was written: do steps 1 to 3 once more. If abcZ was closed after the interruption, the row is gone: read the probe's port with Select port (it gives no reply), open its row and the Firmware page, choose the same file and tick the box of step 2; only then switch the probe off and on and, without reading it again, go on with step 3. If the probe does not take the load, see Appendix B.2.2; if nothing helps, a programmer brings it back - contact us.
Firmware for a particular meter or protocol - for example another layout of the working modes - is available as a project-specific variant; contact us. Update such a probe only with the file we supply for it.
KMK119 and KMK139 have a 1200 mAh battery; KMK118 and KMK138 have a 600 mAh battery. Charge the probe with the cable that comes with it, from any USB charger or PC port with a USB Type-A socket. Depending on the hardware version the probe has a USB Type-C or a Micro-USB port. While the probe charges its charge LED is on; the LED goes off when the battery is full.
How long a charge lasts depends on the work. In our test with firmware v6.3 220926 a PC read an IEC meter through the probe every 10 seconds over Bluetooth (SPP, working mode IEC auto; the meter was simulated): a KMK119 worked about 39.5 hours on a full charge and a KMK118 about 18 hours (Figure 11.1). The KMK139 has the same board and battery as the KMK119, and the KMK138 the same as the KMK118.

Figure 11.1 - Battery test with firmware v6.3 220926: an IEC meter read every 10 seconds
The voltage stays almost level for most of the charge and then falls quickly. When the CHARGE LED (on KMK118 and KMK138 the LED with the battery symbol) turns red, finish the work and charge the probe - in our test it switched off soon after:
| In our test | KMK119 | KMK118 |
| Worked on a full charge | about 39.5 hours | about 18 hours |
| From 3200 mV to 3000 mV, where the CHARGE LED turns red | about 75 minutes | about 30 minutes |
| From 3000 mV until the probe switched off | about 25 minutes | about 10 minutes |
0xA1 reads the battery voltage in millivolts and 0xA9 as a percentage; both give the lowest voltage measured since power-on. The probe measures the voltage after its regulator, so a nearly empty battery can still read full: the useful range is 3000 - 3200 mV, and 0xA9 maps this range to 0 - 100 %. Below 3000 mV the CHARGE LED turns red, and it changes back once the battery reaches 3050 mV. Below 3100 mV a firmware update does not start (Chapter 10.1.2).
The probe switches itself off to save the battery. Without a connection it waits 240 s without activity (the factory value; set it with 0xC3). While a connection is open that countdown does not run; instead a probe that stays connected without any traffic switches itself off after about 11 minutes. Every byte in either direction - from your software or from the meter - starts both again. 255 turns both off. Both wait while a firmware update or a module setting is in progress.
Without a connection, a probe with sleep on goes into a low-power sleep after 60 s and a KMK119 or KMK139 switches its mode LEDs off. A freshly programmed probe has sleep off; a factory reset (0xE1) turns it on and 0xA2 turns it off (Appendix A.3). Sleep does not switch the probe off - auto power-off does.
abcZ is our Windows program for the probes. It finds them, shows what they report about themselves, changes their settings and updates their firmware - of one probe or of many at a time. Download it from the product page of your probe or directly: abcZ-4.2.0.zip. The archive holds one program file, abcZ.exe, that runs without installation. It needs a PC with 64-bit (x64) Windows 11 in a version Microsoft still supports, or with a Windows 10 Enterprise LTSC or IoT Enterprise edition that Microsoft still supports: abcZ is built on .NET 10, and these are the Windows versions .NET 10 supports.
This chapter shows abcZ in normal mode. Admin mode is for service use: changes made there can make the probe unreachable. Contact us before using it.
abcZ runs in one window. If you start it a second time, no second window opens: the open one comes to the front and says "A second abcZ was started and closed - this window is the one in use". To work with several probes, open them side by side in its Devices list.
Pair the probe with the PC first (Chapter 3.1). Then choose under SOURCE how abcZ looks for probes:
abcZ reads nothing until you ask (Figure 12.1). Find devices opens and reads every probe it recognises - by its Bluetooth address or its KMK name - and leaves every other port closed. Select port lists each paired probe's outgoing COM port with its name and Bluetooth address, without opening a port (Figure 12.2); pick one to read only that probe. Ports abcZ does not recognise are listed below them: read one only if you know what is on it.
Each column of the list is a value read from the probe; a dash means that the probe does not have the command (Figure 12.3). Double-click a row, or select it and press Open device, to open the probe's pages.
If a probe will not reconnect, Reset Bluetooth switches the PC's Bluetooth radio off and on. Every Bluetooth link of the PC - a mouse or keyboard too - drops for a few seconds; the pairings are kept and nothing is written to the probe.

Figure 12.1 - Devices at start: nothing is read yet

Figure 12.2 - Select port: each probe's outgoing COM port, by name and address

Figure 12.3 - A probe read over Select port
The Overview page shows what the probe reports about itself: the firmware name and date, the nine-character name code decoded character by character (Chapter 8.1), the link, the battery, how an update is protected, and the meter line - the speed and framing the optical line uses now and the one it starts with at power-on. Read again reads it all anew.

Figure 12.4 - Overview of a KMK119
The Settings page lists the probe's settings with the command behind each one. On the device is the value read from the probe; choose a New value and press Write and verify. What writing does tells what happens: 0xD1 - 0xD5 restart the probe, so abcZ waits, reopens the port and reads the value back before it reports success (Chapter 6.3.2); the other settings apply at once and last until the next restart unless you store them. Dimmed rows are commands this probe does not have; hover one to see why. The settings themselves are in Chapter 4, Chapter 5 and Chapter 9.
The Meter line box works in command mode only: choose the speed and framing and press Apply to line. Store as power-on default (0xE0) keeps the current settings for the next power-on. Hold the line in break (0x50) and Release (0x51) start and end a break on the optical line. Factory defaults (0xE1) and Turn off (0xC2) do what the commands do.

Figure 12.5 - Settings
The Module page shows the probe's Bluetooth module: its identity and the settings we set at the factory. Press Read all from the module: On the module then shows what the module reported, and Allowed values what it accepts. Where a value differs from our standard, abcZ fills in our standard as the New value, and Write to the module applies it. No other value can be changed in normal mode.
| Field | What it is | Our standard |
| HardwareType | The module type as the module itself reports it: BT43H on BT v4.1 models, BT53B on BT v5.1 models. | read-only |
| BD_ADDR | The Bluetooth address. | read-only |
| BuildVersion | The date code of the module's own firmware. | read-only |
| COD | Class of Device: how the probe presents itself to a PC or phone that scans. | 001f00 |
| DeviceName | The name shown when you pair or scan. | model and the last six characters of the address, for example "KMK119 736e5e" |
| DefaultAuth | The default authentication mode for a new pairing. | 4 |
| BLEModemMode | Bluetooth Low Energy as a serial link: 1 = on. | 1 |
| BatteryEnable | The BLE battery service. | false |
| CharacteristicMax | The largest BLE characteristic size. | 1 |
| ConnectIntMin / ConnectIntMax | The BLE connection interval the probe asks for, in steps of 1.25 ms (12 / 24 = 15 / 30 ms). The phone or PC decides (Chapter 6.5). | 12 / 24 |
| UartTimeout | How long the module waits before it passes on a partly filled packet. | 600 on BT v5.1 models; BT v4.1 models keep their own value |
The Caveat column adds a note to a field when one applies. The SERVICE PORT row reads the module over the optical port instead of the Bluetooth link, for service use (Chapter 12.4); you do not need it.

Figure 12.6 - Module, after Read all from the module
Diagnostics reads the probe's counters and its state. The counters only count up, so a number alone does not tell when something happened. To see what an action costs, press Read counters, then Use as baseline, do the action you suspect - for example a meter reading or a firmware update - and read again: the change column shows the difference. Forget baseline returns to plain readings. Below the counters every state value carries its own note on the screen. When you contact us about a problem, send us a screenshot of this page.

Figure 12.7 - Diagnostics, top of the page
The Firmware page updates the firmware of the open probe; for several probes at once, tick them in the Devices list and press "Update firmware...". The steps, with the screens and a video, are in Chapter 10.2; what to do when a probe waits in its bootloader is in Chapter 10.4.2.
The Log page lists every step abcZ took, probe by probe; Only what went wrong narrows the list and Copy everything copies it. abcZ also writes abcZ.log and abcZ.previous.log next to its program file: send both with a problem report.
The Bluetooth PIN written from the Module page appears in the log only by its length, for example "(hidden, 16 chars)".
The Service port page talks to the probe's Bluetooth module directly, through a USB optical probe placed face to face with the probe's optical port, without the probe's firmware in between. It is for service use - for example when BLE has been turned off on the module - and you do not need it in normal use; contact us before you use it.
ZRobo is our free Android app for reading meters through the probe. It also reads and changes the probe settings, shows its diagnostics, updates its firmware and shows its Bluetooth module. Get it from Google Play; ZRobo's own user guide is on its product page. This chapter covers what you need with a KMK probe. Android 9 or newer with Bluetooth is required.
![]() | ![]() |
| Figure 13.1 - Devices: paired probes and their links | Figure 13.2 - After Scan the KMK119 also offers BT BLE |
![]() | ![]() |
| Figure 13.3 - Connected over BT SPP | Figure 13.4 - Connected over BT BLE, with the MTU |
Put the optical head on the meter's optical port, with the probe in a mode that suits the meter (Chapter 4). Tap Read meter: the meter's lines appear under READOUT as they arrive, and the chip beside READOUT shows OK or Failed.
ZRobo reads IEC 62056-21 meters; for ANSI meters use your ANSI meter reading software. The last line under the "!" is the block check character of the readout, shown as received.
If the chip shows Failed and no line arrived, check that the optical head sits on the meter's optical port and that the probe mode suits the meter, then read again.

Figure 13.5 - A readout (SIM-METER is the simulated meter on our bench)
Video - connecting and reading a meter:
Watch the video at probeformeters.com/download/zrobo-reading-spp-command-mode.mp4.
This setting is on the Functional tab of Settings. When it is on, ZRobo sets the probe's line to 300 baud 7E1 before every reading, with the line commands of Chapter 5.2.1. The probe accepts them only in command mode (Chapter 4).

Figure 13.6 - Settings, Functional tab
On the Device tab of Settings, tap Read from the device. Each row then shows the value on the probe ("On the device"); rows this model does not have are greyed out. Change a row and tap Write and verify. Rows marked "This setting restarts the device when written" restart the probe (Chapter 6.3.2). The settings themselves are described in Chapter 4, Chapter 5 and Chapter 9.

Figure 13.7 - Settings, Device tab after Read from the device
Run diagnostics reads the probe's state and explains each value. When you contact us about a problem, send us a screenshot of this page.

Figure 13.8 - Diagnostics
The Firmware page updates the probe's firmware; the steps are in Chapter 10.3. The Module page shows the Bluetooth module's identity and the settings we set at the factory, next to our standard values, after Read from the module.

Figure 13.9 - Module after Read from the module
This chapter is for anyone who already uses probes with v5.x firmware. It lists what changed in each release, which commands are new, and what to watch when you move a probe to v6.x.
| Version | Change |
| v6.4 | Data integrity fix: if the start-up window (60 s after power-on) ended while the probe was holding 0xFE bytes, it sent them in front of every later byte towards the meter until it was switched off, and no longer answered commands. Affected v6.0 - v6.3 in every working mode. |
| v6.3 | Data integrity fix: when the data sent to the meter contained FE FE FE, the probe could pass extra 0xFE bytes to the meter, which breaks a DLMS/HDLC length field and checksum. Affected v6.0 - v6.2 in every working mode, and v5.x in its fixed-speed and command modes. |
| v6.2 | New 0x9E: tells exactly which firmware image is running. |
| v6.2 | The identity settings (Chapter 9) accept 0xFF: back to the default of the loaded firmware. |
| v6.2 | Storing settings (0xE0) during a live meter transfer no longer loses meter data. |
| v6.2 | New product: KMK179, the KMK119 board with a WiFi module; commands over TCP. |
| v6.2 | Factory auto power-off 240 s (v6.0 and v6.1: 180 s). |
| v6.1 / v6.2 | 0xDA grew to 32 fields; new fields are only added at the end. |
| v6.0 | Third generation: one firmware per product with the working mode chosen by command or switch; commands answered in every working mode, with refusal reasons (0xDC); new read-outs 0xA9, 0xDA and 0xDB; staged (A/B) firmware update on probes with the new bootloader; wireless module restart and factory reset (0xBD, 0xBC). |
The customer commands of this manual, compared with the v5.5 source code. Service counters are in Appendix B.1.2; commands used only by service tools are not listed. The "On v5.x" row of each card gives the details.
| Code | Command | In v5.x |
| 0xA0 | Read the firmware name | Yes |
| 0x9E | Read the image identity | No - new in v6.2 |
| 0xDA | Read all settings | No - new in v6.0 |
| 0xDB | Read the capabilities | No - new in v6.0 |
| 0xDC | Why was it refused? | No - new in v6.0 |
| 0x30 - 0x38 | Set the line speed | Yes |
| 0x40 - 0x44 | Set the data format | Yes (0x44 from v5.2) |
| 0x50 - 0x51 | Break on / off | Yes |
| 0xA1 | Read the battery voltage | Yes |
| 0xA9 | Read the battery charge | No - new in v6.0 |
| 0xA2 | Keep the probe awake | Yes |
| 0xC2 | Switch off | Yes |
| 0xC3 | Set the auto power-off time | Yes |
| 0xD0 | Set the optical sensitivity | Yes |
| 0xD5 | Select the working function | No - new in v6.0 |
| 0xD1 | Select the firmware variant | No - new in v6.0 |
| 0xD2 | Switch position 3 line settings | No - new in v6.0 |
| 0xD3 | IEC baud change-over mode | No - new in v6.0 |
| 0xD4 | DLMS start framing | No - new in v6.0 |
| 0xE0 | Store the settings | Yes |
| 0xE1 | Factory reset | Yes |
| 0xBD | Restart the wireless module | No - new in v6.0 |
| 0xBC | Factory-reset the wireless module | No - new in v6.0 |
| Topic | v5.x | v6.x |
| Variant (KMK119 family) | Each variant was a separate firmware. | One firmware; the variant is stored and changed with 0xD1. |
| Function (KMK118, KMK138) | Each function was a separate firmware. | One firmware; the function is stored and changed with 0xD5. |
| Switch position 3 line | Fixed by the firmware. | Five choices with 0xD2. |
| DLMS start framing | Fixed by the firmware. | A setting: 0xD4. |
| IEC change-over mode | Fixed by the firmware. | A setting: 0xD3. |
| Commands | Handled in command mode and in the fixed-speed modes, not in the automatic IEC and DLMS modes; firmware without a command mode handled only 0xA0 - 0xA2. No refusal reply. | Answered in every working mode; a refusal is 15 and 0xDC tells why. |
| Starting a firmware update | Only in a 10 s window after power-on. | At any time; no power cycle needed. |
| Interrupted update | Could leave the probe without working firmware. | With the A/B bootloader the running firmware stays until the new one is complete and checked; a power loss during the switch-over is completed at the next power-up. |
| Firmware name | Free text up to v5.3; from v5.4 nine characters with c5 - c7 always 000. | Every character has a meaning; c2 - c5 show the live state (Chapter 8.1). |
| Auto power-off | Factory 254 s; a connected probe never switched itself off. | Factory 240 s; a connected probe without traffic switches itself off after about 11 minutes. |
| Bluetooth version (BT v4.1 or BT v5.1 model) | Not visible from software. | 0xDA field 11 tells it: BT43H = BT v4.1, BT53B = BT v5.1. |
| Device name | Long names; in a BLE scan list every probe looked the same. | Short names "KMK118 xxxxxx" that stay unique in a BLE scan list. |
Also different: 0xE0 answers with two bytes (06 00); the line settings return to the stored values at every new connection (Chapter 5.2.2); loading a different firmware image does not change a stored variant or function (Chapter 4).
Firmware v5.x takes a new firmware only in a 10 s window right after power-on, while the Bluetooth connection itself needs 5 - 20 s to come up. The update tool has to catch that window; if it does not land, switch the probe off and on and try again. A programmer is the fallback. The steps are in Chapter 10.
A probe updated this way keeps its old (legacy) bootloader: character c5 of the name stays 0. Later updates still work at any time, but not as a staged (A/B) update - the A/B bootloader can only be installed with a programmer.
A v6.x firmware replaces the v5.x firmware of the same product and working mode one to one: a probe whose stored settings were never changed starts exactly as before, so nothing changes until someone sends a command. The stored session settings are kept by the update.
KMK139 probes shipped with v5.x firmware used ANSI speeds on switch positions 1 - 3 (4800, 9600 and 19200 baud 8N1). The ANSI2 variant of v6.x keeps this layout (Chapter 4.2): update a KMK139 with its ANSI2 file. With the standard file, positions 1 and 2 become IEC auto and DLMS auto.
Start with the probe itself: is it switched on, charged (Chapter 11) and in the working mode the meter needs (Chapter 4)? Then look up what you see below.
A refusal is 15 (NACK). Right after it, 0xDC tells which command was refused and why (Appendix A.1).
| What you see | After | What it means | What to do |
| 15 (without 00) | a line command (Chapter 5.2.1) or 0xE1 | The probe is not in command mode. | Put it in command mode (Chapter 4). |
| 06 00, then 15 00 a second later | 0xC3, 0xD0 | The value byte did not arrive within 1 s. | Send the frame and its value in one write (Chapter 6.2.1). |
| 15 00, then a value and 00 | 0xD1 - 0xD5 | No value was sent, so the command was a query. This is normal. | Read the value that follows. |
| 15 00 instead of the second 06 00 | 0xC3, 0xD0 | The byte after the frame was 0xFE, which always starts a new frame. | Do not start another frame before the value; 254 cannot be set (Chapter 6.2.3). |
| 15 00 | 0xD1 - 0xD5 | The value is outside the allowed range. | Use a value listed on the command card (Chapter 7). |
Check that the optical head sits flat on the meter's optical port and that the working mode and line suit the meter (Chapter 4, Chapter 5). Then adjust the optical sensitivity with 0xD0 - a higher value is more sensitive: raise it one step at a time for a meter with a weak optical output, such as a battery-powered meter; lower it one step at a time when bytes arrive doubled because of reflection. On a KMK119 keep it at 85 (0x55) or below. Try a reading after each step, and store the value that works with 0xE0.
If the end of a transfer does not reach the meter, your software may close the connection too early: see Chapter 6.4.
| What you see | What to do |
| Windows lists the probe twice when you pair it. | One entry is the Bluetooth serial port, the other BLE. Pair the serial port entry and use its Outgoing COM port (Chapter 3.1). |
| The COM port does not open the first time. | Open it again - the first open of a Bluetooth COM port on Windows can time out (Chapter 6.5). |
| A line setting is gone after reconnecting. | At every new connection the probe applies the stored line settings; store yours with 0xE0 (Chapter 5.2.2). |
| ZRobo shows "The probe refused it: not in command mode right now". | ZRobo's Bluetooth REDZ command mode is on while the probe is in an automatic mode; turn the setting off (Chapter 13.2.2). |
| A reply appears inside the meter data. | A command was sent during a meter transfer; send commands between readings (Chapter 6.4). |
| The battery reads full, but the probe soon switches off. | The reading is taken after the regulator; charge the probe (Chapter 11.2). |
| The probe switched itself off while connected. | A connected probe without any traffic switches off after about 11 minutes (Chapter 11.3). |
| abcZ skips a probe in a firmware update. | Its battery is below 3100 mV: charge it and start again (Chapter 10.1.2). |
| After an interrupted update the probe does not answer and its red LED blinks. | It waits in its bootloader, also after a power cycle: switch it off and on, then load it again as a forced load without reading it in between (Chapter 10.4.2). |
| A KMK139 reads differently after an update. | It runs the standard variant: switch positions 1 and 2 are IEC auto and DLMS auto. Load its ANSI2 file (Chapter 10.1.1) or send 0xD1 with 6 (Chapter 4.2, Chapter 14.2.2). |
| The name from 0xA0 differs from the firmware file name. | Characters c2 - c5 show the live state; only the version and the date must match (Chapter 8.1). |
After a refusal (15), 0xDC returns the command code and one of these reason codes. Some reasons come from service commands (firmware update, module configuration).
| Reason | Meaning |
| 1 | The probe has the legacy bootloader, so a staged update is not possible. |
| 2 | A module configuration window is open. |
| 3 | The meter is sending. The command needs 200 ms of silence on the optical line. |
| 4 | The battery is below 3100 mV. |
| 5 | No update session is open. |
| 6 | Update trigger without arming, outside the power-on window. |
| 7 | The parameter byte did not arrive within 1 s. |
| 8 | 0xFE was sent as a parameter. 0xFE always starts a new frame. |
| 9 | The parameter value is out of range. |
| 10 | The command works only in command mode. |
| 11 | A module setting was refused (queue full, mixed queue, unknown setting or value not allowed). |
| 12 | The update image was refused (wrong product or size). |
| 13 | Update packets out of sequence, or the image check failed. |
| 14 | The update cannot be resumed from that position. |
| 15 | An update session is already open. |
| Byte | Name | Meaning |
06 | ACK | Command accepted |
15 | NACK | Command refused - ask 0xDC why |
00 | end | End of a text reply |
11 | XON | Firmware update packet accepted |
Bytes 0 - 4 are session settings: they change in RAM and survive a power cycle only after 0xE0. Bytes 5 - 9 are written at once by their own command and are kept by a factory reset (Chapter 9).
| Byte | Setting | Range | Factory value | Set with | Kept by |
| 0 | Sleep enabled | 0 or 1 | 0 (disabled) on a freshly programmed unit; 0xE1 sets 1 (enabled) | 0xA2 disables it | 0xE0 |
| 1 | Auto power-off seconds | 0-254 seconds, 255 = disabled | 240 s | 0xC3 | 0xE0 |
| 2 | Optical sensitivity | 0-255 | 30 (new sensor) / 49 (old sensor) | 0xD0 | 0xE0 |
| 3 | Power-on baud code | 0x30-0x38 | 0x30 (300 baud) | 0x30-0x38 in command mode | 0xE0 |
| 4 | Power-on framing code | 0x40-0x44 | 0x40 (7E1) | 0x40-0x44 in command mode | 0xE0 |
| 5 | KMK118 device function | 0-3, 0xFF = use the image default | 0xFF (unwritten) | 0xD5 | written immediately |
| 6 | DLMS start framing | 0 = 7E1, 1 = 8N1, 0xFF = default | 0xFF (unwritten, means 7E1) | 0xD4 | written immediately |
| 7 | IEC baud change-over mode | 0 = mode C, 1 = mode E, 0xFF = default | 0xFF (unwritten, means mode C) | 0xD3 | written immediately |
| 8 | KMK119 switch position 3 config | 0-4, 0xFF = default | 0xFF (unwritten, means 9600 8N1) | 0xD2 | written immediately |
| 9 | KMK119 device variant | 0-6, 0xFF = use the image default | 0xFF (unwritten) | 0xD1 | written immediately |
For service and production. Your own software does not need these.
Continues the field list of 0xDA.
| Field | Meaning | Typical |
| 12 | Frame parser position (normally 12) | 12 |
| 13 | Meter-side transmit buffer fill, bytes | 0 |
| 14 | Auto power-off hold bit mask: 1 update session, 2 armed trigger, 4 module configuration | 0 |
| 15 | Last auto power-off restart source: 1 update session, 2 armed trigger, 3 module configuration, 4 link activity; 0 never | 4 |
| 16 | Update session idle timeout, s | 45 |
| 17 | Firmware update trigger arm window, s | 30 |
| 18 | Module guard status: 0 settings found correct at the end of the round (field 27 contains 4 if a repair was written first and a full re-read then confirmed it) or no round yet this power cycle, 1 restored and verified, 2 stopped after three failures, 3 no confirmed result - field 20 tells why | 0 |
| 19 | Module guard attempt counter (kept over power cycles; 3 = stop) | 0 |
| 20 | Module guard stop reason, meaningful when field 18 is 2 or 3: 0 none, 1 read came back empty or no fix could be worked out, 2 verify read empty, 3 cancelled by a link, 4 verify blocked by a link, 5 attempt brake, 6 settings still wrong after the repair (counted in field 19), 7 read came back with fields missing | 0 |
| 21 | Last module guard phase opened (can read 0 after a completed round - use field 27) | 0 |
| 22 | Module guard policy: 0 disabled, 1 run once (default), 255 every power-up | 1 |
| 23 | Module guard completed flag (kept over power cycles) | 1 |
| 24 | Last matched module event (KMK179 only; 0 on Bluetooth) | 0 |
| 25 | Module guard phase now: 0 none, 1 read, 2 write, 3 verify (round running), 4 round closed | 0 |
| 26 | WiFi module recovery reset counter (KMK179 only; 0 on Bluetooth) | 0 |
| 27 | Bit mask of every module guard phase opened this power cycle | 0 |
| 28 | Module status lines found nested at the module-UART input (saturates at 255) | 0 |
| 29 | Module status lines seen in total (saturates) | 0 |
| 30 | Last self-recovery reason: 0 none, 1 join failed or BSS lost, 2 fast latch recovery, 3 silence recovery | 0 |
| 31 | Sticky bit mask of the gates the latch-recovery trigger saw | 0 |
| 32 | Peak silence on the module UART, s (saturates at 255) | 0 |
Plain queries with no parameter; they work in every mode and are cleared by a restart. Read 0x9D first: every counter is counted since power-up.
| Code | Measures | Healthy value |
0x9D | Seconds since power-up (stops at 65535) | Read it first |
0x9C | Meter bytes handed to the wireless module since power-up | Compare with what your software received |
0xA3 | Peak fill of the meter-side (UART1) TX ring buffer, in bytes | Below the buffer size; used for RAM sizing |
0xA4 | Bytes dropped because the UART1 TX ring was full | Must stay 0 |
0xA5 | Cause of the last reset (0 = software / 7 = watchdog / 12 = power-on) | 12 after a power cycle, 0 after a settings write |
0xA6 | UART1 (meter) hardware receive overrun (OERR) counter | Must stay 0 |
0xA7 | Worst-case main-loop iteration time in milliseconds | A few ms; blocking waits are excluded |
0xA8 | Bytes dropped from the UART1 (meter) receive ring | Must stay 0 |
0xAA | Peak fill of the UART1 (meter) receive ring | Well below buffer size |
0xAB | How many times back-pressure was applied towards the phone/PC | May be non-zero on long uploads; not an error |
0xAC | UART2 (Bluetooth) transmit buffer "full" counter | Must stay 0; if not, the TX buffer is too small |
0xAD | Bytes dropped from the Bluetooth receive ring - this is where phone-to-meter data loss is counted | Must stay 0 up to the guaranteed burst size |
0xAE | Peak fill of the Bluetooth receive ring | Below buffer size |
0xAF | UART2 (Bluetooth) hardware receive overrun counter | Must stay 0 |
0x9F | Peak fill of the UART2 (Bluetooth) TRANSMIT buffer - the companion of 0xAC: 0xAC says WHETHER it ever filled up, 0x9F says HOW FULL it got. Sampled from the main loop, so the value is a LOWER BOUND; a peak that occurs and drains between two loop turns is not seen. The completely-full end (buffer size) may read back as 0 - that end is what 0xAC counts | Well below the buffer size; judge it together with 0xAC |
Continues Appendix A.3. Written by the probe itself; do not write them. Bytes from 14 on hold internal copies (module type, and on the KMK179 a pending module reset and the module address).
| Byte | Meaning | Programmed value | 0xDA |
| 10 | Out-of-production trace: 1 = the wireless module was factory-reset (0xBC) and not reconfigured since; 0xFF = clear | 0xFF | field 10 |
| 11 | Module guard attempt counter (3 = stop) | 0 | field 19 |
| 12 | Module guard policy: 0 disabled, 1 run once, 0xFF every power-up | 1 | field 22 |
| 13 | Module guard completed flag: 0xA5 = completed | 0xFF | field 23 |
A v6.x probe with the legacy bootloader (name character c5 = 0) accepts a legacy firmware load at any time, without a power cycle, so the service tools can load a v5.x file directly. The stored settings in bytes 0 - 4 are kept; v5.x does not use bytes 5 and higher, and they are still there when v6.x is loaded again. Measured on a KMK118. For a probe with the A/B bootloader (c5 = 1), contact us before loading v5.x.
| State | How it got there | What it does | What to do |
| Timed out | an update trigger with no image after it | returns to the normal firmware after 10 s | nothing - reconnect |
| Waiting | at power-up, or after an unfinished load | waits and accepts an image | start the load again |
| Latched | an update trigger that was not followed at once by the image | answers every byte with 13 11 (XOFF XON) and accepts nothing | switch off and on, and start the load again at once - it usually clears |
To tell them apart, send the 0xA0 frame: an answer means the normal firmware runs. If there is none, send about 150 bytes of 00: no answer = waiting, pairs of 13 11 = latched. A legacy load must run from the trigger to the last packet in one go: do not close the port or send anything else in between.
| Topic | v5.x | v6.x |
| Watchdog reset | off | on (about 2 s); 0xA5 tells the cause of the last reset |
| Module status lines | could leak into the meter data | absorbed by the probe |
| Burst from your software to the meter | not guaranteed | buffered with back-pressure; about 2.4 kB (BT v4.1 models) and 2.5 kB or more (BT v5.1 models) measured without loss |
| Module setting values | not available - module settings needed a service probe | checked against the values the module accepts (0xDB bit 4096) |
| Diagnostic counters | none | Appendix B.1.2 |
| 0xDA field 10 | - | cleared only by a real module write (v6.2; v6.0 - v6.1: also by a module guard round) |
| Module guard | - | runs once after a module factory event, not at every power-up (v6.1) |

