@@ -55,6 +55,115 @@ subnet, you can specify the device (either with MxID, IP, or USB port name) you
5555 with depthai.Device(pipeline, device_info) as device:
5656 # ...
5757
58+
59+ Watchdog
60+ ########
61+
62+ Understanding the Watchdog Mechanism in POE Devices
63+ ----------------------------------------------------
64+
65+ The watchdog is a crucial component in the operation of POE (Power over Ethernet) devices with DepthAI. When DepthAI disconnects from a POE device, the watchdog mechanism is the first to respond, initiating a reset of the camera. This reset is followed by a complete system reboot, which includes the loading of the DepthAI bootloader and the initialization of the entire networking stack.
66+
67+ .. note ::
68+ This process is necessary to make the camera available for reconnection and typically takes about 10 seconds, which means the fastest possible reconnection time is 10 seconds.
69+ Customizing the Watchdog Timeout
70+ --------------------------------
71+
72+ .. tabs ::
73+
74+ .. tab :: **Linux/MacOS**
75+
76+ Set the environment variables `DEPTHAI_WATCHDOG_INITIAL_DELAY ` and `DEPTHAI_BOOTUP_TIMEOUT ` to your desired timeout values (in milliseconds) as follows:
77+
78+ .. code-block :: bash
79+
80+ DEPTHAI_WATCHDOG_INITIAL_DELAY=< my_value> DEPTHAI_BOOTUP_TIMEOUT=< my_value> python3 script.py
81+
82+ .. tab :: **Windows PowerShell**
83+
84+ For Windows PowerShell, set the environment variables like this:
85+
86+ .. code-block :: powershell
87+
88+ $env: DEPTHAI_WATCHDOG_INITIAL_DELAY = < my_value>
89+ $env: DEPTHAI_BOOTUP_TIMEOUT = < my_value>
90+ python3 script.py
91+
92+ .. tab :: **Windows CMD**
93+
94+ In Windows CMD, you can set the environment variables as follows:
95+
96+ .. code-block :: guess
97+
98+ set DEPTHAI_WATCHDOG_INITIAL_DELAY=<my_value>
99+ set DEPTHAI_BOOTUP_TIMEOUT=<my_value>
100+ python3 script.py
101+
102+ Code-Based Configuration
103+ ------------------------
104+
105+ Alternatively, you can set the timeout directly in your code:
106+
107+ .. code-block :: python
108+
109+ pipeline = depthai.Pipeline()
110+
111+ # Create a BoardConfig object
112+ config = depthai.BoardConfig()
113+
114+ # Set the parameters
115+ config.watchdogInitialDelayMs = < my_value>
116+ config.watchdogTimeoutMs = < my_value>
117+
118+ pipeline.setBoardConfig(config)
119+
120+ By adjusting these settings, you can tailor the watchdog functionality to better suit your specific requirements.
121+
122+
123+ Environment Variables
124+ #####################
125+
126+ The following table lists various environment variables used in the system, along with their descriptions:
127+
128+ .. list-table ::
129+ :widths: 50 50
130+ :header-rows: 1
131+
132+ * - Environment Variable
133+ - Description
134+ * - `DEPTHAI_LEVEL `
135+ - Sets logging verbosity, options: 'trace', 'debug', 'warn', 'error', 'off'
136+ * - `XLINK_LEVEL `
137+ - Sets logging verbosity of XLink library, options: 'debug', 'info', 'warn', 'error', 'fatal', 'off'
138+ * - `DEPTHAI_INSTALL_SIGNAL_HANDLER `
139+ - Set to 0 to disable installing Backward signal handler for stack trace printing
140+ * - `DEPTHAI_WATCHDOG `
141+ - Sets device watchdog timeout. Useful for debugging (DEPTHAI_WATCHDOG=0), to prevent device reset while the process is paused.
142+ * - `DEPTHAI_WATCHDOG_INITIAL_DELAY `
143+ - Specifies delay after which the device watchdog starts.
144+ * - `DEPTHAI_SEARCH_TIMEOUT `
145+ - Specifies timeout in milliseconds for device searching in blocking functions.
146+ * - `DEPTHAI_CONNECT_TIMEOUT `
147+ - Specifies timeout in milliseconds for establishing a connection to a given device.
148+ * - `DEPTHAI_BOOTUP_TIMEOUT `
149+ - Specifies timeout in milliseconds for waiting the device to boot after sending the binary.
150+ * - `DEPTHAI_PROTOCOL `
151+ - Restricts default search to the specified protocol. Options: any, usb, tcpip.
152+ * - `DEPTHAI_DEVICE_MXID_LIST `
153+ - Restricts default search to the specified MXIDs. Accepts comma separated list of MXIDs. Lists filter results in an "AND" manner and not "OR"
154+ * - `DEPTHAI_DEVICE_ID_LIST `
155+ - Alias to MXID list. Lists filter results in an "AND" manner and not "OR"
156+ * - `DEPTHAI_DEVICE_NAME_LIST `
157+ - Restricts default search to the specified NAMEs. Accepts comma separated list of NAMEs. Lists filter results in an "AND" manner and not "OR"
158+ * - `DEPTHAI_DEVICE_BINARY `
159+ - Overrides device Firmware binary. Mostly for internal debugging purposes.
160+ * - `DEPTHAI_BOOTLOADER_BINARY_USB `
161+ - Overrides device USB Bootloader binary. Mostly for internal debugging purposes.
162+ * - `DEPTHAI_BOOTLOADER_BINARY_ETH `
163+ - Overrides device Network Bootloader binary. Mostly for internal debugging purposes.
164+
165+
166+
58167Multiple devices
59168################
60169
0 commit comments