Skip to content

Commit 0e8bdcb

Browse files
authored
Merge branch 'main' into update_win11_docs
2 parents 02c69c9 + d59fcad commit 0e8bdcb

File tree

1 file changed

+56
-25
lines changed

1 file changed

+56
-25
lines changed

docs/source/components/bootloader.rst

Lines changed: 56 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,83 @@
33
Bootloader
44
==========
55

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.
6+
DepthAI bootloader is a small program which handles the booting process, either by **booting the flashed application** (see :ref:`Standalone mode`),
7+
or by **initializing the OAK PoE camera** so DepthAI API can connect to it. OAK PoE cameras already come with bootloader flashed at the factory.
88

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.
11-
12-
Once the device has the bootloader flashed, it will perform the same as before. Running pipelines with a host
13-
connected doesn't require any changes.
14-
15-
Suggested workflow is to perform as much of development as possible with the host connected as the
16-
iteration cycle is greatly improved.
9+
Bootloader is part of the ``depthai`` library, so to eg. flash the newest bootloader, you should use the newest ``depthai`` library.
1710

1811
Device Manager
1912
##############
2013

21-
``device_manager.py`` is a Python helper that interfaces with device :ref:`Bootloader` and bootloader configuration.
14+
``device_manager.py`` is a Python script that interfaces with device :ref:`Bootloader` and bootloader configuration.
2215
It can be found at `depthai-python/utilities <https://github.com/luxonis/depthai-python/tree/main/utilities>`__.
2316

24-
.. image:: https://user-images.githubusercontent.com/18037362/171629704-0f78f31a-1778-4338-8ac0-bdfb0d2d593f.png
17+
.. image:: https://github.com/luxonis/depthai-python/assets/18037362/b2f067d8-8b4b-4158-9342-ea0dfbe0caf6
2518

26-
Device Manager Usage
27-
--------------------
19+
About Device
20+
------------
2821

29-
**About device tab** - Select a camera to see its metadata - like MxID, flashed bootloader version, device state etc.
22+
Allows you to select the device you want to connect to, and you see metadata of connected device.
3023

3124
* First we have to select the device we want to connect (boot) to, you can select that using:
3225

3326
* **Dropdown** which contains found device MX Ids. Dropdown will only get updated when starting the app.
3427
* **Specify IP** button if your OAK PoE camera isn't in the same LAN.
3528
* **Search** feature - a new window will show that has a table with all available cameras (either via USB port or on LAN - OAK PoEs), their MxId, name, and status. Clicking on a table row will select that device and boot to it.
36-
* ``Flash newest Bootloader`` button will flash the ``newest bootloader`` to the device. You can select AUTO, USB or NETWORK bootloader.
3729

38-
* **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.
39-
* **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.
40-
* **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.
41-
* ``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.
42-
* ``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.
30+
Configuration settings
31+
----------------------
4332

44-
**Configuration settings tab** - After you select a device that has bootloader flashed, you can also configure bootloader
45-
configuration.
33+
After you select a device that has bootloader flashed, you can also configure bootloader configuration.
4634

4735
- If the device has **NETWORK bootloader flashed**, you will be able to set its static/dynamic IP/mask/gateway, DNS, MAC, etc.
4836
- If the device has **USB bootloader flashed**, you will be able to set its USB max speed and USB timeout.
4937

50-
After setting some values, you have to click on the ``Flash configuration`` button. You can also flash a :ref:`DAP`,
51-
or clear the bootloader config.
38+
After setting some values, you have to click on the ``Flash configuration`` button. You can also ``Clear configuration``, or ``View configuration`` (its JSON).
39+
40+
.. figure:: https://github.com/luxonis/depthai-python/assets/18037362/4bced0ab-92fa-4a73-986f-4a3ba8848940
41+
42+
When flashing static IP, make sure to also set the gateway/mask
43+
44+
Applications settings
45+
---------------------
46+
47+
Useful when dealing with :ref:`Standalone mode` applications.
48+
49+
- **Flash application**: Select DepthAI Application Package (``.dap``) you want to flash the device. Below is a code snippet that showcases how to create the dap file.
50+
- **Remove application**: Removes/clears the flashed application from the device
51+
- **Open device streaming application**: Starts streaming frames from all connected cameras on the device.
52+
53+
.. code-block:: python
54+
55+
import depthai as dai
56+
pipeline = dai.Pipeline()
57+
# ... add nodes to pipeline
58+
dai.DeviceBootloader.saveDepthaiApplicationPackage(
59+
'./file.dap', # Where to save the .dap file
60+
pipeline, # My pipeline
61+
compress=True, # Compress the FW and assets. In my case, it went from 24MB -> 9.5MB
62+
applicationName='myAppName' # Optional, so you know which app is flashed afterwards
63+
)
64+
65+
Danger Zone
66+
-----------
67+
68+
.. warning::
69+
70+
This section can potentially soft-brick your device, so be careful when using it.
71+
72+
To prevent soft-bricking, OAK devices (since 2023) have factory bootloader and user bootloader. If user flashes a corrupted user bootloader, it will fallback to using factory bootloader. When updating bootloader,
73+
Device Manager will try to flash the user bootloader first, if flashed (factory) bootloader supports it. If it's not possible, it will flash the factory bootloader.
74+
75+
* **Update Bootloader** button will flash the newest bootloader to the device. You can select AUTO, USB or NETWORK bootloader.
76+
77+
* 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.
78+
* 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.
79+
* 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.
80+
* **Flash Factory Bootloader**: If you want to flash the factory bootloader, you can use this button. It will flash the factory bootloader, even if the user bootloader is already flashed.
81+
* **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.
82+
* **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.
5283

5384
Boot switches
5485
#############

0 commit comments

Comments
 (0)