From 50d9729001fd07ecf53b6fa1ce3b1b369be17de8 Mon Sep 17 00:00:00 2001 From: Tristan Warder Date: Wed, 24 Jan 2024 10:46:28 -0500 Subject: [PATCH] Fix get_ethernet() mac is now passed in as bytes instead of a bytearray to match the WIZNET5K constructor. --- p1am_200_helpers/p1am_200_helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p1am_200_helpers/p1am_200_helpers.py b/p1am_200_helpers/p1am_200_helpers.py index de06e43..7baa908 100644 --- a/p1am_200_helpers/p1am_200_helpers.py +++ b/p1am_200_helpers/p1am_200_helpers.py @@ -153,7 +153,7 @@ def get_ethernet(dhcp=True): cs = DigitalInOut(board.D5) spi_bus = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO) mac = get_eeprom().mac - _eth_iface = WIZNET5K(spi_bus, cs, is_dhcp=dhcp, mac=mac) + _eth_iface = WIZNET5K(spi_bus, cs, is_dhcp=dhcp, mac=bytes(mac)) socket.set_interface(_eth_iface) return _eth_iface