Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions studierbot/interface/can/77-evo-slcand.rules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# USBtin module
ACTION=="add", ENV{SUBSYSTEM}=="tty", GROUP="dialout", MODE="0666", ATTRS{product}=="USBtin", RUN+="/usr/bin/logger [udev] USBtin detected, creating symlink ttyEvoCan ", SYMLINK+="ttyEvoCan"
ACTION=="remove", ENV{ID_SERIAL_SHORT}=="A0212656", RUN+="/usr/bin/pkill slcand"
ACTION=="add", ENV{SUBSYSTEM}=="tty", GROUP="dialout", MODE="0666", ATTRS{product}=="USBtin", RUN+="/usr/bin/logger [udev] USBtin detected, creating symlink ttyEvoCan ", SYMLINK+="ttyEvoCan", ENV{SYSTEMD_WANTS}="slcand.service"
#ACTION=="remove", ENV{ID_SERIAL_SHORT}=="A0212656", RUN+="/usr/bin/pkill slcand"
10 changes: 10 additions & 0 deletions studierbot/interface/can/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
all:
echo 'No rule for make all existing. Please run "sudo make install" to install the udev rule and systemd service.'

install:
install -D -m644 77-evo-slcand.rules /etc/udev/rules.d/77-evo-slcand.rules
install -D -m644 slcand.service /etc/systemd/system/slcand.service

remove:
remove /etc/udev/rules.d/77-evo-slcand.rules
remove /etc/systemd/system/slcand.service
10 changes: 10 additions & 0 deletions studierbot/interface/can/slcand.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
BindsTo=dev-ttyEvoCan.device
After=dev-ttyEvoCan.device

[Service]
Type=simple
ExecStart=/usr/bin/slcand -F -f -s6 -o -c /dev/ttyEvoCan
ExecStartPost=/bin/ip link set slcan0 up
User=root
Group=root