> For the complete documentation index, see [llms.txt](https://nxp.gitbook.io/8mmnavq/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nxp.gitbook.io/8mmnavq/navq-developer-guide/communication-protocols/can-communication.md).

# CAN

## Introduction

If you're thinking about using the CAN protocol on your drone, this guide will walk you through using our UCANS32K146 to create a CAN interface.

Since there isn't a native CAN bus on the NavQ, we can use a protocol called SLCAN to communicate CAN messages across a UART connection. We have built a binary for the UCANS32K146 that acts as an SLCAN transfer layer. This means that we can add a CAN bus to NavQ by just connecting the UCANS32K146 to the UART3 port.

![Diagram of setup](/files/-MJ2XcasJwY-ms6bQsrB)

## Setting up SLCAN on NavQ

{% hint style="info" %}
SLCAN support is enabled in the October image coming out this month.
{% endhint %}

To enable SLCAN on NavQ, run these commands:

```
$ sudo modprobe slcan
$ sudo slcand -o -t sw -s8 /dev/ttymxc2 -S 115200
$ sudo ip link set up slcan0
```

Now you can use SocketCAN or python-can to send and recieve CAN messages over the slcan0 interface. As an example, here is how to send a CAN message from the command line:

```
$ cansend slcan0 123#deadbeef
```

## Flashing your UCANS32K146 with the SLCAN conversion binary

{% hint style="info" %}
This binary is not yet available. This page will be updated with a link to the binary when it is ready.
{% endhint %}

Follow the guide at the link below to flash the SLCAN binary to your UCAN board:

{% embed url="<https://nxp.gitbook.io/nxpmobilerobotics/flashing-guide/flashing-hovergames-boards>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://nxp.gitbook.io/8mmnavq/navq-developer-guide/communication-protocols/can-communication.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
