<gh_stars>0
import socket
import struct
host = '127.0.0.1'
port = 6666
addr = (host, port)
a=[0x00,0x20 ,0x60 ,0x01 ,0x80 ,0x11 ,0x22 ,0x33 ,0x44 ,0x55 ,0x66 ,0x77 ,0x88 ,0x02 ,0x33 ,0x00 ,0x11 ,0x52 ,0x4c 
,0x31 ,0x41 ,0x30 ,0x33 ,0x31 ,0x37 ,0x31 ,0x32 ,0x30 ,0x30 ,0x30 ,0x30 ,0x31 ,0x35 ,0x00]

heartbeat=[0x00 ,0x07 ,0x61 ,0x01 ,0x00 ,0x11 ,0x22 ,0x33 ,0x44]
softversion=[0x00 ,0x14 ,0x62 ,0x01 ,0x6a ,0x11 ,0x22 ,0x33 ,0x44 ,0x00 ,0x0b ,0x41 ,0x2e ,0x30 ,0x39 ,0x2e ,0x30 ,0x31 ,0x2e ,0x30 ,0x36 ,0x00]
tcpCliSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
tcpCliSock.connect(addr)
data=struct.pack("%dB"%(len(a)),*a)
tcpCliSock.send(data)
tcpCliSock.close()

tcpCliSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
tcpCliSock.connect(addr)
tcpCliSock.send(struct.pack("%dB"%(len(heartbeat)),*heartbeat))
tcpCliSock.close()


tcpCliSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
tcpCliSock.connect(addr)
tcpCliSock.send(struct.pack("%dB"%(len(softversion)),*softversion))

print("*********end********")


import socket
import struct
host = '127.0.0.1'
port = 6666
addr = (host, port)
a=[0x00,0x20 ,0x60 ,0x01 ,0x80 ,0x11 ,0x22 ,0x33 ,0x44 ,0x55 ,0x66 ,0x77 ,0x88 ,0x02 ,0x33 ,0x00 ,0x11 ,0x52 ,0x4c 
,0x31 ,0x41 ,0x30 ,0x33 ,0x31 ,0x37 ,0x31 ,0x32 ,0x30 ,0x30 ,0x30 ,0x30 ,0x31 ,0x35 ,0x00]

heartbeat=[0x00 ,0x07 ,0x61 ,0x01 ,0x00 ,0x11 ,0x22 ,0x33 ,0x44]
softversion=[0x00 ,0x14 ,0x62 ,0x01 ,0x6a ,0x11 ,0x22 ,0x33 ,0x44 ,0x00 ,0x0b ,0x41 ,0x2e ,0x30 ,0x39 ,0x2e ,0x30 ,0x31 ,0x2e ,0x30 ,0x36 ,0x00]
tcpCliSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
tcpCliSock.connect(addr)
data=struct.pack("%dB"%(len(a)),*a)
tcpCliSock.send(data)
tcpCliSock.close()

tcpCliSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
tcpCliSock.connect(addr)
tcpCliSock.send(struct.pack("%dB"%(len(heartbeat)),*heartbeat))
tcpCliSock.close()


tcpCliSock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
tcpCliSock.connect(addr)
tcpCliSock.send(struct.pack("%dB"%(len(softversion)),*softversion))

print("*********end********")