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. File Correction

File correction

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.

Profile picture for user mahsen
By mahsen , 1 June, 2020
Forums
Gurux.DLMS

Hi

In the "apdu.c" file, the "apdu_parseUserInformation" function has a problem,
In the case, lines 538 to 567 must be replaced with the following code,

//---------------------------------------------------------------------
// Optional usage field of the proposed quality of service component
if ((ret = bb_getUInt8(data, &tag)) != 0)
{
return ret;
}
// Skip if used.
if (tag != 0)
{
if ((ret = bb_getUInt8(data, &settings->qualityOfService)) != 0)
{
return ret;
}
}

// Optional usage field of the negotiated quality of service
// component
if ((ret = bb_getUInt8(data, &tag)) != 0)
{
return ret;
}
// Skip if used.
if (tag != 0)
{
if ((ret = bb_getUInt8(data, &len)) != 0)
{
return ret;
}
data->position = (data->position + len);
}
//---------------------------------------------------------------------

Thank you,
Mahsen

Profile picture for user Kurumi

Kurumi

6 years 2 months ago

Hi Mahsen,

Hi Mahsen,

There is no length in QualityOfService because it's a byte. Can you tell me why you want to change this?
Your changes will work when QualityOfService is not used, but otherwise, it fails.

BR,
Mikko

Profile picture for user mahsen

mahsen

6 years 1 month ago

This code was originally like

Hi

This code was originally like this, then corrected in the previous message,
---------------------------------------------------------------------------
// Optional usage field of the negotiated quality of service
// component
if ((ret = bb_getUInt8(data, &tag)) != 0)
{
return ret;
}
// Skip if used.
if (tag != 0)
{
if ((ret = bb_getUInt8(data, &len)) != 0)
{
return ret;
}
data->position = (data->position + len);
}
// Optional usage field of the proposed quality of service component
if ((ret = bb_getUInt8(data, &tag)) != 0)
{
return ret;
}
// Skip if used.
if (tag != 0)
{
if ((ret = bb_getUInt8(data, &settings->qualityOfService)) != 0)
{
return ret;
}
}
---------------------------------------------------------------------------
For example, in the analysis of the following line, an error was created,
because "QualityOfService" is a byte,
---------------------------------------------------------------------------
00 01 00 01 00 01 00 39 60 37 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 11 04 0F 01 00 01 01 00 06 5F 1F 04 00 60 BE DD 04 00
---------------------------------------------------------------------------

Mahsen

Profile picture for user Kurumi

Kurumi

6 years 1 month ago

Hi Mahsen,

Hi Mahsen,

You are right. You need to remove this line:
data->position = (data->position + len);

Tests are started and we are releasing a new version where this is fixed tomorrow.

BR,

Mikko

Profile picture for user mahsen

mahsen

6 years 1 month ago

Hi I'm glad I helped؈ Mahsen

Hi

I'm glad I helped

Mahsen

Profile picture for user mahsen

mahsen

6 years 1 month ago

Hi

Hi

Why GXDLMSDirector wrapper remove "gateway bytes" when using "gateway" and "encryption" together in the request?

Mahsen

Profile picture for user Kurumi

Kurumi

6 years 1 month ago

Hi,

Hi,

Gateway bytes are added to Gateway.NetworkId and Gateway.PhysicalDeviceAddress.
The reason is to try to make it easier to use.

BR,
Mikko

Profile picture for user mahsen

mahsen

6 years 1 month ago

Hi,

Hi,

I have no problem to used gateway when security select "none",
but Gateway bytes are not added to Gateway.NetworkId and Gateway.PhysicalDeviceAddress when i am select "AuthenticationEncryption",

Mahsen

Profile picture for user Kurumi

Kurumi

6 years ago

Hi Mahsen,

Hi Mahsen,

Are you using a real gateway or our server simulator? I need to check are NetworkId and PhysicalDeviceAddress encrypted.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Mon, 07/27/2026 - 12:37
    gurux.dlms.cpp 9.0.2607.2701
  • Thu, 07/23/2026 - 16:19
    gurux.dlms.java 4.0.96
  • Thu, 07/09/2026 - 14:34
    Gurux.DLMS.Python 1.0.201
  • Fri, 06/26/2026 - 16:32
    Gurux.Service 3.0.2606.2601
  • Wed, 06/24/2026 - 08:36
    Gurux.DLMS.Python 1.0.200

New forum topics

  • Version mismatch between Gurux.DLMS 9.x and Gurux.Common/Gurux.Serial 8.x
  • Service not known error on gprs communication
  • Help Needed: Interfacing Saral 100 Energy Meter with Microcontroller via RS232
  • Connecting Meter to Agent via serial
  • Reading block profile with Compact array
More

Who's new

  • Tyronesok
  • Dawley07
  • nostra
  • cuiVEAwINCoyynjjn
  • qlMlMNfbqjNumKgGFIo
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin