Skip to content

Commit

Permalink
add additional r200 connectivity fix for Ubuntu 14.04
Browse files Browse the repository at this point in the history
  • Loading branch information
ddiakopoulos committed Nov 5, 2015
1 parent 6b334c2 commit fa79ca8
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 5 deletions.
9 changes: 4 additions & 5 deletions config/99-realsense-libusb.rules
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# UVC cameras
SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0a80", MODE="0666"
SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0a66", MODE="0666"
SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0aa5", MODE="0666"
# ^ Change the vendor and product IDs to match your camera.
# RealSense UVC cameras (R200, F200, SR300)
SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0a80", MODE="0666", GROUP="plugdev", RUN+="/usr/local/bin/usb-R200-in_udev"
SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0a66", MODE="0666", GROUP="plugdev"
SUBSYSTEMS=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="8086", ATTRS{idProduct}=="0aa5", MODE="0666", GROUP="plugdev"
17 changes: 17 additions & 0 deletions config/usb-R200-in
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
lockdir="/dswork.lock"
if mkdir "$lockdir"
then
# Successfully acquired lock
for i in $(ls /sys/bus/usb/drivers/uvcvideo/|grep :) ; do
echo $i >/sys/bus/usb/drivers/uvcvideo/unbind
echo $i >/sys/bus/usb/drivers/uvcvideo/bind
echo "Reseting" $i
done

sleep 2
rm -rf "$lockdir"
else
# Cannot acquire lock. Aborting.
exit 0
fi
3 changes: 3 additions & 0 deletions config/usb-R200-in_udev
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

/usr/local/bin/usb-R200-in &
13 changes: 13 additions & 0 deletions scripts/install-r200-udev-fix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
echo "Installing R200 connectivity workaround. Unplug any DS4 connected to your machine."
echo "Press Enter to continue..."

read p

echo "Copying scripts"
sudo cp ../config/usb-R200-in /usr/local/bin/
sudo cp ../usb-R200-in_udev /usr/local/bin/

sudo chmod 666 /usr/local/bin/usb-R200-in
sudo chmod 666 /usr/local/bin/usb-R200-in_udev

echo "Done."

0 comments on commit fa79ca8

Please sign in to comment.