In the "apdu.c" file, the "apdu_parseUserInformation" function has a problem,
In the case, lines 538 to 567 must be replaced with the following code,
//---------------------------------------------------------------------
// Optional usage field of the proposed quality of service component
if ((ret = bb_getUInt8(data, &tag)) != 0)
{
return ret;
}
// Skip if used.
if (tag != 0)
{
if ((ret = bb_getUInt8(data, &settings->qualityOfService)) != 0)
{
return ret;
}
}
// Optional usage field of the negotiated quality of service
// component
if ((ret = bb_getUInt8(data, &tag)) != 0)
{
return ret;
}
// Skip if used.
if (tag != 0)
{
if ((ret = bb_getUInt8(data, &len)) != 0)
{
return ret;
}
data->position = (data->position + len);
}
//---------------------------------------------------------------------
There is no length in QualityOfService because it's a byte. Can you tell me why you want to change this?
Your changes will work when QualityOfService is not used, but otherwise, it fails.
This code was originally like this, then corrected in the previous message,
---------------------------------------------------------------------------
// Optional usage field of the negotiated quality of service
// component
if ((ret = bb_getUInt8(data, &tag)) != 0)
{
return ret;
}
// Skip if used.
if (tag != 0)
{
if ((ret = bb_getUInt8(data, &len)) != 0)
{
return ret;
}
data->position = (data->position + len);
}
// Optional usage field of the proposed quality of service component
if ((ret = bb_getUInt8(data, &tag)) != 0)
{
return ret;
}
// Skip if used.
if (tag != 0)
{
if ((ret = bb_getUInt8(data, &settings->qualityOfService)) != 0)
{
return ret;
}
}
---------------------------------------------------------------------------
For example, in the analysis of the following line, an error was created,
because "QualityOfService" is a byte,
---------------------------------------------------------------------------
00 01 00 01 00 01 00 39 60 37 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 11 04 0F 01 00 01 01 00 06 5F 1F 04 00 60 BE DD 04 00
---------------------------------------------------------------------------
I have no problem to used gateway when security select "none",
but Gateway bytes are not added to Gateway.NetworkId and Gateway.PhysicalDeviceAddress when i am select "AuthenticationEncryption",
Hi Mahsen,
Hi Mahsen,
There is no length in QualityOfService because it's a byte. Can you tell me why you want to change this?
Your changes will work when QualityOfService is not used, but otherwise, it fails.
BR,
Mikko
This code was originally like
Hi
This code was originally like this, then corrected in the previous message,
---------------------------------------------------------------------------
// Optional usage field of the negotiated quality of service
// component
if ((ret = bb_getUInt8(data, &tag)) != 0)
{
return ret;
}
// Skip if used.
if (tag != 0)
{
if ((ret = bb_getUInt8(data, &len)) != 0)
{
return ret;
}
data->position = (data->position + len);
}
// Optional usage field of the proposed quality of service component
if ((ret = bb_getUInt8(data, &tag)) != 0)
{
return ret;
}
// Skip if used.
if (tag != 0)
{
if ((ret = bb_getUInt8(data, &settings->qualityOfService)) != 0)
{
return ret;
}
}
---------------------------------------------------------------------------
For example, in the analysis of the following line, an error was created,
because "QualityOfService" is a byte,
---------------------------------------------------------------------------
00 01 00 01 00 01 00 39 60 37 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 11 04 0F 01 00 01 01 00 06 5F 1F 04 00 60 BE DD 04 00
---------------------------------------------------------------------------
Mahsen
Hi Mahsen,
Hi Mahsen,
You are right. You need to remove this line:
data->position = (data->position + len);
Tests are started and we are releasing a new version where this is fixed tomorrow.
BR,
Mikko
Hi I'm glad I helpedŲ Mahsen
Hi
I'm glad I helped
Mahsen
Hi
Hi
Why GXDLMSDirector wrapper remove "gateway bytes" when using "gateway" and "encryption" together in the request?
Mahsen
Hi,
Hi,
Gateway bytes are added to Gateway.NetworkId and Gateway.PhysicalDeviceAddress.
The reason is to try to make it easier to use.
BR,
Mikko
Hi,
Hi,
I have no problem to used gateway when security select "none",
but Gateway bytes are not added to Gateway.NetworkId and Gateway.PhysicalDeviceAddress when i am select "AuthenticationEncryption",
Mahsen
Hi Mahsen,
Hi Mahsen,
Are you using a real gateway or our server simulator? I need to check are NetworkId and PhysicalDeviceAddress encrypted.
BR,
Mikko