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. Forums
  3. Calculate FCS

Calculate FCS

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By dlmsmaniac , 16 February, 2016
Forums
Gurux DLMS for Java

Hi Kurumi!

Could you explain me how implement the FCS in Java? I do not understand this field and I have tried it with online calculators for CRC16 but I do not got the correct FCS.
I have seen your GXFCS16.java but I do not understand this code. I would like use it in my own program. Could you help me?

Thanks!

Profile picture for user Kurumi

Kurumi

10 years 3 months ago

Calculate FCS

Hi,

You can create static fcs16 table or count values to that table in run time.
We are using static table because it's faster to create.

Then you loop data and count frame check sequence for data.
In last we are changing byte order from Big Endian (Motorola byte order) to Little Endian (Intel byte order).

I hope this helps.

BR,

Mikko

dlmsmaniac

10 years 3 months ago

Hi!

Hi!

In the GXFCS16.java code, what are the input parameters buff, offset and count?
I would like use this class to implement it in my own program, and thus, I could calculate my fcs calling the method of your class from my class. Could I do it?

Thanks!

Profile picture for user Kurumi

Kurumi

10 years 3 months ago

Calculate FCS

Hi,

buffer is data where FCS is counted. offset is index. That can be used if you want to skip few bytes from the begin. Count is amount of bytes to count.

This code is licensed under the GNU General Public License v2.
Full text may be retrieved at http://www.gnu.org/licenses/gpl-2.0.txt

BR,

Mikko

dlmsmaniac

10 years 3 months ago

I have already understood it.

I have already understood it. Thank you very much!

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin