# Hardware Peripherals

{% hint style="warning" %}
These APIs are likely to change in future API versions. Key functionality will remain.
{% endhint %}

Accessing hardware connected to Skynode can be achieved by mapping the correct device file into the app container.

{% hint style="danger" %}
The UART port on Skynode is connected to the FMU and can thus not be used to connect serial peripherals to apps. To connect UART payloads to Skynode, use a UART-to-USB adapter chip, like the FTDI series of chips.
{% endhint %}

### Libusb devices

Devices that can be mounted with libusb user-space drivers can be mapped like this

* Map `/dev` from the host to your containter
* Add `c 189:* rmw` cgroup rule

This can be done like this, by using the [compose-override](/app-development/app-framework/compose-override.md) functionality in auterion-app.yml:

```yaml
compose-override:
    services:
        my-service:     # Replace with the name of your service
            volumes:
                - /dev:/dev
            device_cgroup_rules:
                - 'c 189:* rmw'
```

### Serial-to-USB devices

Similarly to libusb devices, serial to usb devices can be mapped like so

<pre class="language-yaml"><code class="lang-yaml"><strong>compose-override:
</strong><strong>    services:
</strong>        my-service:    # Replace with the name of your service
            volumes:
                - /dev:/dev
            device_cgroup_rules:
                - 'c 166:* rmw'  # For CDC / ACM devices
                - 'c 188:* rmw'  # For tty devices (FTDI)
</code></pre>

### Video for Linux (v4l) devices

Similarly to the other devices types, these devices can be mapped like so

```yaml
compose-override:
    services:
        my-service:    # Replace with the name of your service
            volumes:
                - /dev:/dev
            device_cgroup_rules:
                - 'c 81:* rmw' 
```

{% hint style="danger" %}
There is currently no managed access de-confliction for devices. When a device gets opened by one app, other apps can not open this device anymore.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.auterion.com/app-development/app-framework/peripherals-hardware.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
