Does the GXNet support the WRAPPER mode or must one manually wrap data to be sent over it in the correct WPDU format and then unwrap it before it arrives to GXNet somehow?
Because form looking at the code I don't see a lot of WPDU handling besides a call to setEop() in GXDLMSReader, is that all that is needed? Is the WPDU only 8 bytes?
I've been doing some digging and I am confusd as to what guruX's GXNet leaves to the user to do for WRAPPER mode and what it already (automatically?) does for us.
Currently stuck with getting message as shown below everytime:
[MeterManager/handleDeviceTrace] Just traced: gurux.net.GXNet@22ee1840 [B@148c9780
RX: 13:00:54.453 00 00 01 00 01 00 01 00 16 0A 02 10 43 4C 45 31 30 35 34 32 32 39 30 30 30 33 30 39 00 18 89
java.lang.IllegalArgumentException: Invalid data type: 67
true
None
NONE
SUITE_0
java.lang.IllegalArgumentException: Invalid data type: 67
at gurux.dlms.enums.DataType.forValue(DataType.java:192)
at gurux.dlms.internal.GXCommon.getData(GXCommon.java:524)
at gurux.dlms.internal.GXCommon.getArray(GXCommon.java:691)
at gurux.dlms.internal.GXCommon.getData(GXCommon.java:539)
at gurux.dlms.GXDLMSTranslator.dataToXml(GXDLMSTranslator.java:3371)
at za.co.ipay.commandercosem.controller.GXDLMSReader.readDLMSPacket(GXDLMSReader.java:230)
at za.co.ipay.commandercosem.controller.GXDLMSReader.readDataBlock(GXDLMSReader.java:289)
at za.co.ipay.commandercosem.controller.GXDLMSReader.readDataBlock(GXDLMSReader.java:275)
at za.co.ipay.commandercosem.controller.GXDLMSReader.initializeConnection(GXDLMSReader.java:416)
at za.co.ipay.commandercosem.controller.DeviceController.init(DeviceController.java:135)
at za.co.ipay.commandercosem.headend.ConnectionThread.run(ConnectionThread.java:46)
at java.lang.Thread.run(Thread.java:750)
za.co.ipay.commandercosem.controller.ControllerException: CCException: (CONNECTION_INIT_ERROR)
at za.co.ipay.commandercosem.controller.DeviceController.init(DeviceController.java:161)
at za.co.ipay.commandercosem.headend.ConnectionThread.run(ConnectionThread.java:46)
at java.lang.Thread.run(Thread.java:750)
[ConnThread] Error init()'ing the device controller: za.co.ipay.commandercosem.controller.ControllerException: CCException: (CONNECTION_INIT_ERROR)
[ConnThread] Disconnecting....
Disconnecting from the meter.
GXNet only sends and receives the data. You need to change Interface Type to WRAPPER for GXDLMSClient component. After that, you can communicate with WRAPPER.
So GXNet runs, then onClientConnected` gets a client GXNet using .attach(String).
After this I then use GXDLMSReader and initialize the connection using the client GXNet. I'm unsure if my authentication details are correct for the meter connecting to me - could that be a problem or would I have atleast gotten an error then - because this error seems odd.
---
So immdiately after getting the client's GXNet (using attach) I then use new GXDLMSReader(<GXNet client>, ...), then on that reader I call initializeConnection(), it is within this that it seems to fail.
Line 418 is the call to: readDataBlock(dlms.aarqRequest(), reply);
Currently stuck with getting…
Currently stuck with getting message as shown below everytime:
[MeterManager/handleDeviceTrace] Just traced: gurux.net.GXNet@22ee1840 [B@148c9780
RX: 13:00:54.453 00 00 01 00 01 00 01 00 16 0A 02 10 43 4C 45 31 30 35 34 32 32 39 30 30 30 33 30 39 00 18 89
java.lang.IllegalArgumentException: Invalid data type: 67
true
None
NONE
SUITE_0
java.lang.IllegalArgumentException: Invalid data type: 67
at gurux.dlms.enums.DataType.forValue(DataType.java:192)
at gurux.dlms.internal.GXCommon.getData(GXCommon.java:524)
at gurux.dlms.internal.GXCommon.getArray(GXCommon.java:691)
at gurux.dlms.internal.GXCommon.getData(GXCommon.java:539)
at gurux.dlms.GXDLMSTranslator.dataToXml(GXDLMSTranslator.java:3371)
at za.co.ipay.commandercosem.controller.GXDLMSReader.readDLMSPacket(GXDLMSReader.java:230)
at za.co.ipay.commandercosem.controller.GXDLMSReader.readDataBlock(GXDLMSReader.java:289)
at za.co.ipay.commandercosem.controller.GXDLMSReader.readDataBlock(GXDLMSReader.java:275)
at za.co.ipay.commandercosem.controller.GXDLMSReader.initializeConnection(GXDLMSReader.java:416)
at za.co.ipay.commandercosem.controller.DeviceController.init(DeviceController.java:135)
at za.co.ipay.commandercosem.headend.ConnectionThread.run(ConnectionThread.java:46)
at java.lang.Thread.run(Thread.java:750)
za.co.ipay.commandercosem.controller.ControllerException: CCException: (CONNECTION_INIT_ERROR)
at za.co.ipay.commandercosem.controller.DeviceController.init(DeviceController.java:161)
at za.co.ipay.commandercosem.headend.ConnectionThread.run(ConnectionThread.java:46)
at java.lang.Thread.run(Thread.java:750)
[ConnThread] Error init()'ing the device controller: za.co.ipay.commandercosem.controller.ControllerException: CCException: (CONNECTION_INIT_ERROR)
[ConnThread] Disconnecting....
Disconnecting from the meter.
Hi, GXNet only sends and…
Hi,
GXNet only sends and receives the data. You need to change Interface Type to WRAPPER for GXDLMSClient component. After that, you can communicate with WRAPPER.
BR,
Mikko
Hi, I believe that you are…
Hi,
I believe that you are waiting that the meter establishes the connection. What you are doing after that?
BR,
Mikko
Thank you this makes sense…
Thank you this makes sense. I did ensure that the InterfaceType.WRAPPER is used.
So GXNet runs, then…
So GXNet runs, then onClientConnected` gets a client GXNet using .attach(String).
After this I then use GXDLMSReader and initialize the connection using the client GXNet. I'm unsure if my authentication details are correct for the meter connecting to me - could that be a problem or would I have atleast gotten an error then - because this error seems odd.
---
So immdiately after getting the client's GXNet (using attach) I then use new GXDLMSReader(<GXNet client>, ...), then on that reader I call initializeConnection(), it is within this that it seems to fail.
Line 418 is the call to: readDataBlock(dlms.aarqRequest(), reply);