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. Arduino Client Sample Program With RS485

Arduino client sample program with RS485

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 rogertaykc , 18 July, 2022
Forums
Gurux.DLMS

I successfully using Gurux DLMS Director to connect and upload from the meter via a USB to RS485 convertor. Next is to try with Arduino client, will the sample program Arduino client work with RS485? I understand it is designed to use RS232. Any code modification needed? Thanks!

Profile picture for user Kurumi

Kurumi

3 years 10 months ago

Hi,

Hi,

The only difference between RS-485 and RS-232 is power level. The only software modifications that you need to do is change the baud rate and other serial port settings.

BR,
Mikko

rogertaykc

3 years 10 months ago

Hi Mikko,

Hi Mikko,

Thanks a lot! I will give it a try very soon.
By the way, will the library & sample program handle the additional transmit enable pin for RS485? This is what i am worried about...

Best regards,
Roger Tay

Profile picture for user Kurumi

Kurumi

3 years 10 months ago

Hi Roger ,

Hi Roger ,

The example is using the default Arduino serial port library and you can simply change it for others if you have problems with it.

BR,
Mikko

rogertaykc

3 years 10 months ago

Hi Mikko,

Hi Mikko,

Thanks! I will give it a try first, will consult you further in future if i face any difficulty.

Best regards,
Roger Tay

Amal mp

3 years 5 months ago

In reply to Hi Mikko, by rogertaykc

Hi rogertaykc

Hi rogertaykc
Have you successfully completed this? I am also trying to read meter data via RS485 using Esp8266.

rmunoz

2 years 4 months ago

Hi All. I have the same…

Hi All.

I have the same problem as @rogertaykc. In particular, I have connected my ESP32 arduino to a UART/TTL to RS485 converter board. This board has a pin that has to be enabled when transmitting and disable to receive. I checked the com_readAllObjects() function and its subfunctions but I cannot find the time to call the serial.write() function.
Has anyone been able to connect to a meter using a RS232 to RS485 adapter board?.

PD: The model of UART/TTL to RS485 converter board is HW-97 board.

https://protosupplies.com/product/max485-ttl-to-rs-485-interface-module/

Thanks

Profile picture for user Kurumi

Kurumi

2 years 4 months ago

Hi rmunoz, Please, create a…

Hi rmunoz,
Please, create a new topic if you have a new question. After a while, no one knew what was the original question.

We have made several projects where RS-232 or RS-485 using Arduino. Check your wires. It's really common that the problem is there. Then check your serial baud rate. Now it's 9600.

The best way to go is if you have two Arduino boards and you can verify that you can receive bytes to the other. Then you know that your connection is working.

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