def cmd_probe(**kwargs): try: devinfos = _bladerf.get_device_list() print("\n".join([str(devinfo) for devinfo in devinfos])) except _bladerf.NoDevError: print("No bladeRF devices available.") try: devinfos = _bladerf.get_bootloader_list() print("*** Detected one or more FX3-based devices in bootloader mode:") print("Bootloader", "\n".join([str(devinfo) for devinfo in devinfos])) except _bladerf.NoDevError: pass
def cmd_probe(**kwargs): try: devinfos = _bladerf.get_device_list() print("\n".join([str(devinfo) for devinfo in devinfos])) except _bladerf.NoDevError: print("No bladeRF devices available.") try: devinfos = _bladerf.get_bootloader_list() print("*** Detected one or more FX3-based devices in bootloader mode:") print("Bootloader", "\n".join([str(devinfo) for devinfo in devinfos])) except _bladerf.NoDevError: pass
def cmd_recover_fw(path, device=None, **kwargs): if device is None: # Let's guess print("No device specified, trying to find one...") try: devinfos = _bladerf.get_bootloader_list() except _bladerf.NoDevError: print("No devices in bootloader recovery mode found.") return if len(devinfos) > 1: print("Multiple devices in bootloader recovery mode found.") print("Please specify one:") print("\n".join([str(devinfo) for devinfo in devinfos])) return device = "{backend}:device={usb_bus}:{usb_addr}".format( **devinfos[0]._asdict()) print("Choosing", device) print(devinfos[0]) print("Calling load_fw_from_bootloader...") _bladerf.load_fw_from_bootloader(device_identifier=device, file=path) print("Complete")
def cmd_recover_fw(path, device=None, **kwargs): if device is None: # Let's guess print("No device specified, trying to find one...") try: devinfos = _bladerf.get_bootloader_list() except _bladerf.NoDevError: print("No devices in bootloader recovery mode found.") return if len(devinfos) > 1: print("Multiple devices in bootloader recovery mode found.") print("Please specify one:") print("\n".join([str(devinfo) for devinfo in devinfos])) return device = "{backend}:device={usb_bus}:{usb_addr}".format( **devinfos[0]._asdict()) print("Choosing", device) print(devinfos[0]) print("Calling load_fw_from_bootloader...") _bladerf.load_fw_from_bootloader(device_identifier=device, file=path) print("Complete")