sml-kit

Status

What sml-kit supports, what real meters have confirmed, and its limits.

On this page
  1. Supported
  2. Confirmed by real meters
  3. Limits
  4. How it is checked

Supported๐Ÿ”—

AreaSupport
TransportVersion 1: start and end sequences, escaping, padding, frame CRC; noise before a frame is skipped
EncodingEvery SML type: octet strings, booleans, integers and unsigned values of 1โ€“8 bytes, lists, multi-byte TL
MessagesSML_Message with message CRC and end-of-message check
BodiesOpen, Close, GetList, Get/SetProcParameter, GetProfileList and GetProfilePack (requests and responses), Attention: typed, read and written. COSEM bodies are kept as raw bytes
ValuesOBIS names and parsing, the full DLMS unit table, scaler, SML_Time, server IDs, energy direction from the status word
DeviationsHolley KERMIT CRC, time without choice, DZG DVS74 power sign: named options, off by default (Meter quirks)
I/OBlocking io::FrameReader (std); async in any runtime over the same Decoder
WritingWriter, Message::write, SmlFile, encode_frame, sim::Telegram, ListEntry::{number, unsigned}

Confirmed by real meters๐Ÿ”—

Every CRC-valid frame of the public libsml-testing collection reads: 216 frames from 8 manufacturers. They confirm two details the specification leaves open to interpretation:

  • CRC byte order: both CRCs are CRC-16/X-25, sent low byte first.
  • Aligned escapes: escape sequences start on 4-byte boundaries after the start sequence.

CI fetches the collection at a pinned commit (it has no licence, so it is never committed); captures that may be redistributed are in tests/corpus/.

The bodies a client sends (parameters, profiles) are tested with vectors after FNN Lastenheft EDL and TR-03109-1, not with captures: none are public. If you have one, please open an issue.

Limits๐Ÿ”—

  • Signatures are not verified. valueSignature, listSignature, globalSignature and profile signatures are exposed as bytes; nothing in the API calls a reading authenticated.
  • Transport version 2 is not supported. FNN Lastenheft EDL requires version 1, and no known device sends version 2. A version-2 start sequence is skipped as noise.
  • IEC 62056-21 (D0) text is not SML. Some older meters send it; the decode example recognises it.

How it is checked๐Ÿ”—

  • Truncation at every byte of every body, random corruption, and a write-then-read test over every real frame.
  • Fuzz targets for the transport, the message layer and OBIS parsing.
  • The no_std release build is scanned for panic symbols, and the library for float types.

Edit this page on GitHub