summaryrefslogtreecommitdiffstats
path: root/_to_remove/recipes-kernel/sllin/files/start_lin_demo.sh
diff options
context:
space:
mode:
Diffstat (limited to '_to_remove/recipes-kernel/sllin/files/start_lin_demo.sh')
-rwxr-xr-x_to_remove/recipes-kernel/sllin/files/start_lin_demo.sh59
1 files changed, 59 insertions, 0 deletions
diff --git a/_to_remove/recipes-kernel/sllin/files/start_lin_demo.sh b/_to_remove/recipes-kernel/sllin/files/start_lin_demo.sh
new file mode 100755
index 000000000..c7627ca74
--- /dev/null
+++ b/_to_remove/recipes-kernel/sllin/files/start_lin_demo.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+# Attach serial LIN->CAN bridge and set up LIN polling
+if [ -c /dev/ttyUSB0 ]; then
+ sleep 1
+ /usr/bin/lin_config -c /etc/lin_config.conf -a sllin:/dev/ttyUSB0
+ mkdir -p /run/lin_config/
+ pidof lin_config > /run/lin_config/lin_config.pid
+ sleep 1
+else
+ ip link add dev sllin0 type vcan
+fi
+ip link set sllin0 up
+
+# Initialize HVAC controller
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 02A#
+usleep 100000
+cansend sllin0 02B#
+usleep 100000
+cansend sllin0 032#F0F8FFFFFFFFFFFF
+usleep 100000
+cansend sllin0 032#F0F8FFFFFFFFFFFF
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 030#
+usleep 100000
+cansend sllin0 02D#
+usleep 100000
+cansend sllin0 02C#
+usleep 100000
+cansend sllin0 02D#
+usleep 100000
+cansend sllin0 02C#
+usleep 100000
+