Jan-27-2024, 11:37 PM
This appears to work
# This is the test message MESSAGE = b'MAC' + bytes([0]*29) print(MESSAGE, "\n") # This is the reset message MESSAGE = b'RES' + bytes([0]*29) print(MESSAGE, "\n") # This is the change IP messge ip_1 = '192' ip_2 = '168' ip_3 = '0' ip_4 = '168' MESSAGE = b'WIP' + bytes([0]*29) + bytes([int(ip_1), int(ip_2), int(ip_2), int(ip_4)]) print(MESSAGE, "\n") # These messages were in write_clicked() slot = [1, 2, 3] # For testing need a slot list MESSAGE = b'ERS' + bytes([0]*28) + bytes([slot[-1]]) print(MESSAGE, "\n") rbf = bytes(range(256)) # This is read from a file in real program. MESSAGE = b'WPD' + bytes([0]*29) + rbf print(MESSAGE)