Hi Kurumi,
We are trying to understand what data is stored about the objects which we create using example
https://github.com/Gurux/GuruxDLMS.c/blob/master/Arduino_IDE/server/ser…
Tried reading first 1024 bytes from EEPROM on power-on and getting the below info.
EEPROM Dump from 0 to 1023:<LF>
0000: 02 AA 05 00 00 05 00 14 00 47 75 72 75 78 00 00 | .........Gurux..<CR><LF>
0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 14 | ................<CR><LF>
0020: 00 47 75 72 75 78 00 00 00 00 00 00 00 00 00 00 | .Gurux..........<CR><LF>
0030: 00 00 00 00 00 01 01 00 00 00 00 00 00 00 02 10 | ................<CR><LF>
0040: F4 02 05 08 01 01 00 78 B8 00 00 02 00 02 00 00 | .......x........<CR><LF>
0050: 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................<CR><LF>
0060: 00 00 00 02 01 00 00 00 08 02 05 00 00 00 00 00 | ................<CR><LF>
0070: 00 2B 00 02 FF 00 00 00 00 00 00 08 00 08 00 00 | .+..............<CR><LF>
0080: 00 00 00 00 00 00 00 08 00 08 00 00 00 00 00 00 | ................<CR><LF>
0090: 00 00 00 00 00 08 00 08 00 00 00 00 00 00 00 00 | ................<CR><LF>
00A0: 00 08 00 08 00 00 00 00 00 00 00 00 00 09 11 00 | ................<CR><LF>
00B0: 11 00 47 52 58 30 30 30 30 30 30 30 30 30 30 33 | ..GRX00000000003<CR><LF>
00C0: 30 33 00 03 01 12 00 00 12 00 00 12 01 00 07 B2 | 03..............<CR><LF>
00D0: 01 01 04 00 00 00 00 00 00 00 00 00 00 FF FF 03 | ................<CR><LF>
00E0: FE FF 02 00 00 FF 80 00 00 FF FF 0A FE FF 03 00 | ................<CR><LF>
00F0: 00 FF 80 00 00 3C 00 02 03 1E 02 00 06 00 01 00 | .....<..........<CR><LF>
0100: 00 00 2A 00 00 FF 02 00 00 28 00 00 00 19 09 00 | ..*......(......<CR><LF>
0110: FF 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................<CR><LF>
0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................<CR><LF>
0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................<CR><LF>
0140: 05 00 00 14 00 00 00 00 00 00 00 00 00 00 00 00 | ................<CR><LF>
0150: 00 00 00 00 00 00 00 00 00 00 02 00 0A 00 FF FF | ................<CR><LF>
0160: FF FF FF FF FF 00 FF 80 00 00 FF FF FF FF FF FF | ................<CR><LF>
0170: FF 0A FF 80 00 00 FF FF FF FF FF FF FF 1E FF 80 | ................<CR><LF>
0180: 00 00 FF FF FF FF FF FF FF 28 FF 80 00 00 07 B2 | .........(......<CR><LF>
0190: 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 | ................<CR><LF>
01A0: 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 | ................<CR><LF>
01B0: 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 | ................<CR><LF>
01C0: 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 | ................<CR><LF>
01D0: 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 | ................<CR><LF>
01E0: 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 | ................<CR><LF>
01F0: 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 | ................<CR><LF>
0200: 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 | ................<CR><LF>
0210: 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 | ................<CR><LF>
0220: 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 | ................<CR><LF>
0230: 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 | ................<CR><LF>
0240: 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 00 00 | ................<CR><LF>
0250: 00 00 00 01 00 01 00 01 00 00 00 00 00 02 00 02 | ................<CR><LF>
0260: 00 01 00 01 00 01 00 02 46 00 00 00 60 03 0A FF | ........F...`...<CR><LF>
0270: 01 0F 00 02 00 01 00 01 00 02 46 00 00 00 60 03 | ..........F...`.<CR><LF>
0280: 0A FF 02 0F 00 01 00 01 00 01 00 00 00 00 00 01 | ................<CR><LF>
0290: 00 01 00 01 00 00 00 00 00 02 00 02 00 08 00 00 | ................<CR><LF>
02A0: 00 01 00 00 FF 02 00 00 03 00 01 01 15 19 00 FF | ................<CR><LF>
02B0: 02 00 00 3C 00 00 00 01 00 00 01 00 00 FF 41 00 | ...<..........A.<CR><LF>
02C0: 00 00 96 00 00 00 02 00 02 00 08 00 00 00 01 00 | ................<CR><LF>
02D0: 00 FF 02 00 00 01 00 00 00 60 0B 00 FF 02 00 00 | .........`......<CR><LF>
02E0: 00 00 00 00 01 00 00 01 00 00 FF 00 00 00 00 96 | ................<CR><LF>
02F0: 00 00 00 02 00 02 00 08 00 00 00 01 00 00 FF 02 | ................<CR><LF>
0300: 00 00 01 00 00 00 60 0B 01 FF 02 00 00 00 00 00 | ......`.........<CR><LF>
0310: 00 01 00 00 01 00 00 FF 00 00 00 00 96 00 00 00 | ................<CR><LF>
0320: 02 00 02 00 08 00 00 00 01 00 00 FF 02 00 00 01 | ................<CR><LF>
0330: 00 00 00 60 0B 03 FF 02 00 00 00 00 00 00 01 00 | ...`............<CR><LF>
0340: 00 01 00 00 FF 96 00 00 00 96 00 00 00 05 01 01 | ................<CR><LF>
0350: 80 00 80 00 19 00 78 00 10 00 00 00 00 00 00 0A | ......x.........<CR><LF>
0360: 00 6A FF 02 00 01 00 00 0A 00 07 B2 01 01 04 00 | .j..............<CR><LF>
0370: 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 | ................<CR><LF>
0380: 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 | ................<CR><LF>
0390: 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 | ................<CR><LF>
03A0: 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 | ................<CR><LF>
03B0: 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 | ................<CR><LF>
03C0: 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 | ................<CR><LF>
03D0: 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 | ................<CR><LF>
03E0: 00 00 00 00 0A 00 6A FF 01 00 01 00 00 0A 00 07 | ......j.........<CR><LF>
03F0: B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 | ................<CR><LF>
Only the first byte at offset 0x00 - 0x02 which is serializer_Version.
Remaining bytes are not matching as per the objects created.
Are we missing something? which objects are being saved in the memory and which offset?
Thank you
Hi, That depends on what…
Hi,
That depends on what objects you are using and what you have marked to serialized.
check saveSettings method. Add all object that you want to save to serializerSettings.savedObject.
You can ignore attributes using NON_SERIALIZED_OBJECTS.
BR,
Mikko
Hi kurumi, we are adding…
Hi kurumi,
we are adding
static gxObject* ALL_OBJECTS[] = { BASE(associationNone), BASE(associationLow), BASE(associationHigh), BASE(associationHighGMac), BASE(securitySetupLow), BASE(securitySetupHigh),
BASE(ldn), BASE(eeprom), BASE(testMode), BASE(eventCode_Voltage), BASE(eventCode_Current), BASE(eventCode_Transaction),
BASE(clock1), BASE(activePowerL1), BASE(pushSetup), BASE(scriptTableGlobalMeterReset), BASE(scriptTableDisconnectControl),
BASE(scriptTableActivatetestMode), BASE(scriptTableActivateNormalMode), BASE(profileGeneric), BASE(eventLog_Voltage), BASE(eventLog_Current), BASE(eventLog_Transaction), BASE(hdlc),
BASE(disconnectControl), BASE(actionScheduleDisconnectOpen), BASE(actionScheduleDisconnectClose),
BASE(unixTime), BASE(invocationCounter),
BASE(blockCipherKey), BASE(authenticationKey), BASE(kek), BASE(serverInvocationCounter), BASE(NICMODE1), BASE(MANUFACTURERNAME1),
BASE(account), BASE(credit), BASE(charge), BASE(tokengateway)};
static gxSerializerIgnore NON_SERIALIZED_OBJECTS[] = {
//Nothing is saved when authentication is not used.
IGNORE_ATTRIBUTE(BASE(associationNone), GET_ATTRIBUTE_ALL()),
//Only password is saved for low and high authentication.
IGNORE_ATTRIBUTE(BASE(associationLow), GET_ATTRIBUTE_EXCEPT(7)),
IGNORE_ATTRIBUTE(BASE(associationHigh), GET_ATTRIBUTE_EXCEPT(7)),
//Only scaler and unit are saved for all register objects.
IGNORE_ATTRIBUTE_BY_TYPE(DLMS_OBJECT_TYPE_REGISTER, GET_ATTRIBUTE(2)),
//Association object list or association atatus are never saved.
IGNORE_ATTRIBUTE_BY_TYPE(DLMS_OBJECT_TYPE_ASSOCIATION_LOGICAL_NAME, GET_ATTRIBUTE(2, 8)),
//Profile generic buffer is not saved.
IGNORE_ATTRIBUTE_BY_TYPE(DLMS_OBJECT_TYPE_PROFILE_GENERIC, GET_ATTRIBUTE(2)),
//EEPROM is not serialized.
IGNORE_ATTRIBUTE(BASE(eeprom) , GET_ATTRIBUTE_ALL())
};
I just want to know from which offset exactly objects related information is being saved?
With the existing server.ino example what is written from offset 0 in EEPROM?
Thank you,
Sravanti
H, All attributes from the…
H,
All attributes from the listed COSEM objects are saved to the EEPROM in given order.
associationNone, associationLow, etc.
Note! New objects must be appended to the list, or the load fails.
BR,
Mikko
Thank you for the quick…
Thank you for the quick reply kurumi.
Actually when are I read EEPROM and try to figure out the objects details, unable to find out. If all the objects are being saved then from which offset I can find the Object type, OBIS code, data for each object in the list?
Hi, Only the attribute raw…
Hi,
Only the attribute raw data is saved. Object type, OBIS code, etc, is not saved because there is not enough space in microcontrollers. You need to use load method to get the data.
BR,
Mikko
Thank you so much Kurumi,…
Thank you so much Kurumi,
Now I got some clarity on how object's information is being saved in EEPROM in DLMS server.