> For the complete documentation index, see [llms.txt](https://docs.labii.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.labii.com/widgets/column-widgets/device.md).

# Device

## Overview

Device-related widgets are user interface elements that allow users to interact with and control various hardware components of their device such as the camera, microphone, and GPS.

## Serial Port

[Serial Port](https://www.labii.com/widgets/serial-port/) is a widget that can read data from a serial port and support RS-232 communication protocol. The widget has a user interface that allows the user to configure the serial port settings, such as baud rate and number of data bits, and display the incoming data in a readable format, and write data back to device.

{% embed url="<https://youtu.be/HazpAhwE7QY>" %}

**Readonly view:**

Click the **Write** button to write data to serial port.

<figure><img src="https://3607108856-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LHVg57XIRcjV-Vbubtn%2Fuploads%2Fgit-blob-d2cfaf16e046e14733cd255aab389a6afc55a631%2Fwidget-column-serialport-readonly.webp?alt=media" alt=""><figcaption></figcaption></figure>

**Edit view:**

Click the Connect button to read data from serial port.

<figure><img src="https://3607108856-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LHVg57XIRcjV-Vbubtn%2Fuploads%2Fgit-blob-8b02b13def9d17c4f17e06dcb5fc685cca0b3978%2Fwidget-column-serialport-edit.webp?alt=media" alt=""><figcaption></figcaption></figure>

\
**Form view:**

Same as the Edit view.

**Configuration:**

<figure><img src="https://3607108856-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LHVg57XIRcjV-Vbubtn%2Fuploads%2Fgit-blob-26a9837dfd1dde82e5971387bbc6fec5793b5c05%2Fwidget-column-serialport-configuration.webp?alt=media" alt=""><figcaption></figcaption></figure>

**Default value:**

Any text.

**Import value:**

Any text.

## NFC

NFC (Near Field Communication) reader and writer widgets are user interface elements that allow users to interact with and control NFC-enabled devices. The NFC widget can be used to read data from an NFC tag or card, and write data to an NFC tag or card. The widget is currently only working in Android Chrome.

**Readonly view:**

<figure><img src="https://3607108856-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LHVg57XIRcjV-Vbubtn%2Fuploads%2Fgit-blob-99f4cdc26d32bee8ac8d364c78222ae74d65a90f%2Fwidget-column-nfc-readonly.webp?alt=media" alt=""><figcaption></figcaption></figure>

**Edit view:**

The data will be read into the input box when your cell phone is close to a NFC tag.

<figure><img src="https://3607108856-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LHVg57XIRcjV-Vbubtn%2Fuploads%2Fgit-blob-93fa0d6160e9f76d77eac1013e06886fad444dc2%2Fwidget-column-nfc-edit.webp?alt=media" alt=""><figcaption></figcaption></figure>

**Form view:**

The data will be read into the input box when your cell phone is close to a NFC tag.

<figure><img src="https://3607108856-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LHVg57XIRcjV-Vbubtn%2Fuploads%2Fgit-blob-2a95a3ad5b0da85ac65a42c899c0ff9f0da7693a%2Fwidget-column-nfc-form.webp?alt=media" alt=""><figcaption></figcaption></figure>

**Configuration:**

<figure><img src="https://3607108856-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LHVg57XIRcjV-Vbubtn%2Fuploads%2Fgit-blob-aa285337d3f376d3a16f83d36d221192aa6a84a3%2Fwidget-column-nfc-configuration.webp?alt=media" alt=""><figcaption></figcaption></figure>

**Default value:**

Any text.

**Import value:**

Any text.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.labii.com/widgets/column-widgets/device.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
