# 使用bluetoothctl管理藍芽裝置

啟用 Bluetoothctl 管理\
\
\# bluetoothctl\
\
列示 bluetooth dungle 裝置 mac\
\
\[bluetooth]# list<br>

\
指定控制的藍牙裝置\
\
\[bluetooth]# select \[local mac address]\
\
啟用藍牙裝置\
\
\[bluetooth]# power on\
\
打開掃描功能\
\
\[bluetooth]# scan on\
\
打開 agent\
\
\[bluetooth]# agent on\
\
畫面這時會閃現裝置掃描到的可連接藍牙裝置\
\
信任要連接的裝置mac\
\
\[bluetooth]# trust \[BT mac address]\
\
與連接裝置做 pair 動作\
\
\[bluetooth]# pair \[BT mac address]\
\
（需手動認證的裝置的話這邊需要輸入畫面顯示的 PIN code.）\
\
連結裝置\
\
\[bluetooth]# connect \[BT mac address]\
\
搞定收工\
\
\[bluetooth]# exit


---

# 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://kawsing.gitbook.io/opensystem/andoid-shou-ji/untitled-4/shi-yong-bluetoothctl-guan-li-lan-ya-zhuang-zhi.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.
