New release code

4 posts / 0 new
Last post
vamsi
New release code

Hi mikko ,

I used gurux new release and did the basi changes of

com /dev/ttyUSB0 and CGXDLMSClient cl(true)

i am getting the below error

InitializeConnection
<- 07:13:26 7E A0 07 03 21 93 0F 01 7E
-> 07:13:27 A0 1E 21 03 73 C3 7A 81 80
<- 07:13:27 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 40 1E 1D FF FF E7 25 7E
-> 07:13:27 7E 1E 21 03 73 C3 7A 81 80 12 05 01 80 06 01 80 07 04 00 00 00 01 08 04 00 00 00 01 53 3B 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00
AARQRequest failed 258.
InitializeConnection failed Invalid parameter..

if i commented

if ((ret = comm.InitializeConnection()) != 0)
{
TRACE("InitializeConnection failed %s.\r\n", CGXDLMSConverter::GetErrorMessage(ret));
// return 1;
}
CGXDLMSObjectCollection Objects;
if ((ret = comm.GetObjects(Objects)) != 0)
{
TRACE("InitializeConnection failed %s.\r\n", CGXDLMSConverter::GetErrorMessage(ret));
// return 1;
}

fallowing return 1

getting the below error

InitializeConnection
<- 07:14:42 7E A0 07 03 21 93 0F 01 7E
-> 07:14:42 7E 00 00 00 00 00 00 00 00
<- 07:14:42 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 40 1E 1D FF FF E7 25 7E
-> 07:14:42 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
AARQRequest failed 258.
InitializeConnection failed Invalid parameter..
GetAssociationView
<- 07:14:42 7E A0 19 03 21 32 6F D8 E6 E6 00 C0 01 C1 00 0F 00 00 28 00 00 FF 02 00 91 53 7E
-> 07:14:42 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
<- 07:14:42 7E A0 07 03 21 51 11 E4 7E
-> 07:14:42 7E 00 00 00 00 00 00 00 00
<- 07:14:42 7E A0 13 03 21 74 F3 23 E6 E6 00 C0 02 C1 00 00 00 01 51 BE 7E
-> 07:14:42 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
<- 07:14:42 7E A0 07 03 21 91 1D 22 7E
-> 07:14:42 7E 00 00 00 00 00 00 00 00
<- 07:14:42 7E A0 13 03 21 B6 ED C6 E6 E6 00 C0 02 C1 00 00 00 02 CA 8C 7E
-> 07:14:43 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
<- 07:14:43 7E A0 07 03 21 D1 19 60 7E
-> 07:14:43 7E 08 00 00 00 00 00 00 00
<- 07:14:43 7E A0 13 03 21 F8 97 6D E6 E6 00 C0 02 C1 00 00 00 03 43 9D 7E
terminate called after throwing an instance of 'std::length_error'
what(): basic_string::_S_create
Aborted

please guide us to over come this error

kurumi
kurumi's picture
New release code

Hi,

You must read data until packet is ready. GXDLMSClient::GetData return DLMS_ERROR_CODE_FALSE if all data is not send.

Check ReadDLMSPacket method.

BR,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org

vamsi
New release code

Hi Mikko ,

I checked with the ReadDLMSPacket method. I found the issue now its working fine with index 3 Thank you very much for your support.

Thanks,
pushpa from cyient team

kurumi
kurumi's picture
New release code

Hi Pushpa,

Nice to hear. Happy coding.

BR,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org