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. READING PROFILE GENERIC IN C

READING PROFILE GENERIC IN 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 Gorantlaharikr… , 17 November, 2020
Forums
Gurux.DLMS

Hi sir

can i get steps to read profile generic data in ANSI C

thanks and regards
hari

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

Check the client example it reads all values from the meter. Check com_readProfileGenericColumns and com_readProfileGenerics methods. They do what you want to do.

BR,
Mikko

Gorantlaharikr…

5 years 6 months ago

Hi sir

Hi sir
thanks for your response
before reading profile generic i am try to read Association View but the res ponce i am getting wrong can you check both request and response is given below.

TX: 7E A0 2C 03 61 32 AC BC E6 E6 00 C8 1E 30 00 03 27 2A F7 D3 DD B3 DC 18 CB CC 1E AD CD E0 8B 80 FE 40 FB C7 8B C1 47 66 02 66 2D 91 90 7E
RX:7E A0 24 61 03 52 62 DC E6 E7 00 CC 16 30 00 00 0F 3D 74 6C 3A D2 70 9A 9A CF 79 9E 27 96 B6 43 0A C8 A5 8D B3 7E

And one more is how can i change frame type value.

thanks and regards,
hari

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

You are using logical name 0.0.40.0.0.249 when it should be 0.0.40.0.0.255.
Try to change that.

BR,
Mikko

Gorantlaharikr…

5 years 6 months ago

hi sir

hi sir

thanks for your reply
here for reading profile generic i am following below steps (ansi c)
1.initialising none authentication (cl_init)
2.cosem initialising (cosem_init)
3.connection initialising (com_initialzeconnection)
4.getting invocation counter (com_read)
5. close the connection(com_close)
///////set authentication///////
6.set high authentication (password,security,blockchipherkey,systemtitle,authenticationkey,authentication type,classaddress,serveraddress,invocationcounter)
7.cosem initialing(cosem_init)
8.read all objects(com_readalllobjects)
in 8th step or com_readallobject function i am getting error when reading assosiation view.

can you please correct above steps if any thing wrong

thanks and regards
hari

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

You need to send cl_getApplicationAssociationRequest when you are using High level authentication. If you don't sent it meter don't allow you to read anything. Check that you are sending it.

BR,
Mikko

Gorantlaharikr…

5 years 6 months ago

hi sir

hi sir
yes i am sending cl_getApplicationAssociationRequest under com_initialzeconnection function

Gorantlaharikr…

5 years 6 months ago

Hi sir,

Hi sir,
when i exicuiting assosiation view function i return an error with 269 value
and also i am getting 590 and somtimes i am getting 1400 bytes responce.

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

Can you read the meter with GXDLMSDirector? You should get the same amount of bytes in the response if you are reading the same authentication view. Your authentication view might be differents when you are using different authentication levels.

BR,
Mikko

Gorantlaharikr…

5 years 6 months ago

hi sir

hi sir
thanks for your response .
i can read the meter using GXDLMSDirector
the request byte sizes and response byte sizes are same.

can i get any sample source code of c with low or high authentication for reading profile generic.

thank you sir

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

Check the client example it reads all values from the meter and supports low and high authentication.

BR,
Mikko

Gorantlaharikr…

5 years 6 months ago

hi sir

hi sir
actually i am using atmel example source code.

it is having any problem.

Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

You need to change the client address, password and authentication level. Something like this:
cl_init(&con.settings, 1, 32, 1, DLMS_AUTHENTICATION_LOW, "password", DLMS_INTERFACE_TYPE_HDLC);

BR,
Mikko

Gorantlaharikr…

5 years 6 months ago

hi sir

hi sir

please check the below code file and tell me where did i mistake.

Image
Profile picture for user Kurumi

Kurumi

5 years 6 months ago

Hi,

Hi,

You need to establish the connection again before reading the value. You don't call com_initializeConnection after you have set the ciphering settings.

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