You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/install.rst
+71-8Lines changed: 71 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,14 +16,14 @@ Supported Platforms
16
16
17
17
We keep up-to-date, pre-compiled, libraries for the following platforms. Note that a new change is that for Ubuntu now also work unchanged for the Jetson/Xavier series:
The script that the udev rule is calling (movidius_usb_hotplug.sh) should then attach/detach the USB device to the virtual machine.
169
+
In this case we need to call :code:`virsh` command. For example, the script could do the following:
170
+
171
+
.. code-block:: bash
172
+
173
+
#!/bin/bash
174
+
# Abort script execution on errors
175
+
set -e
176
+
if [ "${ACTION}"=='bind' ];then
177
+
COMMAND='attach-device'
178
+
elif [ "${ACTION}"=='remove' ];then
179
+
COMMAND='detach-device'
180
+
if [ "${PRODUCT}"=='3e7/2485/1' ];then
181
+
ID_VENDOR_ID=03e7
182
+
ID_MODEL_ID=2485
183
+
fi
184
+
if [ "${PRODUCT}"=='3e7/f63b/100' ];then
185
+
ID_VENDOR_ID=03e7
186
+
ID_MODEL_ID=f63b
187
+
fi
188
+
else
189
+
echo"Invalid udev ACTION: ${ACTION}">&2
190
+
exit 1
191
+
fi
192
+
echo"Running virsh ${COMMAND}${DOMAIN} for ${ID_VENDOR}.">&2
193
+
virsh "${COMMAND}""${DOMAIN}" /dev/stdin <<END
194
+
<hostdev mode='subsystem' type='usb'>
195
+
<source>
196
+
<vendor id='0x${ID_VENDOR_ID}'/>
197
+
<product id='0x${ID_MODEL_ID}'/>
198
+
</source>
199
+
</hostdev>
200
+
END
201
+
exit 0
202
+
203
+
204
+
Note that when the device is disconnected from the USB bus, some udev environmental variables are not available (:code:`ID_VENDOR_ID` or :code:`ID_MODEL_ID`),
205
+
that is why you need to use :code:`PRODUCT` environmental variable to identify which device has been disconnected.
206
+
207
+
The virtual machine where DepthAI API application is running should have defined a udev rules that identify the OAK-D camera.
208
+
The udev rule is decribed `here <https://docs.luxonis.com/en/latest/pages/faq/#does-depthai-work-on-the-nvidia-jetson-series>`__
209
+
210
+
Solution provided by `Manuel Segarra-Abad <https://github.com/maseabunikie>`__
0 commit comments