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. Communication Between Dlms Client and Server In Same PC

Communication between dlms client and server in same PC

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 shakti0031 , 27 April, 2020
Forums
General discussion

Hi Sir,

I have read data from client to server in same PC. what i have change in com_readObject( ) function.

//Read object.
int com_readObject(
connection *connection,
gxObject* object,
unsigned char attributeOrdinal)
{
int ret;
message data;
gxReplyData reply;
mes_init(&data);
reply_init(&reply);
if ((ret = cl_read(&connection->settings, object, attributeOrdinal, &data)) != 0 ||
(ret = com_readDataBlock(connection, &data, &reply)) != 0 ||
(ret = cl_updateValue(&connection->settings, object, attributeOrdinal, &reply.dataValue)) != 0)
{
}
mes_clear(&data);
reply_clear(&reply);
return ret;
}

Thanks,
shakti

Profile picture for user Kurumi

Kurumi

6 years 1 month ago

Hi shakti,

Hi shakti,

You don't change anything here. You need to change your communication parameters to access your meter. Parameters depend are you using TCP/IP or serial port connection.

BR,
Mikko

shakti0031

6 years 1 month ago

Hi Sir,

Hi Sir,

I am using TCP/ IP connection . So What I have change ???

Thanks,
Shakti

shakti0031

6 years 1 month ago

Hi Sir,

Hi Sir,

You told me I have to change communication parameter . But which code I have change ( server or client ).

Thanks,
Shakti

Profile picture for user Kurumi

Kurumi

6 years 1 month ago

Hi,

Hi,

You need to change TCP/IP address and port number. DLMS settings depend on the meter that you want to read. I strongly suggest that you use GXDLMSDirector to read your meter first and get an idea from DLMS meters.

BR,
Mikko

shakti0031

6 years 1 month ago

Hi Sir,

Hi Sir,

I don't want to read meter. I want to just communicate between dlms server and client using TCP/IP connection in Linux. So what I have to do ???

Thanks,
Shakti

Profile picture for user Kurumi

Kurumi

6 years 1 month ago

Hi,

Hi,

You can use client example. Give IP address and port number as a parameter. Like this.
GuruxDLMSClientExample -h YOUR_SERVER_IP_ADDRESS -p YOUR_SERVER_PORT_NUMBER

BR,
Mikko

shakti0031

6 years 1 month ago

Hi Sir,

Hi Sir,

Where I have to use this "GuruxDLMSClientExample -h YOUR_SERVER_IP_ADDRESS -p YOUR_SERVER_PORT_NUMBER" ??.

Thanks,
Shakti

Profile picture for user Kurumi

Kurumi

6 years 1 month ago

Hi Shakti,

Hi Shakti,

Compile GuruxDLMSClientExample to make a DLMS client.

BR,

Mikko

shakti0031

6 years 1 month ago

Hi Sir,

Hi Sir,

How I am using that command??. Because for Client already make file given and when i am compile client it generate " gurux.dlms.client.bin" .

Thanks,
Shakti

shakti0031

6 years 1 month ago

Hi Sir,

Hi Sir,

Whenever I compile dlms client is showing ( Attached photo ).

Thanks,
Shakti

Image
Profile picture for user Kurumi

Kurumi

6 years 1 month ago

Hi,

Hi,

Run your app like this:
gurux.dlmsclient.example -h YOUR_SERVER_IP_ADDRESS -p YOUR_SERVER_PORT_NUMBER"

BR,
Mikko

shakti0031

6 years 1 month ago

Hi Sir,

Hi Sir,

Which App sir ??? . I didn't Understand .

Thanks,
Shakti

Profile picture for user Kurumi

Kurumi

6 years 1 month ago

Hi Shakti,

Hi Shakti,

You have compiled the client app in your pic. You use that application to connect to the server/meter app. Then you compile the server and start that.

Now you can connect client to the server using parameters that I showed.

BR,

Mikko

BR,
Mikko

shakti0031

6 years 1 month ago

Hi Sir,

Hi Sir,

How to compile dlms server and client in Linux??

Thanks,
shakti

Profile picture for user Kurumi

Kurumi

6 years 1 month ago

Hi Shakti,

Hi Shakti,

There is a make-file. Make bin, lib and obj folders and run make.
BR,
Mikko

shakti0031

6 years 1 month ago

Hi Sir,

Hi Sir,

I compiled server . There run four server . How to connect client and server using TCP / IP.

Attached photos.

Thanks,
Shakti

Image
  • 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