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

5 years 11 months ago

Hi I'm glad I helpedو Mahsen

Hi

I'm glad I helped

Mahsen

Profile picture for user mahsen

mahsen

5 years 11 months 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

5 years 11 months 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

5 years 11 months 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

5 years 11 months 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

  • 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