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. Problem With Baudrate Change-over After Establishing Connecting

Problem with Baudrate change-over after establishing connecting

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 SisyB , 24 December, 2018
Forums
Gurux.Serial

I am new to C#Sharp and i am developing a program to read or program energy meter via serial port.I connect to the meter at 300 baudrate and do initial handshake
At this stage i can connect to the meter after initial /?!<CR>LF> command.The problem i have is when i am attempting to send the ACK command together with baudrate change-over.
I am suppose to send this command(to the meter) withing 1.5s of receiving identification message from the meter and i can 'ACK' within the set limits but struggling with changing form 300 read mode(00) to 9600 (051) mode....."<ACK>051<CR>LF>"
i have tried to close the port (Comport.Close) and set new baud rate(Comport.Baudrate=9600) but it doesn't work.My code looks as below
ComPort.DiscardInBuffer(); // clearing buffer form Dump Mode
ComPort.RtsEnable = false;
ComPort.DtrEnable = false;
ComPort.Close();
await UseDelay();
//then set new settings
ComPort.BaudRate = 9600;// new baudrate
if (ComPort.IsOpen==false)
{
ComPort.DataReceived += new SerialDataReceivedEventHandler(DataReceived);
ComPort.Open(); }

await UseDelay();
ComPort.RtsEnable = true;
ComPort.DtrEnable = true;
byte[] ack = new byte[] {0X06,0X30,0X35,0x30,0X0D,0X0A};
//MessageBox.Show(DataReceived);
ComPort.Write(ack, 0, ack.Length);
}
Can you help me please.
Thank you in advance.

SisyB

Profile picture for user Kurumi

Kurumi

7 years 5 months ago

Problem with Baudrate change-over after establishing connecting

Hi,

Changing the baud rate might be sometimes difficult. You did not tell the meter model.
One option is if you don't change the baud rate. Use 300. It's slower, but you can test with that.

I also find out that you are writing 050, not 051.

BR,

Mikko

SisyB

7 years 5 months ago

Hi Mikko,

Hi Mikko,

I can actually change the baudate.I can set it to 300(0X30) or 9600(0x35) and i can see the difference on my data which proves that the baudrate has changed.
The issue is it does'nt take 051 .When i use 051 it would stream all data, but if i try to put onto programming mode using 051 i dont get any response from the meter.
And if i set to Manufacture specific mode (059) i get a response of 42 , which i cannot decipher its meaning.
The meter is As220 from Elster

Profile picture for user Kurumi

Kurumi

7 years 5 months ago

Problem with Baudrate change-over after establishing connecting

Hi,

You should check is Elster As220 supporting Programming Mode.
We haven't read IEC meters a long time because the variation between manufacturers/meters is huge.

BR,

Mikko

SisyB

7 years 5 months ago

In reply to Problem with Baudrate change-over after establishing connecting by Kurumi

Hi Mikko,

Hi Mikko,

Using the manufacturer's software i can read the meter ,and can successfully switch to Programming MODE.
Send: 16:23:43,77 -- /?!<CR><LF>
Recv: 16:23:44,99 -- /ELS5\@V8.23 <CR><LF>
Send: 16:23:45,19 -- <ACK>051<CR><LF>
Recv: 16:23:45,72 -- <SOH>P0<STX>(********)<ETX>h Soll: h
Send: 16:23:45,93 -- <SOH>P1<STX>(********)<ETX>?
Recv: 16:23:46,16 -- <ACK>
Send: 16:23:46,37 -- <SOH>R5<STX>0.8.0()<ETX>_
Recv: 16:23:49,26 -- <STX>0.8.0()<ETX>: Soll: :
Send: 16:23:49,46 -- <SOH>B0<ETX>q

Profile picture for user Kurumi

Kurumi

7 years 5 months ago

Problem with Baudrate change-over after establishing connecting

Hi,

After you send 051 meter sends seed. You need to send password. I can't remember is baud rate changed before or after sending password.

BR,
Mikko

SisyB

7 years 5 months ago

In reply to Problem with Baudrate change-over after establishing connecting by Kurumi

Thats where my problem is:

Thats where my problem is:
1.If I send 050 it streams back data till the end on 9600 BPS
2.If i send 051 ot doesnt respond.
3.If i dont send the ACK within 1.5 sec it just wait for about 30 secs before streaming data on 300 BPS.

Will keep trying.

Profile picture for user Kurumi

Kurumi

7 years 5 months ago

Problem with Baudrate change-over after establishing connecting

Hi,

Have you read this?

https://www.gurux.fi/node/5415

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