Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Gurux DLMS MeterStudio
  3. Gurux DLMS MeterStudio
  4. Build
  5. Linux / Makefile
By Gurux Documentation , 1 December, 2026

Gurux DLMS MeterStudio

Linux / Makefile

Select Linux / Makefile (linux-make) to generate a native Linux meter server. Build from the extracted directory containing Makefile. The output is bin/meter; there is no MCU programming step.

1. Install local tools

Install GNU Make, GCC and the C development libraries. On Debian or Ubuntu:

sudo apt-get update
sudo apt-get install -y build-essential

Configurations whose generated Makefile links OpenSSL (-lcrypto) also need its development package, such as libssl-dev on Debian/Ubuntu. The normal generated link already includes pthread and the math library.

2. Build locally

make

The result is bin/meter, with intermediate object files under obj. To select another compatible C compiler, pass it on the Make command line, for example make CC=clang when Clang is installed. make clean removes the generated build's obj and bin outputs before a rebuild.

3. Docker fallback

For a reproducible Debian build environment, save this as Dockerfile.linux in the extracted project directory:

FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential libssl-dev ca-certificates \
    && rm -rf /var/lib/apt/lists/*
WORKDIR /project
ENTRYPOINT ["make"]

Build the image once:

docker build -f Dockerfile.linux -t meterstudio-linux:local .

From the project directory on Linux:

docker run --rm \
  --mount "type=bind,source=$(pwd),target=/project" \
  meterstudio-linux:local

From Windows PowerShell with Docker Desktop using Linux containers:

docker run --rm `
  --mount "type=bind,source=$($PWD.Path),target=/project" `
  meterstudio-linux:local

The mounted directory retains bin/meter. Run it in a compatible Linux environment. Build with the native host tools when the deployment system requires another architecture or C-library version.

4. Start and test

Provision the credentials required by the generated README. Minimum's Low association uses client SAP 32 and requires GX_PASSWORD_32 when its password was omitted from export. Then run:

./bin/meter

For a simple desktop connection, select WRAPPER during generation. The server listens on 127.0.0.1 and the configured port (4059 by default). Run the client in an environment that can reach that loopback address, using the configured referencing mode, server address 1 and association client SAP. Use Ctrl+C to stop the process.

If HDLC or Mode E is selected, configure the actual Linux serial device and grant the process access to it. Keep writable persistent state in the project working directory when restarting or updating. The Docker commands above perform compilation; a container's loopback listener requires a separately chosen networking arrangement for client access.

Return to Build.

  • Log in or register to post comments
  • Create new account
  • Reset your password

Book navigation

  • Standard
  • Target
  • Referencing
  • Transport
  • Associations
  • Passwords
  • Security
  • Objects
  • Validation
  • ZIP
  • Build
    • ESP32-S3
    • STM32L433RC
    • EFR32MG13P
    • nRF9160
    • LPCXpresso54608
    • MKM35Z512VLL7
    • R5F10NMLDFB
    • Windows / Visual Studio
    • Linux / Makefile

Hire Us!

Latest Releases

  • Mon, 11/30/2026 - 14:21
    gurux.dlms.c 9.0.2611.3001
  • Thu, 11/26/2026 - 15:24
    gurux.dlms.c 9.0.2611.2601
  • Thu, 11/19/2026 - 10:57
    Gurux.DLMS.Python 1.0.204
  • Thu, 11/19/2026 - 10:12
    gurux.dlms.c 9.0.2611.1901
  • Tue, 10/13/2026 - 12:00
    gurux.dlms.java 4.0.97

New forum topics

  • Landis E650 meter reading over DLMS
  • class_id = 40, version = 2, pushsetup Unparsed data frame
  • GXObisValueItem entries without MaskSize appear to be interpreted as bit flags
  • CheckedListBox incorrectly selects GXObisValueItem Value=0 for non-zero values
  • UIValueType=TextBox is rendered as CheckedListBox when Values are defined
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin