diff --git a/51-blink1.rules b/51-blink1.rules new file mode 100644 index 0000000000000000000000000000000000000000..dedc3caf5592172c9f40d12469a6708c74074142 --- /dev/null +++ b/51-blink1.rules @@ -0,0 +1,4 @@ +# Copy this udev with "sudo cp 51-blink1.rules /etc/udev/rules.d/" +# When done, do "sudo udevadm control --reload && sudo udevadm trigger" +# Edit it to suit your type of Linux. It's currently set up for modern Ubuntu +ATTRS{idVendor}=="27b8", ATTRS{idProduct}=="01ed", MODE:="666", GROUP="plugdev" diff --git a/Makefile b/Makefile index 7220c345cc2a41cb359782eb73a98a3465ee2e3b..8d7568d545f3da851ee87317c920949456ac114b 100644 --- a/Makefile +++ b/Makefile @@ -507,6 +507,7 @@ help: @echo "make OS=macosx ... build Mac OS X blink1-lib and blink1-tool" @echo "make OS=wrt ... build OpenWrt blink1-lib and blink1-tool" @echo "make OS=wrtcross... build for OpenWrt using cross-compiler" + @echo "make HIDAPI_TYPE=LIBUSB OS=linux ... build using libusb not hidraw" @echo "make USBLIB_TYPE=HIDDATA OS=linux ... build using low-deps method" @echo "make lib ... build blink1-lib shared library" @echo "make blink1-tool... build blink1-tool program" diff --git a/README.md b/README.md index ae16492c067f006444805f6e0f64c2d83e0f19f0..ea22a4b927e36c25e0d5962bccd7f9710955fdf9 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,20 @@ eliminating the need for shared library dependencies on the target. However, static builds can be problematic for some systems with different libusb implementations, so doing `make EXEFLAGS=` will generally build a non-static version. +## OS-specific Tips + +### Linux (including Raspberry Pi) + +Unless you will always be running `blink1-tool` as the `root` user, you should +install udev rules to let any user access the blink(1) device. To install these +rules on Debian-like system (Ubuntu, Raspian), you can do something like: +``` +sudo cp 51-blink1.rules /etc/udev/rules.d/51-blink1.rules +sudo udevadm control --reload +sudo udevadm trigger +``` + + ### Building from source In general you can do: