Bootloader Version

This example shows basic bootloader interaction, retrieving the version of bootloader running on the device.

Click on Bootloader for more information.

Note

We suggest using Device Manager, a GUI tool for interfacing with the bootloader and its configurations.

Demo

Example script output

~/depthai-python/examples$ python3 bootloader_version.py
Found device with name: 14442C10D1789ACD00-ma2480
Version: 0.0.15

Setup

Please run the install script to download all required dependencies. Please note that this script must be ran from git context, so you have to download the depthai-python repository first and then run the script

git clone https://github.com/luxonis/depthai-python.git
cd depthai-python/examples
python3 install_requirements.py

For additional information, please follow installation guide

Source code

Also available on GitHub

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#!/usr/bin/env python3

import depthai as dai

(res, info) = dai.DeviceBootloader.getFirstAvailableDevice()

if res == True:
    print(f'Found device with name: {info.name}')
    bl = dai.DeviceBootloader(info)
    print(f'Version: {bl.getVersion()}')
else:
    print('No devices found')

Also available on GitHub

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#include "depthai/depthai.hpp"

int main(int argc, char** argv) {
    bool res = false;
    dai::DeviceInfo info;
    std::tie(res, info) = dai::DeviceBootloader::getFirstAvailableDevice();

    if(res) {
        std::cout << "Found device with name: " << info.name << std::endl;
        dai::DeviceBootloader bl(info);
        std::cout << "Version: " << bl.getVersion().toString() << std::endl;
    } else {
        std::cout << "No devices found" << std::endl;
    }

    return 0;
}

Got questions?

We’re always happy to help with code or other questions you might have.