summaryrefslogtreecommitdiffstats
path: root/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/socketcan-slcan0.service.default
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/socketcan-slcan0.service.default')
-rw-r--r--meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/socketcan-slcan0.service.default16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/socketcan-slcan0.service.default b/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/socketcan-slcan0.service.default
new file mode 100644
index 0000000..e15539c
--- /dev/null
+++ b/meta-agl-profile-core/recipes-config/dev-mapping/dev-mapping/socketcan-slcan0.service.default
@@ -0,0 +1,16 @@
+[Unit]
+Description=SocketCAN serial interface slcan0 with a baudrate of 500000
+Requires=networkd.service
+After=networkd.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/sbin/modprobe slcan ; /usr/bin/slcan_attach -f -s6 -o /dev/ttyACM0 ; /usr/bin/slcand ttyACM0 slcan0 ; /sbin/ifconfig slcan0 up
+ExecReload=/sbin/ifconfig slcan0 down ; /sbin/ifconfig slcan0 up
+ExecStop=/sbin/ifconfig slcan0 down
+
+[Install]
+WantedBy=multi-user.target
+
+