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. Upgrade The Firmware In Python Code

Upgrade The Firmware in Python Code

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 Jinay Sharma , 7 March, 2022
Forums
Gurux.DLMS

How can i upgrade the firmware in python code.

I am using Rpi Board. I am using Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/

Please provide a Command or code.

where i add firmware file location??

Profile picture for user Kurumi

Kurumi

4 years 3 months ago

Hi,

Hi,

Check Image updating from here:
http://gurux.fi/Gurux.DLMS.Client

There is no python example available at the moment, but you can easily modify have for your needs.

There are changes between the image files. Some meter manufacturers are using binary files and some hex files or JSON files.

You need to read the data from the file by yourself and then update it like described in Image updating.

BR,
Mikko

Jinay Sharma

4 years 2 months ago

Dear Mikko,

Dear Mikko,

I'm not able to transfer image file.
what is client: {maxReceivePDUSize} in imageTransferInitiate ??
what passes argument in imageBlockTransfer fuction ??
need your support.

Meter Configuration
logicalName: 0.0.44.0.0.255
ImageBlockSize: 128
ImageTransferredBlocksStatus : 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
ImageFirstNotTransferredBlockNumber: 335
ImageTransferEnabled: True
ImageTransferStatus: 1
ImageActivateInfo: bytearray(b'ABCDEFG') bytearray(b'') 98028
Image File format: .bin

Profile picture for user Kurumi

Kurumi

4 years 2 months ago

Hi,

Hi,

Meter defines max PDU size in attribute #2. Image block size.
http://gurux.fi/Gurux.DLMS.Objects.GXDLMSImageTransfer

tr = GXDLMSImageTransfer
imageBlockValue = #Read this from the file.
frames = tr.imageBlockTransfer(client, imageBlockValue, None)

Send frames to the meter using readDataBlock-method.

BR,
Mikko

Jinay Sharma

4 years 2 months ago

Hi,

Hi,
I did it this way. not received any output
file = open("F:\image.bin", "rb")
ImageTransfer = GXDLMSImageTransfer()

ImageTransfer.client = settings.client
ImageTransfer.imageIdentifier = 'ABCDEFG'
ImageTransfer.forImageSize = 98028
data = ImageTransfer.imageTransferInitiate(ImageTransfer.client,ImageTransfer.imageIdentifier,ImageTransfer.forImageSize)
reply = GXReplyData()
reader.readDataBlock(data,reply)

ImageTransfer.imageBlockValue = file.read()
ImageTransfer.imageBlockCount = None
frames = ImageTransfer.imageBlockTransfer(ImageTransfer.client, ImageTransfer.imageBlockValue, ImageTransfer.imageBlockCount)

reader.readDataBlock(frames,reply)

Profile picture for user Kurumi

Kurumi

4 years 2 months ago

Hi,

Hi,

You need to read image block size first.

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