Hi All,
Now the meter act as client . I need to host server and communicate with meter , when the meter is connected. How to handshake,read and write with device?.Can u help me?
You can use Gurux open-source libraries to handle meter connections or push messages. If you want to know how to implement handshake, etc, DLMS Greeen Book defines that. It's no possible to tell easily.
Hi
Thanks for reply
I complete the below process to connect with client meter and server
1)create the server:
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as server_socket:
server_socket.bind((HOST, PORT))
2)listen the meter(client)
conn, addr = server_socket.accept()
executor.submit(handle_connection, conn, addr)
3)calling the function and create a client object ,trace and invocationCounter
client = GXDLMSSecureClient(True)
media = conn
reader = GXDLMSReader(client,media,trace,invocationcounter)
reader.initializeConnection()
here i got issue to handshake,read and write with client meter .Media object is issue for me and i can't able to send and receive the data from media object. Can u help me with sample code in python ?
Hi, Communication depends is…
Hi,
Communication depends is your meter connecting to the server using auto-connect or sending push messages.
https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAutoConnect
https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSPushSetup
You can use Gurux open-source libraries to handle meter connections or push messages. If you want to know how to implement handshake, etc, DLMS Greeen Book defines that. It's no possible to tell easily.
BR,
Mikko
Hi Thanks for reply I…
Hi
Thanks for reply
I complete the below process to connect with client meter and server
1)create the server:
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as server_socket:
server_socket.bind((HOST, PORT))
2)listen the meter(client)
conn, addr = server_socket.accept()
executor.submit(handle_connection, conn, addr)
3)calling the function and create a client object ,trace and invocationCounter
client = GXDLMSSecureClient(True)
media = conn
reader = GXDLMSReader(client,media,trace,invocationcounter)
reader.initializeConnection()
here i got issue to handshake,read and write with client meter .Media object is issue for me and i can't able to send and receive the data from media object. Can u help me with sample code in python ?
Hi, At first, you need to…
Hi,
At first, you need to check that your meter uses auto-connect as I described earlier.
You need to create GXNet media component and use it like this:
media = GXNet(NetworkType.TCP, None, 4000)
media.server = True
client = GXDLMSSecureClient(True)
reader = GXDLMSReader(client,media,trace,invocationcounter)
BR,
Mikko