From 5418b40ecc8c920a2a9ef74e0159c88e51eb0e6a Mon Sep 17 00:00:00 2001 From: Anders Sandstrom Date: Mon, 1 Mar 2021 11:16:17 +0100 Subject: [PATCH] Add some notes --- docs/readmeCanOpenSocket.md | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 docs/readmeCanOpenSocket.md diff --git a/docs/readmeCanOpenSocket.md b/docs/readmeCanOpenSocket.md new file mode 100644 index 0000000..1f88eb9 --- /dev/null +++ b/docs/readmeCanOpenSocket.md @@ -0,0 +1,55 @@ + + +git clone https://github.com/linux-can/can-utils +cd can-utils +make +sudo make install + + +git clone git https://github.com/CANopenNode/CANopenSocket.git +cd CANopenSocket +git submodule init +git submodule update +cd tools +./get_tools.sh + + +cd CANopenNode +make + +update gcc if needed (if error at __has_include): +sudo yum install centos-release-scl +sudo yum install devtoolset-7-gcc* +scl enable devtoolset-7 bash +which gcc +gcc --version + +fatal error: bits/getopt_core.h: +Modify CO_main_basic.c: +//#include +#include + + +Follow this to test: +https://github.com/CANopenNode/CANopenNode/blob/master/doc/gettingStarted.md +sudo modprobe vcan +sudo ip link add dev vcan0 type vcan +sudo ip link set up vcan0 + + +candump vcan0 +./canopend --help +./canopend vcan0 -i 4 -s od4_storage -a od4_storage_auto +Seems not suppoer "-a" option so remove that: +./canopend vcan0 -i 4 -s od4_storage + +update + + +Checkout master of CanopenNode to make it work like in gettingStarted.md + +needed to use this as the canid 1 device: +echo "-" > od1_storage +echo "-" > od1_storage_auto +./canopend vcan0 -i 1 -c "stdio" -s od1_storage -a od1_storage_auto +