-
Notifications
You must be signed in to change notification settings - Fork 3
/
h02_client.py
13 lines (11 loc) · 1.01 KB
/
h02_client.py
1
2
3
4
5
6
7
8
9
10
11
12
13
import socket
HOST = "127.0.0.1" # The server's hostname or IP address
PORT = 5012 # The port used by the server
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect((HOST, PORT))
# s.sendall(b"*HQ,865205030330012,V1,145452,A,2240.55181,N,11358.32389,E,0.00,0,100815,FFFFFBFF#")
# s.sendall(b"*HQ,865205030330012,V2,150421,A,2240.55841,N,11358.33462,E,2.06,0,100815,FFFFFBFF#")
# s.sendall(bytes.fromhex("2410307310010503162209022212874500113466574c014028fffffbffff0001"))
# s.sendall(bytes.fromhex("2a48512c343231303230353832322c56312c3231323034342c562c353034392e393134392c4e2c30303434322e303831362c452c3030302e30302c3030302c3135303731392c46464537464246462c3230362c31302c302c302c36232a48512c343231303230353832322c56342c56312c323031393037313532313234303023"))
s.sendall(bytes.fromhex("2442102058220936310409195045054006004201800e000000ffe7fbffff001909000003af00ce0a000000005c"))
# wrong Y format s.sendall(bytes.fromhex("5906410400001533281008152240563200113583509e003000e7e7fbffff0009"))