import gurux_dlms
import gurux_common
import gurux_serial
import gurux_net
from gurux_dlms import*
from gurux_common import*
from gurux_serial import*
from gurux_net import*
import serial
import time
client = GXDLMSClient()
client.useLogicalNameReferencing = True
client.clientAddress = 16
client.serverAddress = 1
media = GXSerial(port="COM12")
media.baudRate = 9600
media.open()
#media.addListner(self)
media.getSynchronous()
p = ReceiveParameters()
p.eop = '\n'
p.waitTime = 1000
media.send("Hello!")
time.sleep(2)
media.receive(p)
ret = p.reply
print(ret)
media.close()
data is not receiving at port
data is not receiving at port
Hi, You have set '\n' as end…
Hi,
You have set '\n' as end of packet, but have not sent it.
Try this:
media.send("Hello!\n")
BR,
Mikko