Hello,
I am using Server.ino from https://github.com/Gurux/GuruxDLMS.c/tree/4ec295d3d316bacd267a86166f341… to implement Gurux Server in esp32.I have successfully implemented PC association in esp32 and also added manufacture specific objects and obis code with data class.I am trying to write the value attribute through DLMS ACCESS_MODE_READ_WRITE,I want store the value in EEPROM please provide any sample to set an attribute with esp32 (EEPROM.write) API.Please guide further
Forums
Hi, Check the SERIALIZER…
Hi,
Check the SERIALIZER_LOAD, SERIALIZER_LOAD, and SERIALIZER_SAVE from the server example.
https://github.com/Gurux/GuruxDLMS.c/blob/master/Arduino_IDE/server/ser…
BR,
Mikko
Hello, Thanks for reply,Now…
Hello,
Thanks for reply,Now Iam facing 2 different issues,
1.Setting of an attribute is happeping only first time i.e. Prewrite and post write functions are calling only at first time,I cannot set the value for multiple times.Please suggest the required modifications where I can set an attribute multiple times.
2.I am prinitng C1 01 C1 00 01 00 00 01 00 80 FF 02 00 0A 01 34 as it was the setting frame,but Iam getting set value 34 which was previuous set value which I have set from Gurux director,not getting the current value.please suggest the required modifications where I can get same set value which I was setting in Gurux director
Hi, You need to call…
Hi,
You need to call saveSettings in svr_postWrite to save the settings.
BR,
Mikko
Hello, Thanks for your reply…
Hello,
Thanks for your reply, as of now I am able to set and attribute but facing an issue i.e. the response form Gurux director is showing an error "Access error :Device reports hardware error".
please guide further
Hi, I believe that…
Hi,
I believe that saveSettings returns an error.
SERIALIZER_SAVE fails for some reason. Check do you have EEPROM? Check the EEPROM.length()
BR,
Mikko
Hello, we are using ESP32…
Hello,
we are using ESP32 module which is consisting of 512 bytes,
but it was mentioned that
#define SETTINGS_BUFFER_SIZE 2000
#define LOAD_PROFILE_BUFFER_SIZE 1000
#define EVENT_PROFILE_BUFFER_SIZE 1000
How can I modify these buffer sizes compatible to my ESP32 ?
Please guide further
Hi, You need to decrease…
Hi,
You need to decrease buffer sizes. You can try values.
#define SETTINGS_BUFFER_SIZE 100
#define LOAD_PROFILE_BUFFER_SIZE 100
#define EVENT_PROFILE_BUFFER_SIZE 100
The actual values depend on what you want to do.
You can remove profile buffers if you don't implement the profile generic.
BR,
Mikko
Hello, Thanks for reply, I…
Hello,
Thanks for reply, I have changed the EEPROM size to 4096,and it was working fine.
while I am reading the EEPROM object getting this log
16:10:40 Read object type Data index: 2
TX: 7E A0 19 03 21 1A 25 75 E6 E6 00 C0 01 C1 00 01 00 80 00 00 00 FF 02 00 61 AA 7E
16:10:40
RX: 7E A0 7E 21 03 D0 B6 74 E6 E7 00 C4 02 C1 00 00 00 00 01 00 68 09 82 04 85 02 80 04 00 00 05 00 14 00 47 75 72 75 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 14 00 47 75 72 75 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 00 00 00 00 00 00 00 02 10 F4 02 05 08 01 01 00 78 B8 00 00 02 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 0D 64 7E
16:10:40
TX: 7E A0 13 03 21 3C BF ED E6 E6 00 C0 02 C1 00 00 00 01 51 BE 7E
16:10:40
RX: 7E A8 86 21 03 F2 75 BE E6 E7 00 C4 02 C1 00 00 00 00 02 00 81 CC 10 F4 02 05 08 02 05 00 00 00 00 00 00 2B 00 02 FF 00 00 00 00 00 00 08 00 08 00 47 52 58 00 2F 01 00 00 08 00 08 00 00 00 00 00 00 00 00 00 00 00 08 00 08 00 47 52 58 00 2F 01 00 00 08 00 08 00 00 00 00 00 00 00 00 00 09 11 00 11 00 47 52 58 30 30 30 30 30 30 30 30 30 30 33 30 33 00 03 01 12 01 00 09 65 10 F4 02 05 08 02 05 00 00 8C 7C 7E
16:10:40
TX: 7E A0 07 03 21 51 11 E4 7E
16:10:40
RX: 7E A0 66 21 03 F4 E9 35 00 00 00 00 2B 00 02 FF 00 00 00 00 00 00 08 00 08 00 47 52 58 00 2F 01 00 00 08 00 08 00 00 00 00 00 00 00 00 00 00 00 08 00 08 00 47 52 58 00 2F 01 00 00 08 00 08 00 00 00 00 00 00 00 00 00 09 11 00 11 00 47 52 58 30 30 30 30 30 30 30 30 30 30 33 30 33 00 03 01 12 01 00 09 65 5B B8 7E
16:10:40
TX: 7E A0 13 03 21 7E A9 8C E6 E6 00 C0 02 C1 00 00 00 02 CA 8C 7E
16:10:40
RX: 7E A8 86 21 03 16 5F 1F E6 E7 00 C4 02 C1 00 00 00 00 03 00 81 CC 07 B2 01 01 04 00 00 00 00 00 00 00 00 00 00 FF FF 03 FE FF 02 00 00 FF 80 00 00 FF FF 0A FE FF 03 00 00 FF 80 00 00 3C 00 02 03 1E 02 00 06 00 01 00 00 00 2A 00 00 FF 02 00 00 28 00 00 00 19 09 00 FF 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 65 07 B2 01 01 04 00 00 00 00 49 52 7E
16:10:40
TX: 7E A0 07 03 21 91 1D 22 7E
16:10:40
RX: 7E A0 66 21 03 18 8B 18 00 00 00 00 00 00 FF FF 03 FE FF 02 00 00 FF 80 00 00 FF FF 0A FE FF 03 00 00 FF 80 00 00 3C 00 02 03 1E 02 00 06 00 01 00 00 00 2A 00 00 FF 02 00 00 28 00 00 00 19 09 00 FF 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 65 13 3E 7E
16:10:40
TX: 7E A0 13 03 21 B0 DB A3 E6 E6 00 C0 02 C1 00 00 00 03 43 9D 7E
16:10:40
RX: 7E A8 86 21 03 3A 31 F4 E6 E7 00 C4 02 C1 00 00 00 00 04 00 81 CC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 00 00 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 0A 00 FF FF FF FF FF FF FF 00 FF 80 00 00 FF FF FF FF FF FF FF 0A FF 80 00 00 FF FF FF FF FF FF FF 1E FF 80 00 00 FF FF FF FF FF FF FF 28 FF 80 00 00 07 B2 01 01 04 00 00 00 09 65 00 00 00 00 00 00 00 00 00 B8 09 7E
16:10:40
TX: 7E A0 07 03 21 D1 19 60 7E
16:10:40
RX: 7E A0 66 21 03 3C AD 7F 00 00 00 00 00 05 00 00 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 0A 00 FF FF FF FF FF FF FF 00 FF 80 00 00 FF FF FF FF FF FF FF 0A FF 80 00 00 FF FF FF FF FF FF FF 1E FF 80 00 00 FF FF FF FF FF FF FF 28 FF 80 00 00 07 B2 01 01 04 00 00 00 09 65 AF 26 7E
16:10:40
TX: 7E A0 13 03 21 F2 CD C2 E6 E6 00 C0 02 C1 00 00 00 04 FC E9 7E
16:10:40
RX: 7E A8 86 21 03 5E 13 D1 E6 E7 00 C4 02 C1 00 00 00 00 05 00 81 CC 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 09 65 00 00 00 00 07 B2 01 01 04 EA 20 7E
16:10:40
TX: 7E A0 07 03 21 11 15 A6 7E
16:10:40
RX: 7E A0 66 21 03 50 C7 D6 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 09 65 37 49 7E
16:10:40
TX: 7E A0 13 03 21 34 F7 61 E6 E6 00 C0 02 C1 00 00 00 05 75 F8 7E
16:10:40
RX: 7E A8 86 21 03 72 7D 3A E6 E7 00 C4 02 C1 00 00 00 00 06 00 81 CC 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 01 00 00 00 00 00 02 09 65 07 B2 01 01 04 00 00 00 00 6A 6A 7E
16:10:40
TX: 7E A0 07 03 21 51 11 E4 7E
16:10:40
RX: 7E A0 66 21 03 74 E1 B1 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 01 00 00 00 00 00 02 09 65 82 D7 7E
16:10:40
TX: 7E A0 13 03 21 76 E1 00 E6 E6 00 C0 02 C1 00 00 00 06 EE CA 7E
16:10:40
RX: 7E A8 86 21 03 96 57 9B E6 E7 00 C4 02 C1 00 00 00 00 07 00 81 CC 00 02 00 01 00 01 00 01 00 02 46 00 00 00 60 03 0A FF 01 0F 00 02 00 01 00 01 00 02 46 00 00 00 60 03 0A FF 02 0F 00 01 00 01 00 01 00 00 00 00 00 01 00 01 00 01 00 00 00 00 00 02 00 02 00 08 00 00 00 01 00 00 FF 02 00 00 03 00 01 01 15 19 00 FF 02 00 00 3C 00 00 00 01 00 00 01 00 00 FF 01 00 00 00 09 65 00 02 00 01 00 01 00 01 00 D5 35 7E
16:10:40
TX: 7E A0 07 03 21 91 1D 22 7E
16:10:40
RX: 7E A0 66 21 03 98 83 9C 02 46 00 00 00 60 03 0A FF 01 0F 00 02 00 01 00 01 00 02 46 00 00 00 60 03 0A FF 02 0F 00 01 00 01 00 01 00 00 00 00 00 01 00 01 00 01 00 00 00 00 00 02 00 02 00 08 00 00 00 01 00 00 FF 02 00 00 03 00 01 01 15 19 00 FF 02 00 00 3C 00 00 00 01 00 00 01 00 00 FF 01 00 00 00 09 65 EA E0 7E
16:10:40
TX: 7E A0 13 03 21 B8 93 2F E6 E6 00 C0 02 C1 00 00 00 07 67 DB 7E
16:10:40
RX: 7E A8 86 21 03 BA 39 70 E6 E7 00 C4 02 C1 00 00 00 00 08 00 81 CC 96 00 00 00 02 00 02 00 08 00 00 00 01 00 00 FF 02 00 00 01 00 00 00 60 0B 00 FF 02 00 00 00 00 00 00 01 00 00 01 00 00 FF 01 00 00 00 96 00 00 00 05 01 01 80 00 80 00 19 00 78 00 10 00 00 00 00 00 00 0A 00 6A FF 02 00 01 00 00 0A 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 09 65 96 00 00 00 02 00 02 00 08 B7 C2 7E
16:10:40
TX: 7E A0 07 03 21 D1 19 60 7E
16:10:40
RX: 7E A0 66 21 03 BC A5 FB 00 00 00 01 00 00 FF 02 00 00 01 00 00 00 60 0B 00 FF 02 00 00 00 00 00 00 01 00 00 01 00 00 FF 01 00 00 00 96 00 00 00 05 01 01 80 00 80 00 19 00 78 00 10 00 00 00 00 00 00 0A 00 6A FF 02 00 01 00 00 0A 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 09 65 E1 9F 7E
16:10:40
TX: 7E A0 13 03 21 FA 85 4E E6 E6 00 C0 02 C1 00 00 00 08 90 23 7E
16:10:40
RX: 7E A8 86 21 03 DE 1B 55 E6 E7 00 C4 02 C1 00 00 00 00 09 00 81 CC 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 00 00 09 65 00 00 07 B2 01 01 04 00 00 BA 3D 7E
16:10:40
TX: 7E A0 07 03 21 11 15 A6 7E
16:10:40
RX: 7E A0 66 21 03 D0 CF 52 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 00 00 09 65 55 B4 7E
16:10:40
TX: 7E A0 13 03 21 3C BF ED E6 E6 00 C0 02 C1 00 00 00 09 19 32 7E
16:10:40
RX: 7E A8 86 21 03 F2 75 BE E6 E7 00 C4 02 C1 00 00 00 00 0A 00 81 CC 0A 00 6A FF 01 00 01 00 00 0A 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 09 65 0A 00 6A FF 01 00 01 00 00 3C 2B 7E
16:10:40
TX: 7E A0 07 03 21 51 11 E4 7E
16:10:40
RX: 7E A0 66 21 03 F4 E9 35 0A 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 09 65 89 CB 7E
16:10:40
TX: 7E A0 13 03 21 7E A9 8C E6 E6 00 C0 02 C1 00 00 00 0A 82 00 7E
16:10:40
RX: 7E A8 86 21 03 16 5F 1F E6 E7 00 C4 02 C1 00 00 00 00 0B 00 81 CC 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 06 00 00 00 00 06 00 00 00 00 09 10 00 20 00 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 09 10 00 20 00 D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF FF 09 65 00 00 00 00 00 00 00 07 B2 02 D0 7E
16:10:40
TX: 7E A0 07 03 21 91 1D 22 7E
16:10:40
RX: 7E A0 66 21 03 18 8B 18 01 01 04 00 00 00 00 00 00 00 07 B2 01 01 04 00 00 00 00 00 00 00 06 00 00 00 00 06 00 00 00 00 09 10 00 20 00 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 09 10 00 20 00 D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF FF 09 65 2C EB 7E
16:10:40
TX: 7E A0 13 03 21 B0 DB A3 E6 E6 00 C0 02 C1 00 00 00 0B 0B 11 7E
16:10:40
RX: 7E A8 86 21 03 3A 31 F4 E6 E7 00 C4 02 C1 01 00 00 00 0C 00 76 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 09 10 00 20 00 D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 06 00 00 00 00 09 3A FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 09 10 00 20 00 D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 06 E0 F2 7E
16:10:40
TX: 7E A0 07 03 21 D1 19 60 7E
16:10:40
RX: 7E A0 0F 21 03 3C 2A 1F 00 00 00 00 09 3A B2 CA 7E
I am unable to understand how GXserializer is working and what is the end to end process of the GXserializer. Required a detail explanation of the this Gx serializer.
Please Guide Further.
Hi, GXSerializer can be used…
Hi,
GXSerializer can be used to save COSEM attributes to the EEPROM.
SERIALIZER_SIZE returns the max EEPROM size.
SERIALIZER_SAVE saves given bytes to the given offset.
SERIALIZER_LOAD loads bytes from the given offset.
https://github.com/Gurux/GuruxDLMS.c/blob/783b756b2a255482c49afffb1aeec…
BR,
Mikko
Thanks for reply, I have…
Thanks for reply,
I have created a manufacture object, also assigned a obis code and able to write the value to eeprom and we can also able to read the assigned value which was written to the object,
But I cannot read the same value after a power cycle, it was returning 0xFF or 255 value
Please guide further.
Hello Kurumi, We have…
Hello Kurumi,
We have included EEPROM.commit in Serializer_save, the return value of EEPROM.commit is always false with ESP 32.
Where as EEPROM.commit is working fine in another workspace.
Please guide further regarding this issue.
Hi, I believe that your MCU…
Hi,
I believe that your MCU doesn't implement EEPROM or there is something wrong with ESP 32 implementation. Test if you can write anything to the EEPROM.
BR,
Mikko
Hello, thank you for your…
Hello, thank you for your previous help.
Now I’m facing a new issue: I am able to write the block cipher key and authentication key, I can connect using the updated key while the module is powered on, but after a power recycle updated keys are not being retained. , it reverts back to the default keys.
Can you please guide me through this issue.
Hi, You need to read the…
Hi,
You need to read the keys from the EEPROM when the meter is restarted.
BR,
Mikko
Hello, thank you for your…
Hello, thank you for your previous help.
Now I’m facing a new issue: I am able to write the block cipher key and authentication key, and I can successfully connect using the updated keys while the module is powered on. However, after a power cycle, the updated keys are not retained — the system reverts back to the default keys.
I have created a single memory address to store both the BLOCK_CIPHER_KEY and AUTHENTICATION_KEY. I am able to write these keys to that address using SERIALIZER_SAVE, and I can read them back using SERIALIZER_LOAD after every power cycle.
Although the stored values are correctly read after each power cycle, the connection still only works with the default keys, not the updated ones.
Could you please guide me on how to resolve this issue?
Hi, Do you clear the old…
Hi,
Do you clear the old keys before setting the new keys?
BR,
Mikko