import serial, struct from glob import glob port = serial.Serial(port=glob("/dev/serial/by-id/usb-Arduino_LLC_Arduino_Zero_*-if00")[0], baudrate=115200) port.write(b"c") config_info = {val.split(b":")[0] : int(val.split(b":")[1]) for val in port.read_until(b"END\r\n").split(b"\r\n")[:-2]} mn_config_size = config_info[b"MNConfiguration"] mn_cfgmem_size = config_info[b"CFGMEM"] n_devices = config_info[b"N_DEVICES"] mn_device_size = config_info[b"Device"] mn_analog_input_size = config_info[b"AnalogInput"] print(config_info) port.write(b"r") config = port.read(mn_config_size) print(config) port.write(b"R") cfgmem = port.read(mn_cfgmem_size) print(cfgmem) modem_frequency = struct.unpack("