X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=recipes-kernel%2Fsllin%2Ffiles%2Fstart_lin_demo.sh;h=c7627ca7435a00fd4c84766fee08468c625a430e;hb=05a4f8c51b2ed6a23e60e4cc6b1a6975a75a39a0;hp=741189fb7635760007f3fe1c3bae09d78191e68f;hpb=331b3ee60c36697ce85fb6806c82fdeec8183150;p=AGL%2Fmeta-agl-demo.git diff --git a/recipes-kernel/sllin/files/start_lin_demo.sh b/recipes-kernel/sllin/files/start_lin_demo.sh index 741189fb7..c7627ca74 100755 --- a/recipes-kernel/sllin/files/start_lin_demo.sh +++ b/recipes-kernel/sllin/files/start_lin_demo.sh @@ -1,10 +1,18 @@ #!/bin/sh -sleep 1 -ldattach 25 /dev/ttySC3 -pidof ldattach > /var/run/lin_ldattach -sleep 1 +# 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