Skip to content

Commit

Permalink
udev rules for d4xx mipi dfu access
Browse files Browse the repository at this point in the history
- set access for /dev/d4xx-dfu* to read/write by 'video' group

Signed-off-by: Dmitry Perchanov <[email protected]>
  • Loading branch information
dmipx committed Aug 4, 2022
1 parent 74a432b commit fee7770
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/99-realsense-d4xx-mipi-dfu.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SUBSYSTEM=="d4xx-class",KERNEL=="d4xx-dfu[0-9]*", GROUP="video", MODE="0660"

1 change: 1 addition & 0 deletions scripts/Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ FROM ${BASE_IMAGE} as librealsense
COPY --from=librealsense-builder /opt/librealsense /usr/local/
COPY --from=librealsense-builder /usr/lib/python3/dist-packages/pyrealsense2 /usr/lib/python3/dist-packages/pyrealsense2
COPY --from=librealsense-builder /usr/src/librealsense/config/99-realsense-libusb.rules /etc/udev/rules.d/
COPY --from=librealsense-builder /usr/src/librealsense/config/99-realsense-d4xx-mipi-dfu.rules /etc/udev/rules.d/
ENV PYTHONPATH=$PYTHONPATH:/usr/local/lib

# Install dep packages
Expand Down
1 change: 1 addition & 0 deletions scripts/libuvc_installation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ cd ./librealsense-master

echo Install udev-rules
sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo cp config/99-realsense-d4xx-mipi-dfu.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger
mkdir build && cd build
cmake ../ -DFORCE_LIBUVC=true -DCMAKE_BUILD_TYPE=release
Expand Down
2 changes: 2 additions & 0 deletions scripts/setup_udev_rules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ if [ "$install" = true ]; then
echo -e "\e[0m"
fi
sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo cp config/99-realsense-d4xx-mipi-dfu.rules /etc/udev/rules.d/
else
sudo rm /etc/udev/rules.d/99-realsense-libusb.rules
sudo rm /etc/udev/rules.d/99-realsense-d4xx-mipi-dfu.rules
fi

sudo udevadm control --reload-rules && udevadm trigger
Expand Down

0 comments on commit fee7770

Please sign in to comment.