meshtastic/docs/configuration/device-config/bluetooth.mdx

125 lines
3.8 KiB
Plaintext
Raw Normal View History

2022-08-24 08:36:58 -07:00
---
id: bluetooth
title: Bluetooth Settings
2022-11-02 11:46:54 -07:00
slug: /settings/config/bluetooth
2022-08-24 08:36:58 -07:00
sidebar_label: Bluetooth
---
2023-01-19 05:01:57 -08:00
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
2022-08-24 08:36:58 -07:00
2023-01-19 05:01:57 -08:00
The Bluetooth config options are: Enabled, Pairing Mode and Fixed PIN Value. Bluetooth config uses an admin message sending a `Config.Bluetooth` protobuf.
2022-08-24 08:36:58 -07:00
2022-11-09 01:50:40 -08:00
:::info
2022-11-27 12:05:40 -08:00
ESP32 Devices: Bluetooth will be disabled if WiFi is enabled. The WiFi setting takes precedence.
2022-11-09 01:50:40 -08:00
:::
2022-08-24 08:36:58 -07:00
## Bluetooth Config Values
### Enabled
2022-11-09 01:50:40 -08:00
Enables Bluetooth.
2022-08-24 08:36:58 -07:00
### 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.
2022-08-24 08:36:58 -07:00
### Fixed PIN
2022-11-27 12:05:40 -08:00
If your pairing mode is set to `FIXED_PIN`, the default value is 123456. For all other pairing modes, this number is ignored. A custom integer (6 digits) can be set via the Bluetooth config options.
### Default Pairing Mode
2022-11-30 09:41:08 -08:00
The default pairing mode will be determined based on whether the device has or does not have a screen attached to it during the first boot (or with a stale device state) unless manually configured via the Bluetooth config options.
2022-11-27 12:05:40 -08:00
2022-11-29 14:38:35 -08:00
- **Screen Attached:** If your device boots up for the first time (or with a stale device state), and a screen is detected, the default pairing mode will be set to `RANDOM_PIN`. Should the attached screen be removed after the device has already been booted, the default pairing mode of `RANDOM_PIN` will remain unless manually changed to `FIXED_PIN` or `NO_PIN`. It is recommended the pairing mode be updated prior to removing the attached screen.
- **No Screen Attached:** If your device boots up for the first time (or with a stale device state), and no screen is detected, the default paring mode will be set to `FIXED_PIN` with the aforementioned default value unless manually configured to a custom value.
2022-08-24 08:36:58 -07:00
2022-11-07 20:53:52 -08:00
## Configure Bluetooth Config
2022-08-24 08:36:58 -07:00
2022-11-29 21:30:05 -08:00
<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
2022-11-30 09:41:08 -08:00
2022-11-29 21:46:58 -08:00
All Bluetooth config options are available for Android.
1. Open the Meshtastic App
2022-12-04 13:00:38 -08:00
2. Navigate to: **Vertical Ellipsis (3 dots top right) > Device Settings > Bluetooth Config**
2022-11-30 09:41:08 -08:00
2022-11-29 21:30:05 -08:00
:::
</TabItem>
<TabItem value="apple">
:::info
2022-11-30 09:41:08 -08:00
2022-11-29 21:30:05 -08:00
All Bluetooth config values are available on iOS, iPadOS and macOS.
1. Open the Meshtastic App
2. Navigate to: **Settings > Radio Configuration > Bluetooth (BLE)**
2022-11-30 09:41:08 -08:00
2022-11-29 21:30:05 -08:00
:::
</TabItem>
<TabItem value="cli">
:::info
2022-11-30 09:41:08 -08:00
2022-11-29 21:30:05 -08:00
All Bluetooth module config options are available in the python CLI. Example commands are below:
2022-11-30 09:41:08 -08:00
2022-11-29 21:30:05 -08:00
:::
2023-01-19 05:01:57 -08:00
| 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` |
2022-11-29 21:30:05 -08:00
:::tip
Because the device will reboot after each command is sent via CLI, it is recommended when setting multiple values in a config section that commands be chained together as one.
```shell title="Example:"
meshtastic --set bluetooth.enabled true --set bluetooth.fixed_pin 111111
```
:::
2022-11-29 21:30:05 -08:00
```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
```
2023-01-19 05:01:57 -08:00
2022-11-29 21:30:05 -08:00
</TabItem>
<TabItem value="web">
:::info
2022-11-30 09:41:08 -08:00
2022-11-29 21:30:05 -08:00
All Bluetooth module config options are available for the Web UI.
1. Open the Meshtastic Web UI.
2. Navigate to: **Device Config > Bluetooth**
2022-11-30 09:41:08 -08:00
2022-11-29 21:30:05 -08:00
:::
</TabItem>
2023-01-19 05:01:57 -08:00
</Tabs>