This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Disconnecting the Target device from the nRF52 DK after performing dfu over ble

Hi,

I am using a nRF52 DK board and programming in python.

After performing a successful DFU over BLE i want my Target device to be disconnected from the nRF board so that i can check if the device is advertising again or not.

Is there a function or statement in python that helps disconnecting from a device connected through BLE?

Parents Reply
  • ble_backend = DfuTransportBle(serial_port=str(port),
    target_device_name=str(name),
    target_device_addr=str(TARGET_DEV_ADDRESS))
    ble_backend.register_events_callback(DfuEvent.PROGRESS_EVENT, update_progress)
    dfu = Dfu(zip_file_path = filename, dfu_transport = ble_backend, connect_delay = 3)

    if logger.getEffectiveLevel() > logging.INFO:
    with click.progressbar(length=dfu.dfu_get_total_size()) as bar:
    global_bar = bar
    dfu.dfu_send_images()
    else:
    dfu.dfu_send_images()
    click.echo("Device programmed with Application.")
    This is the code for performing DFU over BLE. It does not return a conn_handle anywhere for me to send it as a parameter in the close function.
Children
Related