diff --git a/listener.py b/listener.py index fd8e831..f84aa24 100644 --- a/listener.py +++ b/listener.py @@ -1,7 +1,7 @@ import datetime import socket -from utils import mac_address, broadcast_address +from utils import mac_address if __name__ == "__main__": @@ -14,7 +14,7 @@ if __name__ == "__main__": destination = byte_string[0:6] if byte_string[12:14] == b"\x60\x00" \ - and (destination == mac_address or destination == broadcast_address): + and (destination == mac_address or destination == b'\xff\xff\xff\xff\xff\xff'): source = byte_string[6:12] message = byte_string[14:].decode("utf-8").rstrip("\x00") diff --git a/python/sender.py b/python/sender.py index 8724deb..d35fd7a 100644 --- a/python/sender.py +++ b/python/sender.py @@ -9,7 +9,7 @@ if __name__ == "__main__": sock.bind((utils.get_device_name(), 0)) - frame = utils.broadcast_address + utils.mac_address + b"\x60\x00" + "ZeusWPI is de max!".encode() + frame = b'\xff\xff\xff\xff\xff\xff' + utils.mac_address + b"\x60\x00" + "ZeusWPI is de max!".encode() while True: dt_string = datetime.datetime.now().strftime("%d/%m/%Y %H:%M:%S") diff --git a/utils.py b/utils.py index 2df29d4..e3f4e23 100644 --- a/utils.py +++ b/utils.py @@ -18,5 +18,3 @@ def get_mac_address() -> bytes: mac_address = get_mac_address() - -broadcast_address = b'\xff\xff\xff\xff\xff\xff'