Skip to main content
Home
for DLMS smart meters

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
  • Gurux Club
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. Connection is permanently rejected The application context name is not supported.

Connection is permanently rejected The application context name is not supported.

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By MatiasP, 15 November, 2022
Forums
Gurux DLMS for Java

Hello Everyone, hello Gurux ppl, I'm doing this topic cause I'm facing an issue trying to connect with ITRON ACE6000 with the gurux dlms libraries "https://github.com/Gurux/gurux.dlms.java"

I'm able to connect with the meter using ACE PILOT also with GXDLMSDirector, and using the python code and setting the parameters in the console, but when I try to hardcode it (I'll put how I hardcoded the settings and what are the parameters given in GXDLMSDirector) I'm working with Java libraries but testing in paralell with python I guess it's the same?

the parameters given by the GXDLMSDirector : -h ********** -p 703 -c 1 -s 145 -a Low -P ABCDEFGH -w 1 -f 128 -t Verbose

and in Java I've hardcoded this:
settings.client.setUseLogicalNameReferencing(true);

// Host address.
net = (GXNet) settings.media;
net.setHostName("********");

// Trace.
settings.trace = TraceLevel.INFO;

// Port.
net.setPort(703);

// Password
settings.client.setPassword("ABCDEFGH");

// Interface type.
settings.client.setInterfaceType(InterfaceType.HDLC);

// AutoIncreaseInvokeID.
settings.client.setAutoIncreaseInvokeID(true);

// security
settings.client.getCiphering().getSecurityPolicy().clear();
settings.client.getCiphering().setSecurity(Security.AUTHENTICATION);

// Auth level
settings.client.setAuthentication(Authentication.LOW);

// Client Address
settings.client.setClientAddress(1);

// Server Address
settings.client.setServerAddress(145);

// Windows Size
settings.client.getHdlcSettings().setWindowSizeRX(1);
settings.client.getHdlcSettings().setWindowSizeTX(1);

// Max Payload
settings.client.getHdlcSettings().setMaxInfoRX(128);
settings.client.getHdlcSettings().setMaxInfoTX(128);

And I got this as result:

Authentication: Low
ClientAddress: 0x1
ServerAddress: 0x91
Standard: DLMS
Security: AUTHENTICATION
System title: 41 42 43 44 45 46 47 48
Authentication key: D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
Block cipher key 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
DisconnectRequest
Connection is permanently rejected
The application context name is not supported.

I'm literally doing the sample client but hardcoding the values instead of setting them by console.

I'm using Eclipse for development and the already said java libraries
https://github.com/Gurux/gurux.dlms.java

I would like to know what should I do or how I should continue,
Thnx in advance, kind regards.

Profile picture for user Kurumi

Kurumi

4 months 1 week ago

Hi,

Hi,

Set UseLogicalNameReferencing to true like this:
settings.client.setUseLogicalNameReferencing(true);

http://gurux.fi/Gurux.DLMS.ErrorCodes

BR,
Mikko

MatiasP

4 months 1 week ago

Hello, I've already coded

Hello, I've already coded that, If you see in the top of the other comment,

settings.client.setUseLogicalNameReferencing(true);

Profile picture for user Kurumi

Kurumi

4 months 1 week ago

Hi,

Hi,

Try to remove this. Your meter is not using ciphering.

settings.client.getCiphering().setSecurity(Security.AUTHENTICATION);

BR,
Mikko

MatiasP

4 months 1 week ago

Hi! It worked, (thnx a lot)

Hi! It worked, (thnx a lot) and it responded:

Proposed conformance:
[MULTIPLE_REFERENCES, SELECTIVE_ACCESS, ACCESS, GENERAL_PROTECTION, BLOCK_TRANSFER_WITH_SET_OR_WRITE, BLOCK_TRANSFER_WITH_GET_OR_READ, GET, BLOCK_TRANSFER_WITH_ACTION, ACTION, SET, DELTA_VALUE_ENCODING]
Negotiated conformance:
[SELECTIVE_ACCESS, GET, BLOCK_TRANSFER_WITH_GET_OR_READ, ACTION, SET]
MaxReceivePDUSize: 8500
DisconnectRequest
Invalid response.

It is because I was not responsing anything? I mean I'm literally using the client example but changing the settings to the one I have above.

Profile picture for user Kurumi

Kurumi

4 months 1 week ago

Hi,

Hi,

Can you add the hex trace from your client app so I can check what is invalid?

BR,
Mikko

MatiasP

4 months 1 week ago

Hi!

Hi!

I've been trying and I do get all the values from the meter (Using the client example), my question is now, how should I modify the code to receive only the obis I want? And what's the class or the correct procedure to read a list of selected obi?

Thnx in advance.

Profile picture for user Kurumi

Kurumi

4 months 1 week ago

Hi,

Hi,

There are two ways to do it.

1. Save association view to the file using -o argument. Then Use -g argument to read only needed attributes. Like this:
-g 0.0.1.0.0.2:2

2. Add only objects that you want to read.
Find getAssociationView and don't read the association view. Instead of reading only the values that you want. This example will read the date and time from the clock object.

GXDLMSClock clock = new GXDLMSClock("0.0.1.0.0.255");
read(clock, 2);

BR,
Mikko

MatiasP

4 months ago

Hello, I've been trying with

Hello, I've been trying with other things, sorry for late response.

What would be the read function/class, and what does the "2" point? I mean what's the class "read" where do I found it, searched on github and nothing.

Profile picture for user Kurumi

Kurumi

4 months ago

Hi,

Hi,

You will find read from here:
https://github.com/Gurux/gurux.dlms.java/blob/250a86fda9ec481aabf485fca…

#2 is the attribute index. For the clock object, it's date and time.
https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSClock

BR,
Mikko

MatiasP

4 months ago

Hi! I tried just reading

Hi! I tried just reading using what u tell me but I get this as response:
TX: 15:42:33.129 7E A0 1A 02 23 03 10 65 60 E6 E6 00 C0 01 C2 00 08 00 00 01 00 00 FF 02 00 D3 E4 7E
Data send failed. Try to resend 1/3
TX: 15:43:33.143 7E A0 1A 02 23 03 10 65 60 E6 E6 00 C0 01 C2 00 08 00 00 01 00 00 FF 02 00 D3 E4 7E
Data send failed. Try to resend 2/3
TX: 15:44:33.154 7E A0 1A 02 23 03 10 65 60 E6 E6 00 C0 01 C2 00 08 00 00 01 00 00 FF 02 00 D3 E4 7E

Do I have to send something else before?

Profile picture for user Kurumi

Kurumi

4 months ago

Hi,

Hi,

You need to establish the connection for the meter before you can read anything.

BR,
Mikko

Profile picture for user Kurumi

Kurumi

4 months ago

Hi,

Hi,

You need to establish the connection for the meter before you can read anything.

BR,
Mikko

MatiasP

3 months 3 weeks ago

Sorry I was working on

Sorry I was working on another project...

I'll show you what I've done...
reader.initializeConnection();
Is this correct to stablish a connection?

This is what I'm doing:

public class testconexion_local {

public static void main(String[] args) {

Settings_hardcoded settings = new Settings_hardcoded();
GXDLMSSecureClient2 client = new GXDLMSSecureClient2(true);
GXDLMSReader reader = null;{
GXDLMSSecureClient2 dlms = client;

try {
Settings_hardcoded.setParameters(settings);

// Initialize connection settings.
if (settings.media instanceof GXNet) {
System.out.println("Connect using network connection " + settings.media.toString());
}

reader = new GXDLMSReader(settings.client, settings.media, settings.trace,
settings.invocationCounter);
settings.media.open();

// Export client and server certificates from the meter.
if (settings.exportSecuritySetupLN != null) {
reader.exportMeterCertificates(settings.exportSecuritySetupLN);
}
// Generate new client and server certificates and import them to
// the server.
else if (settings.generateSecuritySetupLN != null) {
reader.generateCertificates(settings.generateSecuritySetupLN);
} else if (!settings.readObjects.isEmpty()) {
reader.initializeConnection();
boolean read = false;
if (settings.outputFile != null && new File(settings.outputFile).exists()) {
try {
GXDLMSObjectCollection c = GXDLMSObjectCollection.load(settings.outputFile);
settings.client.getObjects().addAll(c);
read = true;
} catch (Exception ex) {
// It's OK if this fails.
System.out.print(ex.getMessage());
}
}
if (!read) {
// reader.getAssociationView();
// if (settings.outputFile != null) {
// settings.client.getObjects().save(settings.outputFile,
// new GXXmlWriterSettings());
// }
}
for (Map.Entry<String, Integer> it : settings.readObjects) {
Object val = reader.read(
settings.client.getObjects().findByLN(ObjectType.NONE, it.getKey()),
it.getValue());
reader.showValue(it.getValue(), val);
}
} else {
reader.initializeConnection();
GXDLMSConverter c = new GXDLMSConverter(dlms.getStandard());
c.updateOBISCodeInformation(dlms.getObjects());
// reader.readAll(settings.outputFile);
GXDLMSClock clock = new GXDLMSClock("0.0.1.0.0.255");
reader.read(clock, 2);
}
} catch (Exception ex) {
// System.out.println("Exception Last");

System.out.println(ex.getMessage());
System.exit(1);
} finally {
if (reader != null) {
try {
reader.close();
} catch (Exception e) {
System.out.println(e.getMessage());
System.exit(1);
}
}
// System.out.println("Ended. Press any key to continue.");
}
}
}
}

And I'm getting right now:

Connect using network connection gurux.net.GXNet@67424e82
Authentication: Low
ClientAddress: 0x1
ServerAddress: 0x91
Standard: DLMS
TX: 15:08:04.666 7E A0 08 02 23 03 93 3E 74 7E
RX: 15:08:04.736 7E A0 23 03 00 02 00 23 73 C0 48 81 80 14 05 02 00 80 06 02 00 80 07 04 00 00 00 01 08 04 00 00 00 01 CE 6A 7E
TX: 15:08:04.739 7E A0 45 02 23 03 10 FB 7F E6 E6 00 60 36 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 41 42 43 44 45 46 47 48 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 42 1E 5D FF FF C5 D3 7E
RX: 15:08:04.852 7E A0 53 03 00 02 00 23 30 13 29 E6 E7 00 61 42 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 88 02 07 80 89 07 60 85 74 05 08 02 01 AA 0A 80 08 41 42 43 44 45 46 47 48 BE 10 04 0E 08 00 06 5F 1F 04 00 00 10 1D 21 34 00 07 9A C7 7E
----------------------------
Proposed conformance:
[SELECTIVE_ACCESS, ACTION, DELTA_VALUE_ENCODING, ACCESS, BLOCK_TRANSFER_WITH_ACTION, BLOCK_TRANSFER_WITH_GET_OR_READ, BLOCK_TRANSFER_WITH_SET_OR_WRITE, MULTIPLE_REFERENCES, SET, GENERAL_PROTECTION, GET]
Negotiated conformance:
[SELECTIVE_ACCESS, ACTION, BLOCK_TRANSFER_WITH_GET_OR_READ, SET, GET]
MaxReceivePDUSize: 8500
TX: 15:08:04.886 7E A0 1A 02 23 03 32 75 62 E6 E6 00 C0 01 C1 00 08 00 00 01 00 00 FF 02 00 60 1A 7E
RX: 15:08:04.953 7E A0 21 03 00 02 00 23 52 F0 4F E6 E7 00 C4 01 C1 00 09 0C 07 E6 0B 1D 02 0F 08 08 FF 80 00 00 A7 05 7E
DisconnectRequest
TX: 15:08:04.954 7E A0 08 02 23 03 53 32 B2 7E
RX: 15:08:04.991 7E A0 0A 03 00 02 00 23 73 7A 6A 7E

is that conformance proposed a way to communicate? how to I set it? Should it be GET?

Thnx in advance!

Profile picture for user Kurumi

Kurumi

3 months 3 weeks ago

Hi,

Hi,

You are successfully reading the date and time of the clock object from the meter. So everything looks OK.

BR,
Mikko

MatiasP

3 months 3 weeks ago

Which one of these hex values

Which one of these hex values it's the date and time?

Also there's a guide to parse all of the data? since putting info shows nothing, It looks like I have to parse the hex. btw, where's the when the program shows the data? so I can get the hex string of the response and parse it

Thnx !

MatiasP

3 months 3 weeks ago

I understand that this is the

I understand that this is the response?

7E A0 21 03 00 02 00 23 30 E4 0F E6 E7 00 C4 01 C1 00 09 0C 07 E6 0B 1E 03 09 22 10 FF 80 00 00 DC 48 7E

But I tried converting into ascii, decimal, and I don't get it?

Sorry for all the questions, also thanks you so much!

MatiasP

3 months 3 weeks ago

Btw, what does Proposed

Btw, what does Proposed conformance:
[SELECTIVE_ACCESS, ACTION, DELTA_VALUE_ENCODING, ACCESS, BLOCK_TRANSFER_WITH_ACTION, BLOCK_TRANSFER_WITH_GET_OR_READ, BLOCK_TRANSFER_WITH_SET_OR_WRITE, MULTIPLE_REFERENCES, SET, GENERAL_PROTECTION, GET]
Negotiated conformance:
[SELECTIVE_ACCESS, ACTION, BLOCK_TRANSFER_WITH_GET_OR_READ, SET, GET]

Means, Is there a way to not show it without putting Trace on Trace.INFO?

It does automatically set that, how can I Change it?

I hope o could answer all of my Questions!

Thnx

MatiasP

3 months 3 weeks ago

Also I have to read Those

Also I have to read Those obis:

Accumulated imported Active Power: 1.1.1.7.0.255
Accumulated imported Reactive Power: 1.1.3.7.0.255
Average power factor: 1.1.13.7.0.255
Voltage of the 3 phases to neutral: 1.1.32.7.0.255/1.1.52.7.0.255/1.1.72.7.0.255
Current in the 3 phases: 1.1.31.7.0.255/1.1.51.7.0.255/1.1.71.7.0.255
Accumulated Exported Active Energy: 1.1.2.7.0.255
Q1 Energy: 1.1.5.8.0.255
Q2 Energy: 1.1.6.8.0.255
Q3 Energy: 1.1.7.8.0.255
Q4 Energy: 1.1.8.8.0.255
Serial number: 0.0.96.1.0.255
Date and time: 0.0.1.0.0.255

Since the clock has "clock" object, what objects should I Use for all the other obis? It's one specific for each, or there's one that is general for obis?

Thnx.

Profile picture for user Kurumi

Kurumi

3 months 3 weeks ago

Hi,

Hi,

You need to print clock's time property. The reply you are receiving from the meter is including PDU. This PDU includes the read value. There is no simple way to get the value from the meter reply.

Proposed conformance tells what kind of services the client wants to use. Negotiated conformanc tells what services the meter allows to use. A list of the conformances is available here:
https://www.gurux.fi/Gurux.DLMS.Conformance

I believe that those are register objects, but read your meter with GXDLMSDirector. On the left side of GXDLMSDirector you can see the association view that tells what are the object types.
If you use the wrong object type or invalid Logical name the meter returns an error.

BR,
Mikko

MatiasP

3 months 3 weeks ago

Hi again!

Hi again!
Thanks for asking all of my questions, I noticed the last answer yesterday by myself, I'm using Data to check (e.g. the serial number).

And about print clock's time property, I see that I'm receiving the PDU too, how should I do to not receive it or print correctly the time? or the others values? Should i Translate the hex to ascii, or to decimal?

I used GXDLMSDirector and use the trace option > hex and I receive almost the same string, but Idk how the GXDLMSDirector pass from this

7E A0 21 03 00 02 00 23 30 E4 0F E6 E7 00 C4 01 C1 00 09 0C 07 E6 0B 1E 03 09 22 10 FF 80 00 00 DC 48 7E

to this:

1/12/2022 09:24

That's the last thing I've to understand

Profile picture for user Kurumi

Kurumi

3 months 3 weeks ago

Hi,

Hi,

There is no easy way to get the date-time from the frame. You should get PDU from the HDLC frame and then get the value from the PDU.
https://www.gurux.fi/GuruxDLMSTranslator?translate=7EA021030002002330E4…

You can print the clock value like this:
GXDLMSClock clock = new GXDLMSClock("0.0.1.0.0.255");
reader.read(clock, 2);
Console.WriteLine(clock.Time);

Time is the second attribute of the clock object.
https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSClock

BR,
Mikko

MatiasP

3 months 3 weeks ago

Hi Again! I'm using the

Hi Again! I'm using the .getvalue of the objects, is it correct?

I'm doing this:

GXDLMSClock clock = new GXDLMSClock("0.0.1.0.0.255");
reader.read(clock, 2);
System.out.println("///////////////////////////////// Hora y Fecha:" + clock.getTime() + " /////////////////////////////////");

GXDLMSData data = new GXDLMSData("0.0.96.1.0.255");
ValueEventArgs Index = new ValueEventArgs(data, 2, 0, null);
Index.setIndex(2);
reader.read(data, 2);
System.out.println("///////////////////////////////// Numero de serie: " + data.getValue(settings_data, Index) + "///////////////////////////////");

and getting the correct values of date-time and serial number. So it should work this way?

Also I've a question, in GXDLMSDirector I've trying to read the QX's (e.g. Ch. 1 Sum Li Reactive power QI Time integral 1 Rate 15 (0 is total)"

I'm getting 0, and it says "0 is total" what does that mean?

Thank you so much I appreciate all the info and the help you've been giving to me!

Profile picture for user Kurumi

Kurumi

3 months 3 weeks ago

Hi,

Hi,

Use it like this:
GXDLMSData data = new GXDLMSData("0.0.96.1.0.255");
reader.read(data, 2);
Console.WriteLine(data.getValue().ToString());

Zero means total reactive power for all phases.

BR,
Mikko

MatiasP

3 months 3 weeks ago

Right! I didn't check that i

Right! I didn't check that i could do it with getValue() without parameters,

Thnx!

MatiasP

3 months ago

Hi Again! After all the time,

Hi Again! After all the time, I've been working with some projects also with this...

I've new questions...

Is there a list of the obis for the ACE6000 661? Because in the association view it's not clear the name of the obi/register, so I would like to know if there's a official list so I can see all the obis for the things I've to read...

Also, Is there a obi/register to control the meter? Like turning off or on it?

Like always, thnx in advance.

Profile picture for user Kurumi

Kurumi

3 months ago

Hi,

Hi,

The objects might vary between the meter models. You need to ask for a list from the meter vendor.

I can't remember if there is a disconnect control on ACE 6000. Use GXDLMSDirector to read the association view and you can see all the objects.

BR,
Mikko

MatiasP

3 months ago

I mean not disconnect from

I mean not disconnect from the metter, but turning it off?

Thnx for the answer, I'v been searching to communicate with Itron but they don't have an "easy" way to communicate so I'm gonna have to call my client so they ask them.

Profile picture for user Kurumi

Kurumi

3 months ago

Hi,

Hi,

Yes, you can use disconnect control to turn it off, if that is implemented for the meter.
All the meters don't support this feature.

BR,
Mikko

MatiasP

3 months ago

And In case the meter CAN

And In case the meter CAN disconnect* could I turn it on by some way, sending him messages, or how could I do it?

Profile picture for user Kurumi

Kurumi

3 months ago

Hi,

Hi,

You can get the example from here:

https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSDisconnectControl

BR,
Mikko

MatiasP

2 months 3 weeks ago

Hi again Mikko, how are you?

Hi again Mikko, how are you?

I've been trying to do it with the GXDLMSDirector, but I cannot change the mode, it returns to "Mode 1", I tried with both channels, and tried to change to all modes, but It doesn't let me write, and If I try to "Disconnect" or "Reconnect" it says "HARDWARE FAULT"

May you clarify this to me?

Thnx In advance!

Image
Profile picture for user Kurumi

Kurumi

2 months 3 weeks ago

Hi,

Hi,

You need to ask why "Disconnect" or "Reconnect" fails from the meter vendor. It might be that you don't have enough access rights, or there is another problem with the meter.

"Disconnect" and "Reconnect" are very easy to use and usually, the meter should work right away if you have enough access rights to change them.

BR,
Mikko

MatiasP

2 months 3 weeks ago

Hi!

Hi!
How do I know I do have access rights or how do I give them to myself?

Kind regards.

Profile picture for user Kurumi

Kurumi

2 months 3 weeks ago

Hi,

Hi,

Each association view has its own access rights and you can't modify them. The meter gives access rights to you.

You can see access rights easily with GXDLMSDirector. Establish the connection for the meter and then select "Refresh". Then select the wanted object and you can see the access rights by selecting the "Access rights" tab. If you need to invoke an action you can see them in the "Method Access Rights" tab.

BR,
Mikko

MatiasP

4 weeks ago

Hi again! I'm working on…

Hi again!

I'm working on this again, and I've to read the maximum demand (1.1.1.6.X.255) X: 1/2/3
For the three rates, but I try to search it on gxdlms director and I don't find it, I tried to just read it using that obi code 1.1.1.6.1.255 and extended or normal register but doesn't work...

What should i do?
Where's the max demand (1.1.1.6.1.255, 1.1.1.6.2.255 and 1.1.1.6.3.255) on gurux?

  • Log in or register to post comments
  • Create new account
  • Reset your password

Hire Us!

Latest Releases

Fri, 03/24/2023 - 14:22
gurux.dlms.c 20230324.1
Thu, 03/23/2023 - 11:01
GXDLMSDirector 9.0.2303.2301
Thu, 03/23/2023 - 09:10
Gurux.DLMS.Python 1.0.142
Wed, 03/22/2023 - 13:51
Gurux.DLMS.Net 9.0.2303.2201
Wed, 03/22/2023 - 10:15
gurux.dlms.c 20230322.1

Open bugs

Gurux.DLMS.AMI4
1
Gurux.DLMS.Android
1
gurux.dlms.c
3
gurux.dlms.cpp
3
gurux.dlms.delphi
1
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin