Skip to content

Commit 9e7a936

Browse files
authored
Merge pull request #589 from luxonis/bootloader_docs
Updated bootloader docs
2 parents 42f0cc7 + ca417b4 commit 9e7a936

File tree

7 files changed

+72
-10
lines changed

7 files changed

+72
-10
lines changed

docs/source/components/bootloader.rst

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,59 @@
33
Bootloader
44
==========
55

6-
Depthai bootloader is a small program which aids in booting and updating bootloader or depthai application packages.
6+
DepthAI bootloader is a small program which **handles the booting process**, either by **booting the flashed application**,
7+
or by **initializing the OAK PoE camera** so DepthAI API can connect to it.
78

8-
To be able to run standalone (:ref:`documentation here <Standalone mode>`), the Depthai bootloader must be first
9-
flashed to the devices flash. This step is required only once.
9+
To be able to run in :ref:`Standalone mode`, the Depthai bootloader must be first flashed to the devices flash.
10+
This step is required only once.
1011

1112
Once the device has the bootloader flashed, it will perform the same as before. Running pipelines with a host
12-
connected doesnt require any changes.
13+
connected doesn't require any changes.
1314

1415
Suggested workflow is to perform as much of development as possible with the host connected as the
1516
iteration cycle is greatly improved.
1617

17-
Once desired pipeline is created, use the following function to flash: :code:`DeviceBootloader::flash`
18+
Device Manager
19+
##############
20+
21+
``device_manager.py`` is a Python helper that interfaces with device :ref:`Bootloader` and bootloader configuration.
22+
It can be found at `depthai-python/utilities <https://github.com/luxonis/depthai-python/tree/main/utilities>`__.
23+
24+
.. image:: https://user-images.githubusercontent.com/18037362/170479657-faacd06d-5f7e-4215-a821-005d58a5f379.png
25+
26+
Device Manager Usage
27+
--------------------
28+
29+
**About device tab** - Select a camera to see its metadata - like MxID, flashed bootloader version, device state etc.
30+
31+
* First, we need to select the device using the dropdown. You can click ``Search`` to search for all available cameras, either via USB port or on LAN (PoE OAKs).
32+
* ``Flash newest Bootloader`` button will flash the ``newest bootloader`` to the device. You can select AUTO, USB or NETWORK bootloader.
33+
34+
* **AUTO** will select the connection type of bootloader with which the camera is currently connected to. If you are connected via USB (doing factory reset) to an OAK PoE camera, you shouldn't select AUTO, as it will flash USB bootloader.
35+
* **USB** bootloader will try to boot the application that is stored on flash memory. If it can't find flashed application, it will just behave as normal USB OAK - so it will wait until a host computer initializes the application.
36+
* **NETWORK** bootloader is used by the OAK PoE cameras, and is flashed at the factory. It handles network initialization so the OAK PoE cameras can be booted through the LAN.
37+
38+
* ``Factory reset`` will erase the whole flash content and re-flash it with only the USB or NETWORK bootloader. Flashed application (pipeline, assets) and bootloader configurations will be lost.
39+
* ``Boot into USB recovery mode`` will force eg. OAK PoE camera to be available through the USB connector, even if its boot pins are set to PoE booting. It is mostly used by our firmware developers.
40+
41+
**Configuration settings tab** - After you select a device that has bootloader flashed, you can also configure bootloader
42+
configuration.
43+
44+
- If the device has **NETWORK bootloader flashed**, you will be able to set its static/dynamic IP/mask/gateway, DNS, MAC, etc.
45+
- If the device has **USB bootloader flashed**, you will be able to set its USB max speed and USB timeout.
46+
47+
After setting some values, you have to click on the ``Flash configuration`` button. You can also flash a :ref:`DAP`,
48+
or clear the bootloader config.
49+
50+
Boot switches
51+
#############
52+
53+
- **Boot from flash** - DIP switch: 0x03 (switches 5,6 ON) - used by OAK PoE and USB cameras when bootloader is installed.
54+
- **Recovery mode for USB** - DIP switch: 0x16 (switches 2,4,5 ON) - to boot directly into USB mode, so camera waits for the host to connect to it via USB.
55+
56+
.. image:: https://user-images.githubusercontent.com/18037362/154956812-c3fcc961-af46-4dfd-8080-e15c8c6b43f0.png
57+
58+
OAK-D-PoE with switches 2,4,5 ON, for the purpose of connecting to the device via USB.
1859

1960
API
2061
###
@@ -33,15 +74,15 @@ or update the bootloader itself.
3374
progressCb parameter takes a callback function, which will be called each time an progress update occurs (rate limited to 1 second). This is mainly
3475
used to inform the user of the current flashing progress.
3576

36-
You can also check the version of the current bootloader by using the :ref:`Bootloader Version` example.
77+
.. _DAP:
3778

3879
DepthAI Application Package (.dap)
3980
##################################
4081

41-
Depthai application package is a binary file format which stores sections of data. The purpose of this format is to be able to extract
82+
**DepthAI application package** is a binary file format which stores sections of data. The purpose of this format is to be able to extract
4283
individual sections and do OTA updates without requiring to update all data. Example: Between update 1 and 2 of users application,
4384
Depthai firmware, Asset storage (50MiB neural network) and asset structure remained the same, but some additional processing nodes were added
44-
to the pipeline. Instead of transferring the whole package only Pipeline description can be sent and updated.
85+
to the pipeline. Instead of transferring the whole package, only Pipeline description can be sent and updated.
4586

4687
Depthai application package (**.dap**) consists of:
4788

docs/source/samples/bootloader/bootloader_config.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ the :code:`.json` bootloader config file via cmd arguments, which will get flash
66

77
Click on :ref:`Bootloader` for more information.
88

9+
.. note::
10+
We suggest using :ref:`Device Manager`, a GUI tool for interfacing with the bootloader and its configurations.
11+
912
Demo
1013
####
1114

docs/source/samples/bootloader/bootloader_version.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ This example shows basic bootloader interaction, retrieving the version of bootl
55

66
Click on :ref:`Bootloader` for more information.
77

8+
.. note::
9+
We suggest using :ref:`Device Manager`, a GUI tool for interfacing with the bootloader and its configurations.
10+
811
Demo
912
####
1013

docs/source/samples/bootloader/flash_bootloader.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ have flash on-board.
66

77
Click on :ref:`Bootloader` for more information.
88

9+
.. note::
10+
We suggest using :ref:`Device Manager`, a GUI tool for interfacing with the bootloader and its configurations.
11+
912
Demo
1013
####
1114

docs/source/samples/bootloader/poe_set_ip.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ This script allows you to set static or dynamic IP, or clear bootloader config o
88
device (you won't be able to access it), and will have to `factory reset <https://docs.luxonis.com/projects/hardware/en/latest/pages/guides/getting-started-with-poe.html#factory-reset>`__
99
your OAK PoE.
1010

11+
.. note::
12+
We suggest using :ref:`Device Manager`, a GUI tool for interfacing with the bootloader and its configurations.
13+
1114
Demo
1215
####
1316

utilities/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Utilities
2+
3+
This folder contains DepthAI utility tools.
4+
5+
## Device Manager
6+
7+
![Device Manager](https://user-images.githubusercontent.com/18037362/170479657-faacd06d-5f7e-4215-a821-005d58a5f379.png)
8+
9+
``device_manager.py`` helps interfacing with the device [Bootloader](https://docs.luxonis.com/projects/api/en/latest/components/bootloader) and bootloader configuration. See [Device Manager Usage](https://docs.luxonis.com/projects/api/en/latest/components/bootloader/#device-manager-usage) to see how to use this utility.

utilities/device_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def connectToDevice(device):
315315
[sg.Text("About device", size=(30, 1), font=('Arial', 30, 'bold'), text_color="black")],
316316
[sg.HSeparator()],
317317
[
318-
sg.Button("Device select", size=(15, 1), font=('Arial', 10, 'bold'), disabled=True, key="aboutFake"),
318+
sg.Button("About device", size=(15, 1), font=('Arial', 10, 'bold'), disabled=True, key="aboutFake"),
319319
sg.Button("Config", size=(15, 1), font=('Arial', 10, 'bold'), disabled=False, key="configReal")
320320
],
321321
[sg.HSeparator()],
@@ -366,7 +366,7 @@ def connectToDevice(device):
366366
[sg.Text("Configuration settings", size=(20, 1), font=('Arial', 30, 'bold'), text_color="black")],
367367
[sg.HSeparator()],
368368
[
369-
sg.Button("Device select", size=(15, 1), font=('Arial', 10, 'bold'), disabled=False, key="aboutReal"),
369+
sg.Button("About device", size=(15, 1), font=('Arial', 10, 'bold'), disabled=False, key="aboutReal"),
370370
sg.Button("Config", size=(15, 1), font=('Arial', 10, 'bold'), disabled=True, key="configFake"),
371371
# TODO create library tab
372372
# sg.Button("Library", size=(15, 1), font=('Arial', 10, 'bold'), disabled=True, key="configLib"),

0 commit comments

Comments
 (0)