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. How To Set Passive Activity Calender For Season Profile,Week Profile and Day Profile In ANSI C

how to set passive activity calender for Season profile,Week profile and Day profile in ANSI C

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 Mohanraj , 5 May, 2020
Forums
General discussion

Hi Mikko,

Could you please provide sample source or steps for setting the activity calender for passive activity calender for Season profile,Week profile and Day profile.
Please provide some sample code snippet

Thanks
Mohan Raj

Mohanraj

6 years 1 month ago

Hi Mikko,

Hi Mikko,

Any update please?

Thanks
Mohan Raj

Profile picture for user Kurumi

Kurumi

6 years 1 month ago

Hi Mohan ,

Hi Mohan ,

Help is updated.
http://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSActivityCalendar

BR,
Mikko

Mohanraj

6 years 1 month ago

In reply to Hi Mohan , by Kurumi

Hi Mikko,

Hi Mikko,

Followed the link. But unable to write seasonProfile.Below is the trace

Writing an Activity calender
TX: 7E A0 43 03 61 76 91 93 E6 E6 00 C9 35 30 00 00 03 08 CB DC 74 EF E3 D7 21 F9 75 0F CD B4 0F 1A 8C ED 55 3C 6D 6C 75 85 82 22 DC 27 71 22 2D BB 53 F4 C3 07 9E 1D 51 EE 9D AD 0C 13 CA 6B 89 B0 44 6D 55 AF 7E
RX: 7E A0 43 03 61 76 91 93 E6 E6 00 C9 35 30 00 00 03 08 CB DC 74 EF E3 D7 21 F9 75 0F CD B4 0F 1A 8C ED 55 3C 6D 6C 75 85 82 22 DC 27 71 22 2D BB 53 F4 C3 07 9E 1D 51 EE 9D AD 0C 13 CA 6B 89 B0 44 6D 55 AF 7E 7E A0 23 61 03 96 6B 0B E6 E7 00 CD 15 30 00 00 02 54 80 BB 9C F8 FB DB 52 74 32 C3 65 22 04 4B 4C 0C 86 4A 7E
Write failed Activity Calendar0C� 00.00.13.00.00.255:7 Access Error : Device reports a inconsistent Class or Object.

Below is the code snippet

gxActivityCalendar activityCalendar;
gxSeasonProfile* sp;
const unsigned char ln[6] = { 0,0,13,0,0,255 };
if ((ret = cosem_init2((gxObject*)&activityCalendar, DLMS_OBJECT_TYPE_ACTIVITY_CALENDAR, ln)) == 0)
{
bb_addString(&activityCalendar.calendarNamePassive, "Calendar");
sp = (gxSeasonProfile*)malloc(sizeof(gxSeasonProfile));
bb_init(&sp->name);
bb_addString(&sp->name, "2"); //Season profile name
time_init(&sp->start, -1, 10, 30, -1, -1, -1, -1, -1);
bb_init(&sp->weekName);
arr_push(&activityCalendar.seasonProfilePassive, sp);
time_init(&activityCalendar.time, 2020, 1, 1, 0, 0, 0, -1, -1);
ret = com_write(connection, &activityCalendar.base, 7);
if (ret != DLMS_ERROR_CODE_OK)
{
return ret;
}
}

Could you please correct me. Not sure what is wrong

Thanks
Mohan Raj

Mohanraj

6 years 1 month ago

Hi Mikko,

Hi Mikko,

Any update please?

Thanks
Mohan Raj

Profile picture for user Kurumi

Kurumi

6 years 1 month ago

Hi Mohan ,

Hi Mohan ,

Because your connection is ciphered, I can't help you. Can you connect without ciphering?

BR,

Mikko

Mohanraj

6 years 1 month ago

Hi Mikko,

Hi Mikko,

Below is the log of non ciphering meter.Still the same issue. could you please correct me?

TX: 7E A0 07 03 61 93 69 47 7E
RX: 7E A0 07 03 61 93 69 47 7E 7E A0 1E 61 03 73 B5 7C 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E
TX: 7E A0 4C 03 61 10 58 27 E6 E6 00 60 3E A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 02 AC 12 80 10 70 38 9C CE 67 B3 59 AC 56 AB 55 2A 15 8A 45 22 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF BA A8 7E
RX: 7E A0 4C 03 61 10 58 27 E6 E6 00 60 3E A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 02 AC 12 80 10 70 38 9C CE 67 B3 59 AC 56 AB 55 2A 15 8A 45 22 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF BA A8 7E 7E A0 58 61 03 30 07 51 E6 E7 00 61 4A A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 0E 88 02 07 80 89 07 60 85 74 05 08 02 02 AA 12 80 10 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 BE 10 04 0E 08 00 06 5F 1F 04 00 00 18 1D 02 30 00 07 57 15 7E
TX: 7E A0 2B 03 61 32 8D EB E6 E6 00 C3 01 81 00 0F 00 00 28 00 00 FF 01 01 09 10 AA 28 52 31 C6 A6 5E E7 FC 54 28 BE 16 8D BC 69 4F AE 7E
RX: 7E A0 2B 03 61 32 8D EB E6 E6 00 C3 01 81 00 0F 00 00 28 00 00 FF 01 01 09 10 AA 28 52 31 C6 A6 5E E7 FC 54 28 BE 16 8D BC 69 4F AE 7E 7E A0 24 61 03 52 62 DC E6 E7 00 C7 01 81 00 01 00 09 10 90 4D 0A 78 22 77 9E 3B E3 AB 17 C0 65 8B 5C 27 8B 51 7E
TX: 7E A0 19 03 61 54 39 98 E6 E6 00 C3 01 82 00 46 00 00 60 03 0A FF 01 00 07 72 7E
RX: 7E A0 19 03 61 54 39 98 E6 E6 00 C3 01 82 00 46 00 00 60 03 0A FF 01 00 07 72 7E 7E A0 11 61 03 74 F3 BA E6 E7 00 C7 01 82 00 00 EE 5D 7E
Writing an Activity calender
TX: 7E A0 3A 03 61 76 B7 30 E6 E6 00 C1 01 83 00 14 00 00 0D 00 00 FF 07 00 01 01 02 03 09 0B 57 69 6E 74 65 72 20 74 69 6D 65 09 0C FF FF 0A 1E 01 FF FF FF FF 80 00 00 09 00 47 25 7E
RX: 7E A0 3A 03 61 76 B7 30 E6 E6 00 C1 01 83 00 14 00 00 0D 00 00 FF 07 00 01 01 02 03 09 0B 57 69 6E 74 65 72 20 74 69 6D 65 09 0C FF FF 0A 1E 01 FF FF FF FF 80 00 00 09 00 47 25 7E 7E A0 10 61 03 96 54 62 E6 E7 00 C5 01 83 09 47 61 7E
Write failed Activity Calendar]�� 00.00.13.00.00.255:7 Access Error : Device reports a inconsistent Class or Object.

Thanks
Mohan Raj

Profile picture for user Kurumi

Kurumi

6 years 1 month ago

Hi Mohan,

Hi Mohan,

week_name is empty. Check your week names and update it to the correct one.
Also your hour, minute and second are ignored. Set them to zero.
Try to read correct values from the meter. Meters might expect that date-time value is given in exactly correctly. For example, if the deviation is different, meter don't accept it.

BR,
Mikko

Mohanraj

6 years 1 month ago

In reply to Hi Mohan, by Kurumi

Hi Mikko,

Hi Mikko,

Thanks for the information. After updating correct week_name it is working.

Thanks
Mohan Raj

Profile picture for user Kurumi

Kurumi

6 years 1 month ago

Hi Mohan ,

Hi Mohan ,

Thanks for letting me know what was the problem.

BR,
Mikko

Mohanraj

6 years 1 month ago

In reply to Hi Mohan , by Kurumi

Hi Mikko,

Hi Mikko,

We have set Week Name correct after reading and hour, minute and second set to zero.We understood that -1 means value will not be initalized.

Thanks
Mohan Raj,

Profile picture for user Kurumi

Kurumi

6 years 1 month ago

Hi Mohan,

Hi Mohan,

In this case, -1 means that value is ignored. It depends on the meter, what values you need to use.

BR,

Mikko

Mohanraj

6 years 1 month ago

In reply to Hi Mohan, by Kurumi

Hi Mikko,

Hi Mikko,

Thank you.

Thanks
Mohan Raj

  • 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