# Canbus devices

**URL:** <https://community.cumulocity.com/t/canbus-devices/4167>\
**Category:** Forum\
**Tags:** device-connectivity, cumulocity\
**Created:** [October 31, 2023, 5:41am UTC](https://community.cumulocity.com/t/canbus-devices/4167 "2023-10-31T05:41:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rushikesh\_n](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@rushikesh\_n](https://community.cumulocity.com/u/rushikesh_n)\
**Post date:** [October 31, 2023, 5:41am UTC](https://community.cumulocity.com/t/canbus-devices/4167/1 "2023-10-31T05:41:41Z")

</div>

I have a virtual canbus interface Simulator setup (vcan0) on my linux vm, How do I create a can bus device in Cumulocity to use it

---

<div class="post-metadata">

**Author:** ![Stefan\_Witschel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/stefan_witschel/32/31955_2.png) [@Stefan\_Witschel](https://community.cumulocity.com/u/Stefan_Witschel)\
**Post date:** [October 31, 2023, 10:11am UTC](https://community.cumulocity.com/t/canbus-devices/4167/2 "2023-10-31T10:11:28Z")

</div>

You need an agent to integrate it Cumulocity IoT.

[https://cumulocity.com/guides/device-integration/introduction/](https://cumulocity.com/guides/device-integration/introduction/)

As you have a linux OS, best way to start might be [thin-edge.io](http://thin-edge.io). There is no canbus plugin available yet but would be a good starting point to install [thin-edge.io](http://thin-edge.io) and write a small canbus plugin to map the data to the local mqtt broker so it can be directly forwarded to Cumulocity IoT (or other clouds).

---

<div class="post-metadata">

**Author:** ![rushikesh\_n](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@rushikesh\_n](https://community.cumulocity.com/u/rushikesh_n)\
**Post date:** [November 10, 2023, 9:10am UTC](https://community.cumulocity.com/t/canbus-devices/4167/3 "2023-11-10T09:10:00Z")

</div>

hi @Stefan_Witschel I have installed [thin-edge.io](http://thin-edge.io) on my ubuntu Vm.how can I create a canbus plugin to map the virtual can interface (vcan) data to mosquitto, Any tutorial for creating it or any articles about it ?  
also the data generated is using the command

**cangen vcan0**

and output using:  
**candump vcan0**  
vcan0 202 [3] A3 3A 56  
vcan0 301 [7] FD D9 8A 22 FE 45 94  
vcan0 75B [8] 01 9E F3 10 3F B6 5E 45  
vcan0 2EE [3] 28 77 CD  
vcan0 68F [3] 8D A5 A5  
vcan0 1EE [4] 82 31 96 79  
vcan0 603 [5] D7 75 49 6E 8C  
vcan0 75C [8] AE AE 52 4C 5E 21 EE 2E  
vcan0 4AD [2] 3A 89  
vcan0 389 [7] AD C5 E3 0  
I have to map such data to Cumulocity

---

<div class="post-metadata">

**Author:** ![Stefan\_Witschel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/stefan_witschel/32/31955_2.png) [@Stefan\_Witschel](https://community.cumulocity.com/u/Stefan_Witschel)\
**Post date:** [November 10, 2023, 9:56am UTC](https://community.cumulocity.com/t/canbus-devices/4167/4 "2023-11-10T09:56:49Z")

</div>

You need any component written in the programming language of your choice to

1. get the data of your canbus. e.g. In python you can easily call shell commands and work with the output
2. map & send the data to the thin-edge [MQTT API](https://thin-edge.github.io/thin-edge.io/references/mqtt-api/)  
For that you need to implement a MQTT client that connects to the local MQTT Broker of [thin-edge.io](http://thin-edge.io) and send the data to the right topic and format so it can be processed in Cumulocity IoT.

Here are some examples:

> **[Sending Events | Thin-edge](https://thin-edge.github.io/thin-edge.io/start/send-events/)**
>
> How to send events with thin-edge.io

[https://thin-edge.github.io/thin-edge.io/start/send-thin-edge-data/](https://thin-edge.github.io/thin-edge.io/start/send-thin-edge-data/)

Maybe you can also start to understands the basic concepts of [thin-edge.io](http://thin-edge.io) [Concepts | Thin-edge](https://thin-edge.github.io/thin-edge.io/understand/)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [May 8, 2024, 9:57am UTC](https://community.cumulocity.com/t/canbus-devices/4167/5 "2024-05-08T09:57:17Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
