Hi
I have to create android app which will read DLMS based meter data. Pls suggest me from where i can start. Im new in dlms protocol, first i have to prepare the communication between meter and mobile device. I'm not able to create the channel between meter and mobile through optical strobe
Hi..
I'm able to read data, but now problem is how can convert byte array return by meter as a reply to actual data. If class id is 8 then i have to convert byte array to decimal value for datetime.
Hi ..
Pls help me, i got the data in byte array for meter serial number and Clock. But both parameters have data type returned by meter is 'OCTETString' so now how can get the actual value, because for MSN is a ascii value and clock parameter is in decimal.
Hi Mikko,
I want to read register parameter just say "Cumulative Energy – kWh" ...
I have initialise GXDLMSRegister("1.0.1.8.0.255"), im getting response from the meter but im getting NONE for the unit.
hi mikko
Im using GXDLMSDirector to read meter paramter, im getting this reply from meter in the trace:
29/06/2018 12:37:06 PM
<HDLC len="9" >
<TargetAddress Value="1" />
<SourceAddress Value="20" />
<FrameType Value="93" />
<Snrm>
</Snrm>
</HDLC>
Hey Mikko,
Mine problem is I dont know how to read profile generic.. below is the code i have write:
try {
//readObject((GXDLMSProfileGeneric) obj, 2);
GXReplyData reply_data = new GXReplyData();
byte[][] temp;
temp = mClient.read((GXDLMSProfileGeneric) obj, 3);
for (byte[] it : temp) {
readDataBlock(temp, reply_data);
}
byte[][] temp1 = mClient.read((GXDLMSProfileGeneric) obj, 2);
for (byte[] it : temp1) {
readDataBlock(temp1, reply_data);
}
} catch (Exception e) {
e.printStackTrace();
}
Select serial port first
Code is returning select serial port first in toast
From where to start
Hi,
You need optical head or USB to serial port converter to read your meter. I believe you don't have that installed at the moment.
BR,
Mikko
Im able to read data
Hi..
I'm able to read data, but now problem is how can convert byte array return by meter as a reply to actual data. If class id is 8 then i have to convert byte array to decimal value for datetime.
Im able to read data
Mine problem is to interpret data returned by the meter.
From where to start
Hello,
You should check those:
http://www.gurux.fi/DLMSCOSEMFAQ
http://www.gurux.fi/Gurux.DLMS.Client
Getting data
Hi ..
Pls help me, i got the data in byte array for meter serial number and Clock. But both parameters have data type returned by meter is 'OCTETString' so now how can get the actual value, because for MSN is a ascii value and clock parameter is in decimal.
Scaler unit
how to read Scaler unit of any particular parameter
Reading data
Hi,
Date time is returned in OctectString. You need to convert it to the dateTime format.
GXDLMSClient.ChangeType -method.
Scaler and unit are in attribute index 3 of register object.
BR,
Mikko
Thank you!
Hi Mikko,
First, Thank you!
Im able to get actual meter's datetime. But not able to figure out where is scalar and unit values.
readObject(obj, it);
readObject(obj, it);
if (obj.getObjectType() == ObjectType.CLOCK) {
Object obj1 = GXDLMSClient.changeType((byte[]) obj.getValues()[1], DataType.DATETIME);
Log.i("Datetime", String.valueOf(obj1));
}
is this the right way? to get byte array of response
Reading data
Hi,
If your object is clock it's done automatically.
GXDLMSClock c = new GXDLMSClock();
readObject(obj, 2);
BR,
Mikko
Reading of register
Hi Mikko,
I want to read register parameter just say "Cumulative Energy – kWh" ...
I have initialise GXDLMSRegister("1.0.1.8.0.255"), im getting response from the meter but im getting NONE for the unit.
Reading of register
Hi,
Try to read that with GXDLMSDirector. If the result is the same, your meter is set the unit to NONE.
BR,
Mikko
Failed to recieve reply in given time
hi mikko
Im using GXDLMSDirector to read meter paramter, im getting this reply from meter in the trace:
29/06/2018 12:37:06 PM
<HDLC len="9" >
<TargetAddress Value="1" />
<SourceAddress Value="20" />
<FrameType Value="93" />
<Snrm>
</Snrm>
</HDLC>
29/06/2018 12:37:13 PM
<HDLC len="9" >
<TargetAddress Value="1" />
<SourceAddress Value="20" />
<FrameType Value="53" />
<DisconnectRequest>
</DisconnectRequest>
</HDLC>
Pls help
regards
Bhavjinder
Failed to recieve reply in given time
Hi,
Try to change client address to 10.
BR,
Mikko
Connection is permanently rejected. No reason is given.
Hi Mikko... below is the response im getting :
<HDLC len="9" >
<TargetAddress Value="1" />
<SourceAddress Value="20" />
<FrameType Value="93" />
<Snrm>
</Snrm>
</HDLC>
02/07/2018 12:13:41 PM
<HDLC len="1E" >
<TargetAddress Value="20" />
<SourceAddress Value="1" />
<FrameType Value="73" />
<PDU>
<Ua>
<MaxInfoTX Value="256" />
<MaxInfoRX Value="128" />
<WindowSizeTX Value="1" />
<WindowSizeRX Value="1" />
</Ua>
</PDU>
</HDLC>
02/07/2018 12:13:41 PM
<HDLC len="43" >
<TargetAddress Value="1" />
<SourceAddress Value="20" />
<FrameType Value="10" />
<PDU>
<AssociationRequest>
<ApplicationContextName Value="LN" />
<SenderACSERequirements Value="1" />
<MechanismName Value="Low" />
<CallingAuthentication Value="4142434430303031" />
<InitiateRequest>
<ProposedDlmsVersionNumber Value="06" />
<ProposedConformance>
<ConformanceBit Name="MultipleReferences" />
</ProposedConformance>
<ProposedMaxPduSize Value="FFFF" />
</InitiateRequest>
</AssociationRequest>
</PDU>
</HDLC>
02/07/2018 12:13:41 PM
<HDLC len="2C" >
<TargetAddress Value="20" />
<SourceAddress Value="1" />
<FrameType Value="30" />
<PDU>
<AssociationResponse>
<ApplicationContextName Value="LN" />
<AssociationResult Value="01" />
<ResultSourceDiagnostic>
<ACSEServiceUser Value="01" />
</ResultSourceDiagnostic>
<ConfirmedServiceError>
<Service Value="01" />
<ServiceError>
<Initiate Value="IncompatibleConformance" />
</ServiceError>
</ConfirmedServiceError>
</AssociationResponse>
</PDU>
</HDLC>
02/07/2018 12:13:41 PM
<HDLC len="1E" >
<TargetAddress Value="20" />
<SourceAddress Value="1" />
<FrameType Value="73" />
<PDU>
<Ua>
<MaxInfoTX Value="256" />
<MaxInfoRX Value="128" />
<WindowSizeTX Value="1" />
<WindowSizeRX Value="1" />
</Ua>
</PDU>
</HDLC>
Pls. help me...
Regards
Bhavjinder Singh
Connection is permanently rejected. No reason is given.
im using GXDLMSDirector
Scaler unit
Im getting scalar:1, unit:None what does this means.. im reading Instantaneous Frequency
getting error "invalid structure" exception on readObject
if (obj instanceof GXDLMSProfileGeneric) {
try {
readObject((GXDLMSProfileGeneric) obj, 3);
GXReplyData reply_data = new GXReplyData();
byte[][] temp;
temp = mClient.read((GXDLMSProfileGeneric) obj, 2);
readDataBlock(temp, reply_data);
} catch (Exception e) {
e.printStackTrace();
}
}
getting error "invalid structure" exception on readObject
Hi,
Are you reading profile generic or something else? Please, describe the problem better. I can't help if you copy only a few lines from the example.
BR,
Mikko
Im reading profile
Hi Mikko,
Im reading profile FOR INSTANTANEOUS PARAMETERS... first im reading capture object
readObject((GXDLMSProfileGeneric) obj, 3);
but im getting error on the above line as "invalid structure"
getting error "invalid structure" exception on readObject
Hi,
What meter are you trying to read? Can you post reply data from the meter? I can check it.
BR,
Mikko
Hey Mikko,
Hey Mikko,
Mine problem is I dont know how to read profile generic.. below is the code i have write:
try {
//readObject((GXDLMSProfileGeneric) obj, 2);
GXReplyData reply_data = new GXReplyData();
byte[][] temp;
temp = mClient.read((GXDLMSProfileGeneric) obj, 3);
for (byte[] it : temp) {
readDataBlock(temp, reply_data);
}
byte[][] temp1 = mClient.read((GXDLMSProfileGeneric) obj, 2);
for (byte[] it : temp1) {
readDataBlock(temp1, reply_data);
}
} catch (Exception e) {
e.printStackTrace();
}
Pls guide me ...i will be very thankful to you
Regards
Bhavjinder Singh