This is an old revision of the document!
import socket def app(): TCP_IP = '------------------------' TCP_PORT = 8088 BUFFER_SIZE = 1024 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((TCP_IP, TCP_PORT)) data = s.recv(BUFFER_SIZE) if not data.strip() == "000": print "NOT INITED" s.close() return MSG = "010 123\n\ 020 XccSSE\n\ 030 1\n\ 040 +55-1-565-5656\n\ 051 1\n\ 052 80\n\ 053 50\n\ 054 120\n\ 061 1\n\ 062 31.8912434\n\ 063 34.8127223\n\ 064 60.22\n\ 999" s.send(MSG) # If UPDATES not exists. see the spec data = s.recv(BUFFER_SIZE) if not data.strip() == "999": print "NOT OK" s.close() return MSG = "999\n" s.send(MSG) s.close() app()Back to top