-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtxTest.py
More file actions
22 lines (17 loc) · 935 Bytes
/
txTest.py
File metadata and controls
22 lines (17 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import socket
import time
UDP_IP = "127.0.0.1"
UDP_PORT = 7331
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
print('tx test')
while True:
#msg = '1000110110101010000100100011010001011000101010110000000110111011110000000100011111100001010111010100110010010000'
msg = '00101000000000000000100000001000111100000100110101001000'
#msg = '1000110110100000001010011110101001011000101111110000001010101010101010110100011100011100001001010010000000001110'
sock.sendto(msg.encode(), (UDP_IP, UDP_PORT))
time.sleep(1)
#msg = '1000110110101010000100100011010001011000101010110000010101001101111101101011010110011110011001101010011000100110'
msg = '00101000000000000000100000001000111100000100110101001000'
#msg = '1000110110100000001010011110101001011000101111110000011010001110001110010011100011100100110101111111110000100101'
sock.sendto(msg.encode(), (UDP_IP, UDP_PORT))
time.sleep(1)