pub struct Bootloader {
    pub protocol: Protocol,
    pub vid: u16,
    pub pid: u16,
    pub uuid: u128,
}

Fields

protocol: Protocolvid: u16pid: u16uuid: u128

Implementations

Select a unique ROM bootloader with the given VID and PID.

Attempt to find a unique ROM bootloader with the given VID, PID and UUID.

Finds all ROM bootloader with the given VID, PID and UUID.

The reason for this wrapper is that the device aborts early if more than 512 bytes are requested. Unclear why it does this…

This is a traffic trace (requesting all of PFR in one go), removing the “surplus junk”

–> 01002000 03000002 00DE0900 000E0000 00000000 00000000 00000000 00000000 00000000 <– 03000C00 A3010002 00000000 000E0000 <– 04003800 00000000 02000000 02000000 02000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <– 04003800 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <– 04003800 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <– 04003800 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <– 04003800 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 02000000 00000000 00000000 00000000 00000000 00000000 <– 04003800 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <– 04003800 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <– 04003800 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <– 04003800 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ECE6A668 2922E9CC F462A95F DF81E180 E1528642 7C520098 <– 04000000 <– 03000C00 A0000002 65000000 03000000

The error is 101 = 100 + 1 = (supposedly) a flash driver “alignment” error (?!)

The interesting thing is that at the point where the device aborts, there are 8 bytes remaining, which it otherwise produces in a final

<– 04000800 2C80BA51 B067AF3C <– 03000C00 A0000002 00000000 03000000

TODO: should we just enter our desired length anyway, and handle such situations? As in retry at the new index, with the reduced length? Instead of using a fixed 512B chunking?

TODO: Need to expect errors such as: Response status = 139 (0x8b) kStatus_FLASH_NmpaUpdateNotAllowed This happens with read-memory $((0x0009_FC70)) 16, which would be the UUID

TODO: Need to expect errors such as: Response status = 10200 (0x27d8) kStatusMemoryRangeInvalid This happens with read-memory $((0x5000_0FFC)) 1, which would be the DIEID (for chip rev)

Trait Implementations

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more

Returns a vector of all HID devices that appear to be ROM bootloaders

Returns the UUID associated with the thing, if it has a UUID. Read more
Returns the thing with the given UUID. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.