meshtastic/docs/configuration/device-config/bluetooth.mdx
2022-11-09 10:50:40 +01:00

89 lines
2.2 KiB
Plaintext

---
id: bluetooth
title: Bluetooth Settings
slug: /settings/config/bluetooth
sidebar_label: Bluetooth
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
The Bluetooth config options are: Enabled, Pairing Mode and Fixed PIN Value. Bluetooth config uses an admin message sending a `Config.Bluetooth` protobuf.
:::info
On ESP32 Bluetooth will be disabled if WiFi is enabled. The WiFi setting takes precedence.
:::
## Bluetooth Config Values
### Enabled
Enables Bluetooth.
### Pairing Mode
Specify pairing mode.
`RANDOM_PIN` generates a random PIN during runtime.
`FIXED_PIN` uses the fixed PIN that should then be additionally specified.
Finally, `NO_PIN` disables PIN authentication.
### Fixed PIN
If your pairing mode is set to fixed PIN this is the value of that fixed 6 digit pin. Default value is 123456. For all other pairing modes, this number is ignored.
## Configure Bluetooth Config
<Tabs
groupId="settings"
defaultValue="cli"
values={[
{label: 'Android', value: 'android'},
{label: 'Apple', value: 'apple'},
{label: 'CLI', value: 'cli'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="android">
:::info
Bluetooth config is not available for Android.
:::
</TabItem>
<TabItem value="apple">
All Bluetooth config values are available on iOS, iPadOS and macOS.
1. Open the Meshtastic App
2. Navigate to: **Settings > Radio Configuration > Position**
</TabItem>
<TabItem value="cli">
All Bluetooth module config options are available in the python CLI. Example commands are below:
| Setting | Acceptable Values | Default |
| :-----------------------: | :-----------------: | :-----: |
| `bluetooth.enabled` | `true`, `false` | `true` |
| `bluetooth.mode` | `RANDOM_PIN`, `FIXED_PIN`, `NO_PIN` | `RANDOM_PIN` |
| `bluetooth.fixedPin` | `integer` (6 digits) | `123456` |
```shell title="Enable/Disable Bluetooth Module"
meshtastic --set bluetooth.enabled true
meshtastic --set bluetooth.enabled false
```
```shell title="Set a fixed pin"
meshtastic --set bluetooth.mode FIXED_PIN
meshtastic --set bluetooth.fixed_pin 111111
```
</TabItem>
<TabItem value="web">
:::info
All Bluetooth module config options are available for the Web UI.
:::
</TabItem>
</Tabs>