Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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
Ejemplo n.º 3
0
def cmd_info(device=None, verbose=False, **kwargs):
    if device is None:
        try:
            devinfos = _bladerf.get_device_list()
        except _bladerf.NoDevError:
            print("No bladeRF devices available.")
            return

        print("*** Devices found:", len(devinfos))

        for idx, dev in enumerate(devinfos):
            print()
            print("*** Device", idx)
            _print_cmd_info(devinfo=dev, verbose=verbose)

    else:
        _print_cmd_info(device=device, verbose=verbose)
Ejemplo n.º 4
0
def cmd_info(device=None, verbose=False, **kwargs):
    if device is None:
        try:
            devinfos = _bladerf.get_device_list()
        except _bladerf.NoDevError:
            print("No bladeRF devices available.")
            return

        print("*** Devices found:", len(devinfos))

        for idx, dev in enumerate(devinfos):
            print()
            print("*** Device", idx)
            _print_cmd_info(devinfo=dev, verbose=verbose)

    else:
        _print_cmd_info(device=device, verbose=verbose)
Ejemplo n.º 5
0
def probe_bladerf():
    device = None
    print( "Searching for bladeRF devices..." )
    try:
        devinfos = _bladerf.get_device_list()
        if( len(devinfos) == 1 ):
            device = "{backend}:device={usb_bus}:{usb_addr}".format(**devinfos[0]._asdict())
            print( "Found bladeRF device: " + str(device) )
        if( len(devinfos) > 1 ):
            print( "Unsupported feature: more than one bladeRFs detected." )
            print( "\n".join([str(devinfo) for devinfo in devinfos]) )
            shutdown( error = -1, board = None )
    except _bladerf.BladeRFError:
        print( "No bladeRF devices found." )
        pass

    return device
def probe_bladerf():
    device = None
    print("Searching for bladeRF devices...")
    try:
        devinfos = _bladerf.get_device_list()
        if (len(devinfos) == 1):
            device = "{backend}:device={usb_bus}:{usb_addr}".format(
                **devinfos[0]._asdict())
            print("Found bladeRF device: " + str(device))
        if (len(devinfos) > 1):
            print("Unsupported feature: more than one bladeRFs detected.")
            print("\n".join([str(devinfo) for devinfo in devinfos]))
            shutdown(error=-1, board=None)
    except _bladerf.BladeRFError:
        print("No bladeRF devices found.")
        pass

    return device