We are tried more than times to read Profile Generic. But getting "Capture objects not read." Error.
We are tried the following code.
Settings settings = new Settings();
GXDLMSReader reader = new GXDLMSReader(settings.client, settings.media,
settings.trace, settings.invocationCounter);
GXDLMSProfileGeneric obj = new GXDLMSProfileGeneric("1.0.99.1.0.255");
Calendar start= Calendar.getInstance();
start.set(2022,7,6);
Calendar end= Calendar.getInstance();
end.set(2022,7,8);
reader.readRowsByRange(obj, start.getTime(), end.getTime());
So we are blocking.Kindly help to us to resolve this. Response is much appreciated.
Thanks
Hi, You need to read capture…
Hi,
You need to read capture objects before you can read the buffer.
Read attribute #3 and after that, you can read the buffer.
https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSProfileGeneric
BR,
Mikko
Read attribute #3 and after…
Read attribute #3 and after that, you can read the buffer
readObject(obj,3)
reader.readRowsByRange(obj, start.time, end.time)
i tried this way but still not working
Hi, What meter returns when…
Hi,
What meter returns when you read capture objects? Is that an empty array?
BR,
Mikko
Yes we can get…
Yes we can get captureobjects = 0. Can we know what we did wrong here?
Below is my complete code. Can you please help here?
val obj = GXDLMSProfileGeneric("1.0.99.1.0.255")
val start = Calendar.getInstance()
start[2019, 9] = 9
val end = Calendar.getInstance()
end[2019, 9] = 11
readObject(obj,3)
readRowsByRange(obj,start.time, end.time)
Hi, Your meter doesn't…
Hi,
Your meter doesn't implement capture objects and you must add them manually. Those objects should be defined in the meter manual.
Is your meter using Italy or India specifications?
BR,
Mikko
Hi Thanks for your reply. My…
Hi Thanks for your reply.
My meter is Indian Specifications.
Those objects should be defined in the meter manual. - How to add this manually? Can you please send any reference?
Hi, You need to check what…
Hi,
You need to check what COSEM objects are added to the capture objects from the meter manual and add them like this:
pg.getCaptureObjects()
.add(new SimpleEntry<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSClock(),
new GXDLMSCaptureObject(2, 0)));
pg.getCaptureObjects().add(
new SimpleEntry<GXDLMSObject, GXDLMSCaptureObject>(new GXDLMSRegister(),
new GXDLMSCaptureObject(2, 0)));
BR,
Mikko
Access Error : "Unknown…
Now we can get the Capture Objects.Then how to read that objects?Can you please share any reference?
Thanks.
Hi, Some Indian meter…
Hi,
Some Indian meter manufacturers don't implement capture objects because they are defined on IS 15959.
If your meter returns an empty array you must add all objects as defined in IS 15959_P3.
BR,
Mikko
Hi Now we can read the…
Hi
Now we can read the Profile Generic data in readbyrange() method.
How can we readall() profile data?Can you please share the reference code.
Thanks.Your response is much appreciated.
Hi, Reading all profile…
Hi,
Reading all profile generic data might take a long time. This is how you do it.
Read(pg, 2);
BR,
Mikko
Profile Generic Read All…
BlockLoad Profile
We are unable to read Billing Profile because getting Byte[] objects.Can you please guide how to convert to value in Java?
Refer the Screenshot attached here Byte[0,1,2,3]. How to get the values from Byte[]?
Thanks. You response is very much appreciated.
Billing Profile Profile…
Billing Profile
We are unable to read Billing Profile because getting Byte[] objects.Can you please guide how to convert to value in Java?
Refer the Screenshot attached here Byte[0,1,2,3......]. How to get the values from Byte[]?
Thanks. You response is very much appreciated.
Hi, The byte array UI data…
Hi,
The byte array UI data type depends on the capture object.
In this case, you can set the data type to octet-string for the second object.
Something like:
GXClock clock = //Find clock object;
clock.setUIDataType(2, 2, DataType.OCTET_STRING);
You need to check the object type and attribute index because I don't know what you are reading.
BR,
Mikko
Reading the Billing Profile…
Reading the Billing Profile
We are reading the billing Profile.But getting Byte[] values. So how to convert this to in value in Android?
Please share the complete code.
Thanks. Your response is much appreciated
Hi, As I told you earlier…
Hi,
As I told you earlier you need to add capture objects manually and set the UI data type for those objects. You can also loop all cells and if it's a byte array you can convert it to the desired format with GXDLMSClient.changeType -method like this.
byte[] data = (byte[]) your_data;
Object value = GXDLMSClient.changeType2(data, DataType.OCTET_STRING, true);
BR,
Mikko
We cant able to parse byte[]…
We cant able to parse byte[] values.Can you please help here? (Find screenshot)
Object val = value;
if (val instanceof byte[]) { // is not executing (in this case type is NONE)
DataType type = target.getUIDataType(attributeIndex);
if (type == DataType.DATETIME && ((byte[]) val).length == 5) {
type = DataType.DATE;
target.setUIDataType(attributeIndex, type);
}
if (type != DataType.NONE) {
val = changeType((byte[]) value, type, settings);
}
}
Thanks . Your response is much appreciated.
Hi, This looks like date…
Hi,
This looks like date-time data. You need to set GXDLMSClock object to the first object in the capture objects. You can also convert it like this:
Object value = GXDLMSClient.changeType2(data, DataType.DATE_TIME, true);
BR,
Mikko
Can't able to read "NaN"…
Can't able to read "NaN" Values.
Getting "Device reports a Unavailable object" Error.
Please find the attached screen here.
Thanks. Your response is much appreciated.
Can't able to read the…
Can't able to read the Values
We can able to read Pos 0(Billing Date - Screen attached). But We can't able read Pos 1(Average power factor billing period - Screen attached) Getting "Device reports a Unavailable object" Error.
We need to read multiple column values with table in Android app as like in DLMSDirector.
Thanks. Your response is much appreciated.
Hi, An unavailable object…
Hi,
An unavailable object should mean that the OBIS code is wrong, but I believe that in your case you try to read it using readRowsByRange or readRowsByEntry and the meter doesn't support that.
Read meter rata in the same way as you are doing with GXDLMSDirector.
BR,
Mikko
Yes we are using…
Yes we are using readrowsbyrange()
How can we use the following methods in Android?
1.Read
2.Read last
3. Read all
these options will work in DLMSDirector.But in Android we dont know these API's?Can you please send the reference?
Thanks. Your response is much appreciated.
Can you please reply?
Hi, You use Read to read all…
Hi,
You use Read to read all values. You use readrowsbyrange to read values from a given date-time. If you want to read the last seven days, you set the start time to now minus seven days.
BR,
Mikko
Translating PDU to XML will…
Translating PDU to XML will getting <Data> Tag only
Please help me this conversion is wrong? What we missing here?
Please refer the attached screen
Thanks. Your response is much appreciated
Hi, Please, don't add pics…
Hi,
Please, don't add pics. They are hard to read. Plain text is better.
Your PDU is not complete. Have you set block cipher and authentication keys for your code? I believe it's better if you read your meter with GXDLMSDirector first.
You can easily set all meter settings and it's easier to verify communication.
BR,
Mikko
Please help to solve this…
Please help to solve this.
This is RAW data for Profile Generic : (Get it from DLMSDirector view Log)
7E A0 5F 03 41 74 25 C7 E6 E6 00 C8 51 30 00 00 00 03 66 EE 83 B2 AA B0 FD 3D E3 92 CF 40 33 08 21 63 CD 43 77 44 0D A1 ED DA FF D7 D4 CB CA CC 51 15 92 14 06 9A 64 9F 4D E8 22 7D 50 8E 03 62 FD 7D 2E B3 E8 B2 28 C9 31 45 F1 50 0F 20 AD 6D E1 1C 89 8A 83 08 E1 95 18 4C 7C E6 13 D0 5A E9 7E
After this Translating in DLMSDirector will getting this.
BlockCipher key: 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62
Authentication Key:62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62
1: 7E A0 5F 03 41 74 25 C7 E6 E6 00 C8 51 30 00 00 00 03 66 EE 83 B2 AA B0 FD 3D E3 92 CF 40 33 08 21 63 CD 43 77 44 0D A1 ED DA FF D7 D4 CB CA CC 51 15 92 14 06 9A 64 9F 4D E8 22 7D 50 8E 03 62 FD 7D 2E B3 E8 B2 28 C9 31 45 F1 50 0F 20 AD 6D E1 1C 89 8A 83 08 E1 95 18 4C 7C E6 13 D0 5A E9 7E
<HDLC len="5E" >
<TargetAddress Value="1" />
<SourceAddress Value="20" />
<FrameType Value="74" />
<PDU>
<!-- Invocation Counter: 3 -->
<!-- Decrypt data: C0 01 C1 00 07 00 00 5E 5B 0A FF 02 01 01 02 04 02 04 12 00 08 09 06 00 00 01 00 00 FF 0F 02 12 00 00 09 0C 07 E3 0A 09 03 0F 2A 01 FF FE B6 00 09 0C 07 E3 0A 0B 05 0F 2A 01 FF FE B6 00 01 00
<GetRequest>
<GetRequestNormal>
# Priority: High, ServiceClass: Confirmed, Invoke ID: 1
<InvokeIdAndPriority Value="C1" />
<AttributeDescriptor>
# ProfileGeneric
<ClassId Value="0007" />
# 0.0.94.91.10.255
<InstanceId Value="00005E5B0AFF" />
<AttributeId Value="02" />
</AttributeDescriptor>
<AccessSelection>
<AccessSelector Value="01" />
<AccessParameters>
<Structure Qty="04" >
<Structure Qty="04" >
<UInt16 Value="0008" />
# 0.0.1.0.0.255
<OctetString Value="0000010000FF" />
<Int8 Value="02" />
<UInt16 Value="0000" />
</Structure>
# 09-10-2019 03:42:01 PM+05:30
<OctetString Value="07E30A09030F2A01FFFEB600" />
# 11-10-2019 03:42:01 PM+05:30
<OctetString Value="07E30A0B050F2A01FFFEB600" />
<Array Qty="00" >
</Array>
</Structure>
</AccessParameters>
</AccessSelection>
</GetRequestNormal>
</GetRequest>
-->
<glo_GetRequest Value="300000000366EE83B2AAB0FD3DE392CF4033082163CD4377440DA1EDDAFFD7D4CBCACC51159214069A649F4DE8227D508E0362FD7D2EB3E8B228C93145F1500F20AD6DE11C898A8308E195184C7CE613D0" />
</PDU>
</HDLC>
The above this will take "Value" is converting to PDU XML
Value="300000000366EE83B2AAB0FD3DE392CF4033082163CD4377440DA1EDDAFFD7D4CBCACC51159214069A649F4DE8227D508E0362FD7D2EB3E8B228C93145F1500F20AD6DE11C898A8308E195184C7CE613D0"
to
After this convertion just added "<DATA>" tag only.Please see the below
<Data ="300000000366EE83B2AAB0FD3DE392CF4033082163CD4377440DA1EDDAFFD7D4CBCACC51159214069A649F4DE8227D508E0362FD7D2EB3E8B228C93145F1500F20AD6DE11C898A8308E195184C7CE613D0"
We are doing in DLMSDirector.And Security,Authentication is Done.
Can you please help,how to get the XML data with keys? What we missed here?
Thanks. Your Response is much appreciated.
Hi, This is a normal read-by…
Hi,
This is a normal read-by range where you have set the start and end times.
09-10-2019 03:42:01 PM+05:30
You can do this with Anrdoid after you have set the BlockCipher and Authentication keys You also need to change Security to AuthenticationEncryption.
If you have the correct keys, you can get the data from the buffer of the profile generic.
Try to read e.g. the clock first.
BR,
Mikko
We can read the "Nameplate…
Can you please reply here?
We can read the "Nameplate Profile" from the Android App
readDLMSPacket()
{
GXCommon.bytesToHex(data)
}
Value is = "7E A0 5F 03 41 74 25 C7 E6 E6 00 C8 51 30 00 00 00 03 66 EE 83 B2 AA B0 FD 3D E3 92 CF 40 33 08 21 63 CD 43 77 44 0D A1 ED DA FF D7 D4 CB CA CC 51 15 92 14 06 9A 64 9F 4D E8 22 7D 50 8E 03 62 FD 7D 2E B3 E8 B2 28 C9 31 45 F1 50 0F 20 AD 6D E1 1C 89 8A 83 08 E1 95 18 4C 7C E6 13 D0 5A E9 7E"
While translating to PDU getting the value this
"300000000278C8469D5A2A607D0768927A7DB5C0205EF24C75D757FA9112FFBA464B147A66AE28AAAD475352BB226826BC12924B68CE1C9E3FF0B021140F947A96BFBB3946E0163B968BC2C47E7CC90AA3"
Converting the above PDU to XML in DLMSTranslator is not getting XML value.
Authentication successfully added.
Can you please help here?
Thanks. Your response is much appreciated.
How to get the View Log file…
How to get the View Log file in Android
We get the View Log file in DLMSDirector. Same like we need viewlog file in Android. Kindly help this.
Thanks.
Hi, You need to set the…
Hi,
You need to set the correct block cipher and authentication keys to encrypt this.
Make sure that you have enable the comments.
setComments(true);
BR,
Mikko
Thanks for your reply. We…
Thanks for your reply.
We have added the block cipher and authentication keys, comments . But getting the same.
val translator = GXDLMSTranslator(TranslatorOutputType.SIMPLE_XML)
translator.blockCipherKey = Same like in DLMSDirector
translator.authenticationKey = Same like in DLMSDirector
translator.systemTitle = Same like in DLMSDirector
translator.isComments = true
Thanks. Your response is much appreciated.
Can you please reply?
Can you please reply?