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. Object PRIME PLC MAC Functional Parameters Giving Hardware Error When Reading

Object PRIME PLC MAC functional parameters giving hardware error when reading

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 lara.wakim , 7 October, 2020
Forums
General discussion

lara.wakim

5 years 8 months ago

Hi,

Hi,

We create the primeNbOfdmPlcMacFunctionalParameters object and initialize the object in the addPrimeNbOfdmPlcMacFunctionalParameters() function.

Knowing that the sna attribute is a gxbytebuffer it is defined like this:

//Define MAC SNA.
static unsigned char MAC_SNA[6] = { 0x10, 0x31, 0x46, 0x03, 0x39, 0x01 };
BB_ATTACH(primeNbOfdmPlcMacFunctionalParameters.sna, MAC_SNA, 6);

When trying to read this object, it gave a hardware fault (check the picture).

Do you have any idea about what happening? Is it a problem for the client or/and server side?

Best Regards,

Lara Wakim

lara.wakim

5 years 8 months ago

Hi,

Hi,

We create the primeNbOfdmPlcMacFunctionalParameters object and initialize the object in the addPrimeNbOfdmPlcMacFunctionalParameters() function.

Knowing that the sna attribute is a gxbytebuffer, it is defined like this:

//Define MAC SNA.
static unsigned char MAC_SNA[6] = { 0x10, 0x31, 0x46, 0x03, 0x39, 0x01 };
BB_ATTACH(primeNbOfdmPlcMacFunctionalParameters.sna, MAC_SNA, 6);

When trying to read this object, it gave a hardware fault (check the picture).

Do you have any idea about what happening? Is it a problem for the client or/and server side?

Best Regards,

Lara Wakim

Image

lara.wakim

5 years 8 months ago

Excuse me for the repetition

Excuse me for the repetition of the message, we had a technical problem.

Profile picture for user Kurumi

Kurumi

5 years 8 months ago

Hi Lara,

Hi Lara,

I'll checked this. There is an error in gxget.c. Find cosem_getPrimeNbOfdmPlcMacFunctionalParameters and change this line:
ret = cosem_getOctectString2(e->value.byteArr, object->sna.data, (uint16_t)object->sna.size, &size);

to:

ret = cosem_setOctectString2(e->value.byteArr, object->sna.data, (uint16_t)object->sna.size, &size);

I'm sorry, but tests are in progress and we can't release a new version yet.

BR,
Mikko

lara.wakim

5 years 8 months ago

Hi Mikko,

Hi Mikko,

We replaced the function and it worked. We were able to read the object.

We faced some problem also with the object primeNbOfdmPlcMacNetworkAdministrationData.

In fact, the switchTable is a gxArray of uint16 (/*Switch table.*/gxArray switchTable;//uint16_t[]).
We tried to fill it like this:

static uint16_t SWITCH_TABLE[3] = { 0 };
ARR_ATTACH(primeNbOfdmPlcMacNetworkAdministrationData.switchTable, SWITCH_TABLE, 2);
SWITCH_TABLE[0] = 0x7FFF;
SWITCH_TABLE[1] = -32767;

When trying to read this object, it gave specified cast not valid (check the picture).

Can you check the reason of this issue and tell us how to solve it?

Best Regards,

Lara Wakim

Image
Profile picture for user Kurumi

Kurumi

5 years 8 months ago

Hi Lara, Mikko

Hi Lara,

Can you open gxget.c and find cosem_getSwitchTable method? Then change this:
cosem_setUInt16(data, *it)
to:
cosem_setInt16(data, *it)

This is fixed to the next release.

BR,

Mikko

lara.wakim

5 years 8 months ago

Hi Mikko,

Hi Mikko,

Thank you the problem is solved concerning the switch table.

There is still one issue concerning the object primeNbOfdmPlcMacNetworkAdministrationData more specifically the physical communication.

In fact, we tried to fill some attribute of the gxMacPhyCommunication structure like this:

static gxMacPhyCommunication PHY_COMMUNICATION[2] = { 0 };
static unsigned char EUI[6] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 };
ARR_ATTACH(primeNbOfdmPlcMacNetworkAdministrationData.communications, PHY_COMMUNICATION, 1);
PHY_COMMUNICATION[0].txPower = 127;
PHY_COMMUNICATION[0].txCoding = -128;
memcpy(PHY_COMMUNICATION[0].eui, EUI, 6);

When trying to read the object, the showed value in the client side are incorrect and don't correspond to the chosen one (check the picture).

Can you check the reason of this issue and tell us how to solve it?

We always want to add that we need the reset method for primeNbOfdmPlcMacNetworkAdministrationData object. We noticed that the reset method is implemented on the server side. However, it is not implemented on the client side (there is no reset button to click).

Best Regards,

Lara Wakim

Image
Profile picture for user Kurumi

Kurumi

5 years 8 months ago

Hi Lara,

Hi Lara,

A new version is finally released. Get it and this should be also fixed.¨

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