diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-10-22 14:58:56 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-10-22 14:58:56 +0900 |
commit | 4204309872da5cb401cbb2729d9e2d4869a87f42 (patch) | |
tree | c7415e8600205e40ff7e91e8e5f4c411f30329f2 /meta-agl-demo/recipes-kernel/sllin/files/start_lin_demo.sh | |
parent | 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (diff) |
agl-basesystem 0.1sandbox/ToshikazuOhiwa/master
Diffstat (limited to 'meta-agl-demo/recipes-kernel/sllin/files/start_lin_demo.sh')
-rwxr-xr-x | meta-agl-demo/recipes-kernel/sllin/files/start_lin_demo.sh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/meta-agl-demo/recipes-kernel/sllin/files/start_lin_demo.sh b/meta-agl-demo/recipes-kernel/sllin/files/start_lin_demo.sh index 741189fb..26f64c0a 100755 --- a/meta-agl-demo/recipes-kernel/sllin/files/start_lin_demo.sh +++ b/meta-agl-demo/recipes-kernel/sllin/files/start_lin_demo.sh @@ -1,10 +1,17 @@ #!/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 + pidof lin_config > /var/run/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 |