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?? 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 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 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 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) Hi, Hi, You need to read image block size first. BR, Mikko
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
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
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
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)
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
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
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
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)
Hi,
Hi,
You need to read image block size first.
BR,
Mikko