I am using the DLMS/COSEM python library to read data from an Actaris meter (SL761B070). However, I have not been able to establish communication with it.
When trying to communicate, I get the following errors:
Data send a file try to resent 1/3
Data send a file try to resent 2/3
RX 14:5317 DisconnectRequest TimeoutException ('Failed to receive a reply from the device in the given time')
I tried the GXDLMSDirector (user interface GUI), and it works fine. I do not understand why the GXDLMSDirector is working, and the library doesn't if the base code is the same. I am using TCP communication for both (GXDLMSDirector and DLMS/COSEM python library). These are the CmdParameter that I am using "-h IP -p PORT -s 17 -c 1 -r sn -a Low -P ABCDEFGH "
Actaris is using Logical Name referencing, so remove -r sn.
I believe that the reason why the meter doesn't reply is that it's using 4 bytes addressing.
That is usually needed and it's not implemented to command line client.
You need to manually add this after you have created the client.
Can you run your python app with -t Verbose parameter and post the first trace line here. I'll check your settings. I believe that one of the settings is wrong and the meter doesn't reply. Are you using the same baud-rates?
After running the python app with -t Verbose parameter I get the following results:
>python main.py -h 166.210.134.4 -p 5000 -s 17 -c 1 -a Low -P ABCDEFGH -t Verbose
Authentication: Authentication.LOW
ClientAddress: 0x1
ServerAddress: 0x11
TX: 10:36:52 7E A0 07 23 03 93 B7 12 7E
Data send failed. Try to resend 1/3
Data send failed. Try to resend 2/3
RX: 10:37:22
DisconnectRequest
The communication we are using for the library and the GUI is TCP/IP. The information is sent via TCP/IP to a second device which function is to retransmit the TCP/IP information to the serial port of the ACTARIS configured at 9600 bauds.
Everything works fine for the GUI (TX: 7E A0 08 02 23 03 93 3E 74 7E) but not for the library.
please someone I can help me
please someone I can help me
Hi,
Hi,
Actaris is using Logical Name referencing, so remove -r sn.
I believe that the reason why the meter doesn't reply is that it's using 4 bytes addressing.
That is usually needed and it's not implemented to command line client.
You need to manually add this after you have created the client.
cl = GXDLMSClient()
cl.serverAddressSize = 4
BR,
Mikko
Hi, Thanks for your response,
Hi, Thanks for your response, I try the suggestions you mentioned, but I haven't been able to communicate with the meter.
Maybe I am doing it wrong, could you tell me where to place the commands you mention?
The user interface works great, is there a way to send data to the meter, from the libarary, the same way the interface does?
Hi,
Hi,
Can you run your python app with -t Verbose parameter and post the first trace line here. I'll check your settings. I believe that one of the settings is wrong and the meter doesn't reply. Are you using the same baud-rates?
BR,
Mikko
Thank you very much for your
Thank you very much for your reponse,
After running the python app with -t Verbose parameter I get the following results:
>python main.py -h 166.210.134.4 -p 5000 -s 17 -c 1 -a Low -P ABCDEFGH -t Verbose
Authentication: Authentication.LOW
ClientAddress: 0x1
ServerAddress: 0x11
TX: 10:36:52 7E A0 07 23 03 93 B7 12 7E
Data send failed. Try to resend 1/3
Data send failed. Try to resend 2/3
RX: 10:37:22
DisconnectRequest
The communication we are using for the library and the GUI is TCP/IP. The information is sent via TCP/IP to a second device which function is to retransmit the TCP/IP information to the serial port of the ACTARIS configured at 9600 bauds.
Everything works fine for the GUI (TX: 7E A0 08 02 23 03 93 3E 74 7E) but not for the library.
Hi,
Hi,
Change server address from 1 to 145.
python main.py -h 166.210.134.4 -p 5000 -s 145 -c 1 -a Low -P ABCDEFGH -t Verbose
BR,
Mikko
Hello Mikko,
Hello Mikko,
Thank you very much for all your help your advice works perfectly, I have been able to communicate with the meter.