diff --git a/docs/source/components/bootloader.rst b/docs/source/components/bootloader.rst index 71716e13d..87927e32a 100644 --- a/docs/source/components/bootloader.rst +++ b/docs/source/components/bootloader.rst @@ -3,18 +3,59 @@ Bootloader ========== -Depthai bootloader is a small program which aids in booting and updating bootloader or depthai application packages. +DepthAI bootloader is a small program which **handles the booting process**, either by **booting the flashed application**, +or by **initializing the OAK PoE camera** so DepthAI API can connect to it. -To be able to run standalone (:ref:`documentation here `), the Depthai bootloader must be first -flashed to the devices flash. This step is required only once. +To be able to run in :ref:`Standalone mode`, the Depthai bootloader must be first flashed to the devices flash. +This step is required only once. Once the device has the bootloader flashed, it will perform the same as before. Running pipelines with a host -connected doesn’t require any changes. +connected doesn't require any changes. Suggested workflow is to perform as much of development as possible with the host connected as the iteration cycle is greatly improved. -Once desired pipeline is created, use the following function to flash: :code:`DeviceBootloader::flash` +Device Manager +############## + +``device_manager.py`` is a Python helper that interfaces with device :ref:`Bootloader` and bootloader configuration. +It can be found at `depthai-python/utilities `__. + +.. image:: https://user-images.githubusercontent.com/18037362/170479657-faacd06d-5f7e-4215-a821-005d58a5f379.png + +Device Manager Usage +-------------------- + +**About device tab** - Select a camera to see its metadata - like MxID, flashed bootloader version, device state etc. + +* 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). +* ``Flash newest Bootloader`` button will flash the ``newest bootloader`` to the device. You can select AUTO, USB or NETWORK bootloader. + + * **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. + * **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. + * **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. + +* ``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. +* ``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. + +**Configuration settings tab** - After you select a device that has bootloader flashed, you can also configure bootloader +configuration. + +- If the device has **NETWORK bootloader flashed**, you will be able to set its static/dynamic IP/mask/gateway, DNS, MAC, etc. +- If the device has **USB bootloader flashed**, you will be able to set its USB max speed and USB timeout. + +After setting some values, you have to click on the ``Flash configuration`` button. You can also flash a :ref:`DAP`, +or clear the bootloader config. + +Boot switches +############# + +- **Boot from flash** - DIP switch: 0x03 (switches 5,6 ON) - used by OAK PoE and USB cameras when bootloader is installed. +- **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. + +.. image:: https://user-images.githubusercontent.com/18037362/154956812-c3fcc961-af46-4dfd-8080-e15c8c6b43f0.png + +OAK-D-PoE with switches 2,4,5 ON, for the purpose of connecting to the device via USB. API ### @@ -33,15 +74,15 @@ or update the bootloader itself. progressCb parameter takes a callback function, which will be called each time an progress update occurs (rate limited to 1 second). This is mainly used to inform the user of the current flashing progress. -You can also check the version of the current bootloader by using the :ref:`Bootloader Version` example. +.. _DAP: DepthAI Application Package (.dap) ################################## -Depthai application package is a binary file format which stores sections of data. The purpose of this format is to be able to extract +**DepthAI application package** is a binary file format which stores sections of data. The purpose of this format is to be able to extract individual sections and do OTA updates without requiring to update all data. Example: Between update 1 and 2 of users application, Depthai firmware, Asset storage (50MiB neural network) and asset structure remained the same, but some additional processing nodes were added -to the pipeline. Instead of transferring the whole package only Pipeline description can be sent and updated. +to the pipeline. Instead of transferring the whole package, only Pipeline description can be sent and updated. Depthai application package (**.dap**) consists of: diff --git a/docs/source/samples/bootloader/bootloader_config.rst b/docs/source/samples/bootloader/bootloader_config.rst index 67fdab1c8..ce767e20e 100644 --- a/docs/source/samples/bootloader/bootloader_config.rst +++ b/docs/source/samples/bootloader/bootloader_config.rst @@ -6,6 +6,9 @@ the :code:`.json` bootloader config file via cmd arguments, which will get flash Click on :ref:`Bootloader` for more information. +.. note:: + We suggest using :ref:`Device Manager`, a GUI tool for interfacing with the bootloader and its configurations. + Demo #### diff --git a/docs/source/samples/bootloader/bootloader_version.rst b/docs/source/samples/bootloader/bootloader_version.rst index 85382df52..7b2479a78 100644 --- a/docs/source/samples/bootloader/bootloader_version.rst +++ b/docs/source/samples/bootloader/bootloader_version.rst @@ -5,6 +5,9 @@ This example shows basic bootloader interaction, retrieving the version of bootl Click on :ref:`Bootloader` for more information. +.. note:: + We suggest using :ref:`Device Manager`, a GUI tool for interfacing with the bootloader and its configurations. + Demo #### diff --git a/docs/source/samples/bootloader/flash_bootloader.rst b/docs/source/samples/bootloader/flash_bootloader.rst index 27f0a27df..4b4b9e32e 100644 --- a/docs/source/samples/bootloader/flash_bootloader.rst +++ b/docs/source/samples/bootloader/flash_bootloader.rst @@ -6,6 +6,9 @@ have flash on-board. Click on :ref:`Bootloader` for more information. +.. note:: + We suggest using :ref:`Device Manager`, a GUI tool for interfacing with the bootloader and its configurations. + Demo #### diff --git a/docs/source/samples/bootloader/poe_set_ip.rst b/docs/source/samples/bootloader/poe_set_ip.rst index 7a7430318..a8c9867f5 100644 --- a/docs/source/samples/bootloader/poe_set_ip.rst +++ b/docs/source/samples/bootloader/poe_set_ip.rst @@ -8,6 +8,9 @@ This script allows you to set static or dynamic IP, or clear bootloader config o device (you won't be able to access it), and will have to `factory reset `__ your OAK PoE. +.. note:: + We suggest using :ref:`Device Manager`, a GUI tool for interfacing with the bootloader and its configurations. + Demo #### diff --git a/utilities/README.md b/utilities/README.md new file mode 100644 index 000000000..e2c12c0b7 --- /dev/null +++ b/utilities/README.md @@ -0,0 +1,9 @@ +# Utilities + +This folder contains DepthAI utility tools. + +## Device Manager + +![Device Manager](https://user-images.githubusercontent.com/18037362/170479657-faacd06d-5f7e-4215-a821-005d58a5f379.png) + +``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. diff --git a/utilities/device_manager.py b/utilities/device_manager.py index 73ad57a37..aa408a01b 100644 --- a/utilities/device_manager.py +++ b/utilities/device_manager.py @@ -315,7 +315,7 @@ def connectToDevice(device): [sg.Text("About device", size=(30, 1), font=('Arial', 30, 'bold'), text_color="black")], [sg.HSeparator()], [ - sg.Button("Device select", size=(15, 1), font=('Arial', 10, 'bold'), disabled=True, key="aboutFake"), + sg.Button("About device", size=(15, 1), font=('Arial', 10, 'bold'), disabled=True, key="aboutFake"), sg.Button("Config", size=(15, 1), font=('Arial', 10, 'bold'), disabled=False, key="configReal") ], [sg.HSeparator()], @@ -366,7 +366,7 @@ def connectToDevice(device): [sg.Text("Configuration settings", size=(20, 1), font=('Arial', 30, 'bold'), text_color="black")], [sg.HSeparator()], [ - sg.Button("Device select", size=(15, 1), font=('Arial', 10, 'bold'), disabled=False, key="aboutReal"), + sg.Button("About device", size=(15, 1), font=('Arial', 10, 'bold'), disabled=False, key="aboutReal"), sg.Button("Config", size=(15, 1), font=('Arial', 10, 'bold'), disabled=True, key="configFake"), # TODO create library tab # sg.Button("Library", size=(15, 1), font=('Arial', 10, 'bold'), disabled=True, key="configLib"),