Simplified doc-site generation
[AGL/documentation.git] / docs / 4_APIs_and_Services / 4.5_Message_Signaling / 7_CanDevStudio_Quickstart / candevstudio / 3_Add_CAN_Device.md
1 ---
2 edit_link: ''
3 title: Add a CAN device in CANdevStudio
4 origin_url: >-
5   https://raw.githubusercontent.com/automotive-grade-linux/docs-sources/master/agl-documentation/candevstudio/docs/3_Add_CAN_Device.md
6 ---
7
8 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/apis_services/master/candevstudio-developer-guides-api-services-book.yml -->
9
10 # Add a CAN device in CANdevStudio
11
12 Start a new project and grab a ***CanDevice*** from the left pane in the
13 ***Device Layer*** section and drop it on the grid workspace. Right-Click on it
14 and open its ***Properties***. Here you have to set the ***backend*** and the
15 ***interface*** name you'll want to use. Backend available are:
16
17 - socketcan: CAN stack present by default in the Linux Kernel. This use Linux socket and open source CAN device driver (More information here).
18 - systeccan: CAN bus backend using the SYS TEC CAN adapters.
19 - peakcan: CAN bus plugin using the PEAK CAN adapters.
20 - tinycan: CAN bus plugin using the MHS CAN adapters.
21 - vectorcan: CAN bus plugin using the Vector CAN adapters.
22
23 More details about CANdevStudio CAN bus support [here](http://doc.qt.io/qt-5.10/qtcanbus-backends.html).
24
25 ***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:
26
27 ```bash
28 ip link
29 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
30     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
31 2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
32     link/ether 90:b1:1c:6b:b2:21 brd ff:ff:ff:ff:ff:ff
33 3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
34     link/ether 52:54:00:56:86:80 brd ff:ff:ff:ff:ff:ff
35 4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN mode DEFAULT group default qlen 1000
36     link/ether 52:54:00:56:86:80 brd ff:ff:ff:ff:ff:ff
37 5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default
38     link/ether 02:42:81:38:a8:75 brd ff:ff:ff:ff:ff:ff
39 12: can0: <NOARP,UP,LOWER_UP> mtu 72 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
40     link/can
41 ```