Custom apps

The CANsub provides a 100% open REST/WebSocket API. You are free to build custom apps/integrations for the CANsub - webCAN, SavvyCAN and PlotJuggler are all examples of this.

Note

We strongly recommend seeing our AI assistants guide when building custom apps


REST + WebSocket API

The REST API is used for device configuration and state monitoring, while the WebSocket API is used for live data transfer (CAN bus data). Full API details can be found in the CANsub Docs:


Python apps

For custom Python apps use our python-can integration as the starting point, which handles:

  • Device discovery & configuration

  • WebSocket framing and reconnection for raw data streaming

  • DBC decoding via python-can packages like cantools

The python-can integration lets you immediately integrate with numerous open source CAN bus tools - or build fully custom apps in seconds (as showcased in our Python demos section).


Linux apps (SocketCAN)

On Linux, our SocketCAN daemon exposes the CANsub as a standard SocketCAN network interface. This lets you build (or reuse) any SocketCAN-based app, in any language, without touching the REST / WebSocket API directly - e.g. C apps using the kernel socket API.


Desktop GUI apps (Qt)

For custom desktop GUI apps use our Qt plugin (C++) as the starting point, which handles below:

  • Device discovery & configuration

  • WebSocket framing and reconnection for raw data streaming

  • DBC decoding supported natively in Qt6

The Qt plugin powers e.g. our SavvyCAN and PlotJuggler integrations.


Web apps

The REST/WebSocket API makes the CANsub uniquely suited for web apps/integrations - with webCAN being one example of this.

For custom web app development we expect later to provide useful JS/TS libraries as starting points. If you are interested in getting early access, contact us.


Tips & tricks

Below are some general recommendations when building custom CANsub apps:

Dynamic input fields

To ensure an app is reusable across different CAN applications and devices, it is strongly recommended to always include the below fields (see also this Python demo):

  • Device endpoint (e.g. https://1f72d84a-usb.local) - optionally with mDNS-based auto-detection

  • CAN channel (e.g. dropdown with CAN1, CAN2)[1]

  • Nominal bit-rate (e.g. 500000)

  • Data bit-rate (e.g. 1000000)

  • DBC file loader

  • A ‘connect/disconnect’ button (never ‘auto connect on boot’ - the bit-rate may e.g. be wrong)


Python vs. Qt vs. web

When you aim to build a custom app, your first choice will be what platform to start from.

For most use cases, Python will be a good starting point as it lets you quickly create very simple apps - while also enabling advanced functionality due to the extensive add-on tools that work with python-can (see e.g. our protocols section). If you are just building an ad hoc tool for use by yourself or your own team, this is often the best starting point. On Linux, the SocketCAN daemon is an alternative starting point if you have existing SocketCAN-based apps/tools.

The downside of Python is sharing: End users either need Python installed, or you bundle the app into an *.exe (e.g. via PyInstaller), which tends to be large, per-OS and prone to antivirus flags[2]. For polished desktop apps you distribute to others, a Qt plugin app (C++) instead compiles to a lean native *.exe - at the cost of more complex development and CAN libraries/packages that are not as rich as in Python.

Web apps (like webCAN) offer the unique advantage that they work on any operating system (Windows, Linux, MacOS) and any device (PC, tablet, phone) out-the-box. Configuration and data processing is done purely in the browser, meaning users do not have to install any software to use the app[3]. The CANsub is uniquely suited for web apps as it will be exposed as an identical network interface via both USB/Ethernet - with a web-native REST/WebSocket API. A web app can be compiled e.g. to a simple HTML file that can be used offline, or hosted on a local network for sharing in a team. In other words, web apps offer unique convenience for end users and offer many useful open source libraries like Python - however, for CAN-specific protocol implementations you will need to build more things from scratch.