Skip to content

Commit 99caee4

Browse files
committed
Add udev script for Linux
1 parent 5820bb4 commit 99caee4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

scripts/create_dfu_udev_rule

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
#
3+
4+
if [ "$(id -u)" != "0" ]; then
5+
echo "This script must be run as root"
6+
exit
7+
fi
8+
9+
NAME=99-arduino-uno-wifi-rev2.rules
10+
11+
echo >/etc/udev/rules.d/$NAME
12+
echo \# Arduino UNO WiFi Rev2 mEDBG CMSIS-DAP >>/etc/udev/rules.d/$NAME
13+
echo SUBSYSTEM==\"tty\", ENV{ID_REVISION}==\"03eb\", ENV{ID_MODEL_ID}==\"2145\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\", ENV{ID_MM_CANDIDATE}=\"0\" >>/etc/udev/rules.d/$NAME
14+
echo SUBSYSTEM==\"usb\", ATTR{idVendor}==\"03eb\", ATTR{idProduct}==\"2145\", MODE=\"0666\", ENV{ID_MM_DEVICE_IGNORE}=\"1\" >>/etc/udev/rules.d/$NAME
15+
16+
udevadm control --reload-rules
17+
udevadm trigger

0 commit comments

Comments
 (0)