diff options
Diffstat (limited to 'agl-documentation/candevstudio')
16 files changed, 187 insertions, 0 deletions
diff --git a/agl-documentation/candevstudio/book.json b/agl-documentation/candevstudio/book.json new file mode 100644 index 0000000..464e1b6 --- /dev/null +++ b/agl-documentation/candevstudio/book.json @@ -0,0 +1,11 @@ +{ + "title": "CanDevStudio Quickstart", + "subtitle": "Developer Documentation", + "description": "Candevstudio quickstart to launch it and use it", + "keywords": "AGL, Quickstart, candevstudio, can", + "author": "IoT.Bzh Team", + "website": "http://iot.bzh", + "published": "May 2018", + "version": "0.1", + "pdf_filename": "CanDevStudio" +} diff --git a/agl-documentation/candevstudio/docs/0-Doc-Revisions.md b/agl-documentation/candevstudio/docs/0-Doc-Revisions.md new file mode 100644 index 0000000..3485a4e --- /dev/null +++ b/agl-documentation/candevstudio/docs/0-Doc-Revisions.md @@ -0,0 +1,6 @@ +Document revisions +================== + +| Date | Version | Designation | Author | +|-------------|---------|--------------------------------------|-------------------------| +| 17 May 1018 | 0.1 | Initial release | C.Benier [ Iot.bzh ] | diff --git a/agl-documentation/candevstudio/docs/1_Usage.md b/agl-documentation/candevstudio/docs/1_Usage.md new file mode 100644 index 0000000..c926e9e --- /dev/null +++ b/agl-documentation/candevstudio/docs/1_Usage.md @@ -0,0 +1,17 @@ +# Usage + +You can find the installation part +[here](http://docs.automotivelinux.org/master/docs/devguides/en/dev/reference/host-configuration/docs/5_Candevstudio.html). + +The official repo of CanDevStudio is a subpart of GENIVI and can be found +[here](https://github.com/GENIVI/CANdevStudio/). + +Launch it with following command: + +```bash +CANdevStudio +``` + +Then start a new project. + +![CANdevStudio general screenshot](pictures/CANdevStudio.png) diff --git a/agl-documentation/candevstudio/docs/2_can_device_socketcan_backend.md b/agl-documentation/candevstudio/docs/2_can_device_socketcan_backend.md new file mode 100644 index 0000000..60a7ff6 --- /dev/null +++ b/agl-documentation/candevstudio/docs/2_can_device_socketcan_backend.md @@ -0,0 +1,35 @@ +# Bringing up a CAN device using socketcan backend + +* [Using a supported Linux CAN device](https://www.elinux.org/CAN_Bus): + +```bash +# Find your interface name (e.g. can0) +ip link +# Configure bitrate +sudo ip link set can0 type can bitrate 1000000 +# Bring the device up +sudo ip link set can0 up +# Optionally configure CAN termination +sudo ip link set can0 type can termination 1 +``` + +## Using slcand + +* Based on FTDI Serial driver +* Requires slcand to "convert" serial device to SocketCAN. +* Officially supported in Linux Kernel v2.6.38 + +```bash +# Create SocketCAN device from serial interface +sudo slcand -o -c -s8 -S1000000 /dev/ttyUSB0 can0 +# Bring the device up +sudo ip link set can0 up +``` + +## Using builtin Linux kernel virtual CAN module vcan + +```bash +sudo modprobe vcan +sudo ip link add dev can0 type vcan +sudo ip link set can0 up +``` diff --git a/agl-documentation/candevstudio/docs/3_Add_CAN_Device.md b/agl-documentation/candevstudio/docs/3_Add_CAN_Device.md new file mode 100644 index 0000000..d41b99c --- /dev/null +++ b/agl-documentation/candevstudio/docs/3_Add_CAN_Device.md @@ -0,0 +1,32 @@ +# Add a CAN device in CANdevStudio + +Start a new project and grab a ***CanDevice*** from the left pane in the +***Device Layer*** section and drop it on the grid workspace. Right-Click on it +and open its ***Properties***. Here you have to set the ***backend*** and the +***interface*** name you'll want to use. Backend available are: + +- socketcan: CAN stack present by default in the Linux Kernel. This use Linux socket and open source CAN device driver (More information here). +- systeccan: CAN bus backend using the SYS TEC CAN adapters. +- peakcan: CAN bus plugin using the PEAK CAN adapters. +- tinycan: CAN bus plugin using the MHS CAN adapters. +- vectorcan: CAN bus plugin using the Vector CAN adapters. + +More details about CANdevStudio CAN bus support [here](http://doc.qt.io/qt-5.10/qtcanbus-backends.html). + +***Interface*** is the name of the device you want to use. Bring up your CAN device and use the following command to find out which one are available: + +```bash +ip link +1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 +2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 + link/ether 90:b1:1c:6b:b2:21 brd ff:ff:ff:ff:ff:ff +3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000 + link/ether 52:54:00:56:86:80 brd ff:ff:ff:ff:ff:ff +4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN mode DEFAULT group default qlen 1000 + link/ether 52:54:00:56:86:80 brd ff:ff:ff:ff:ff:ff +5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default + link/ether 02:42:81:38:a8:75 brd ff:ff:ff:ff:ff:ff +12: can0: <NOARP,UP,LOWER_UP> mtu 72 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 + link/can +``` diff --git a/agl-documentation/candevstudio/docs/4_Configure_CanRawSender_Node.md b/agl-documentation/candevstudio/docs/4_Configure_CanRawSender_Node.md new file mode 100644 index 0000000..a78bfd2 --- /dev/null +++ b/agl-documentation/candevstudio/docs/4_Configure_CanRawSender_Node.md @@ -0,0 +1,19 @@ +# Configure a CanRawSender node + +CanRawSender node lets you set a predefined list of CAN Raw messages to send. + +![CanRawSender screenshot](pictures/canrawsender.png) + +Click on the + sign to add as much as needed signals to send. For each signals, you has to define: + +- the CAN arbitration ID +- Data load +- Loop checkbox make the signal repeat infinitely +- Interval is used with loop to define how much time between 2 sends + +Once clicked on ***Play*** button in the main Window to launch the simulation, +then each signals will be sent in the same order than defined in the +CanRawSender node then using interval to repeat themselves. + +Signals without ***loop*** checked will not be sent, you have to click manually +on the ***Send*** button to trigger a sending. diff --git a/agl-documentation/candevstudio/docs/5_Using_CanRawView.md b/agl-documentation/candevstudio/docs/5_Using_CanRawView.md new file mode 100644 index 0000000..39d3615 --- /dev/null +++ b/agl-documentation/candevstudio/docs/5_Using_CanRawView.md @@ -0,0 +1,9 @@ +# Using CanRawView + +***CanRawViewer*** is pretty simple to use, once simulation launched you'll see +signal flows in the window. You can use ***Clear*** button to wipe the window. + +![CanRawViewer screenshot](pictures/canrawviewer.png) + +Use the ***Combine*** button to stack by arbitration ID the CAN signals. +Then only the latest signal for each arbitration ID will be displayed. diff --git a/agl-documentation/candevstudio/docs/README.md b/agl-documentation/candevstudio/docs/README.md new file mode 100644 index 0000000..242b010 --- /dev/null +++ b/agl-documentation/candevstudio/docs/README.md @@ -0,0 +1,19 @@ +# Introduction + +Development tool for CAN bus simulation. + +CANdevStudio is a part of GENIVI project, you can find the github repository +[here](https://github.com/GENIVI/CANdevStudio) and the documentation +[here](https://at.projects.genivi.org/wiki/display/PROJ/CANdevStudio). + +| *Meta* | *Data* | +| -- | -- | +| **Title** | {{ config.title }} | +| **Author** | {{ config.author }} | +| **Description** | {{ config.description }} | +| **Keywords** | {{ config.keywords }} | +| **Language** | English | +| **Published** | Published {{ config.published }} as an electronic book | +| **Updated** | {{ gitbook.time }} | +| **Collection** | Open-source | +| **Website** | [{{ config.website }}]({{ config.website }}) | diff --git a/agl-documentation/candevstudio/docs/SUMMARY.md b/agl-documentation/candevstudio/docs/SUMMARY.md new file mode 100644 index 0000000..3da9fdf --- /dev/null +++ b/agl-documentation/candevstudio/docs/SUMMARY.md @@ -0,0 +1,9 @@ +# Summary + +* [Document revisions](0-Doc-Revisions.md) + +* [Usage](1_Usage.md) +* [Bringing up a CAN device using socketcan backend](2_can_device_socketcan_backend.md) +* [Add a CAN device in CANdevStudio](3_Add_CAN_Device.md) +* [Configure a CanRawSender node](4_Configure_CanRawSender_Node.md) +* [Using CanRawView](5_Using_CanRawView.md) diff --git a/agl-documentation/candevstudio/docs/api-services-book.yml b/agl-documentation/candevstudio/docs/api-services-book.yml new file mode 100644 index 0000000..fd14ac9 --- /dev/null +++ b/agl-documentation/candevstudio/docs/api-services-book.yml @@ -0,0 +1,20 @@ +type: books +books: +- + id: candevstudio + title: CanDevStudio Quickstart + description: CanDevStudio Quickstart documentation + keywords: + author: "IotBzh" + version: master + chapters: + - url: 1_Usage.md + name: Usage Guide + - url: 2_can_device_socketcan_backend.md + name: Bringing up a CAN device using socketcan backend + - url: 3_Add_CAN_Device.md + name: Add a CAN device in CANdevStudio + - url: 4_Configure_CanRawSender_Node.md + name: Configure a CanRawSender node + - url: 5_Using_CanRawView.md + name: Using CanRawView diff --git a/agl-documentation/candevstudio/docs/pictures/CANdevStudio.png b/agl-documentation/candevstudio/docs/pictures/CANdevStudio.png Binary files differnew file mode 100644 index 0000000..c944e02 --- /dev/null +++ b/agl-documentation/candevstudio/docs/pictures/CANdevStudio.png diff --git a/agl-documentation/candevstudio/docs/pictures/canrawsender.png b/agl-documentation/candevstudio/docs/pictures/canrawsender.png Binary files differnew file mode 100644 index 0000000..766ca63 --- /dev/null +++ b/agl-documentation/candevstudio/docs/pictures/canrawsender.png diff --git a/agl-documentation/candevstudio/docs/pictures/canrawviewer.png b/agl-documentation/candevstudio/docs/pictures/canrawviewer.png Binary files differnew file mode 100644 index 0000000..f20488b --- /dev/null +++ b/agl-documentation/candevstudio/docs/pictures/canrawviewer.png diff --git a/agl-documentation/candevstudio/docs/resources/iotbzh_logo.png b/agl-documentation/candevstudio/docs/resources/iotbzh_logo.png Binary files differnew file mode 100644 index 0000000..ae6bc48 --- /dev/null +++ b/agl-documentation/candevstudio/docs/resources/iotbzh_logo.png diff --git a/agl-documentation/candevstudio/docs/resources/iotbzh_logo_small.png b/agl-documentation/candevstudio/docs/resources/iotbzh_logo_small.png Binary files differnew file mode 100644 index 0000000..6a98c60 --- /dev/null +++ b/agl-documentation/candevstudio/docs/resources/iotbzh_logo_small.png diff --git a/agl-documentation/candevstudio/mkdocs.yml b/agl-documentation/candevstudio/mkdocs.yml new file mode 100644 index 0000000..66604b4 --- /dev/null +++ b/agl-documentation/candevstudio/mkdocs.yml @@ -0,0 +1,10 @@ +site_name: AGL Application Framework Binder +theme: readthedocs +docs_dir: docs +pages: +- 'Document revisions' : '0-Doc-Revisions.md' +- 'Usage': '1_Usage.md' +- 'Bringing up a CAN device using socketcan backend': '2_can_device_socketcan_backend.md' +- 'Add a CAN device in CANdevStudio': '3_Add_CAN_Device.md' +- 'Configure a CanRawSender node': '4_Configure_CanRawSender_Node.md' +- 'Using CanRawView': '5_Using_CanRawView.md' |