Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/transport/usb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ use anyhow::Result;
use rusb::{Context, DeviceHandle, UsbContext};

use super::Transport;
use anyhow::Context as _;


const ENDPOINT_OUT: u8 = 0x02;
const ENDPOINT_IN: u8 = 0x82;
Expand Down Expand Up @@ -128,7 +130,8 @@ impl UsbTransport {
anyhow::bail!("USB Endpoints not found");
}

device_handle.set_active_configuration(1)?;
device_handle.set_active_configuration(1).context(
"Failed to select USB configuration 1; Is the bootloader running?")?;
let _config = device.active_config_descriptor()?;
let _descriptor = device.device_descriptor()?;

Expand Down