Merge branch 'master' into linux-native-support

This commit is contained in:
rcarteraz 2024-03-15 09:28:26 -07:00 committed by GitHub
commit 3734237d76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
52 changed files with 233 additions and 96 deletions

View file

@ -17,9 +17,11 @@ Meshtastic is **not** LoRaWAN, Helium or TTN (TheThingsNetwork). Meshtastic uses
Power limits will generally be lifted in the software if `is_licensed` is set to `true`. See [HAM Mode](/docs/faq#amateur-radio-ham) for more information.
:::
## Frequency Slot Calculator
<div class="no-print">
## Frequency Slot Calculator
<FrequencyCalculator />
<FrequencyCalculator />
</div>
## Europe Frequency Bands

View file

@ -48,6 +48,9 @@ us on [Discord](https://discord.com/invite/ktMAKGBnBs) to add your group.
## United Kingdon
- [UK Meshtastic Kent / South East](https://www.facebook.com/groups/ukmeshtastickent/)
## The Netherlands
- [Meshtastic Netherlands](https://t.me/meshtastic_nl)

View file

@ -2,6 +2,7 @@
id: ambient-lighting
title: Ambient Lighting Module Usage
sidebar_label: Ambient Lighting
description: Configuration details to manage LEDs on your Meshtastic device.
---
import Tabs from "@theme/Tabs";

View file

@ -2,6 +2,7 @@
id: audio
title: Audio Module Configuration
sidebar_label: Audio
description: Configuration details for the Audio Module of your Meshtastic device.
---
import Tabs from "@theme/Tabs";

View file

@ -2,6 +2,7 @@
id: canned-message
title: Canned Message Module Configuration
sidebar_label: Canned Message
description: Configuration details for canned (predefined) messages on your Meshtastic device.
---
import Tabs from "@theme/Tabs";

View file

@ -2,6 +2,7 @@
id: detection-sensor
title: Detection Sensor Module Usage
sidebar_label: Detection Sensor
description: Configuration details for the Detection Sensor Module of your Meshtastic device. Used for motion, reed, and other open/closed gate systems.
---
import Tabs from "@theme/Tabs";

View file

@ -2,6 +2,7 @@
id: external-notification
title: External Notification Module Configuration
sidebar_label: External Notification
description: This module will allow you to connect a buzzer, speaker, LED, or other similar accessory to your Meshtastic device.
---
import Tabs from "@theme/Tabs";

View file

@ -4,6 +4,7 @@ title: Module Configuration
sidebar_label: Module Config
sidebar_position: 2
slug: /configuration/module
description: Learn how to configure all of the different modules on your Meshtastic device.
---
Modules are included in the firmware and allow users to extend the functionality of their mesh or device.

View file

@ -2,6 +2,7 @@
id: mqtt
title: MQTT Module Configuration
sidebar_label: MQTT
description: Learn to manage MQTT servers, encryption, and more for your Meshtastic device.
---
import Tabs from "@theme/Tabs";

View file

@ -2,6 +2,7 @@
id: neighbor-info
title: Neighbor Info Module Usage
sidebar_label: Neighbor Info
description: This module allows you to send information about your immediate(0 hop) neighbors.
---
import Tabs from "@theme/Tabs";

View file

@ -2,6 +2,7 @@
id: paxcounter
title: Paxcounter Module Usage
sidebar_label: Paxcounter
description: This module uses WiFi and BLE to count people or devices passing by your Meshtastic device. Used in retail, museums, etc.
---
import Tabs from "@theme/Tabs";

View file

@ -2,6 +2,7 @@
id: range-test
title: Range Test Module Configuration
sidebar_label: Range Test
description: Learn to configure the range test module to create reports, maps, and more.
---
import Tabs from "@theme/Tabs";

View file

@ -2,6 +2,7 @@
id: remote-hardware
title: Remote Hardware Module Usage
sidebar_label: Remote Hardware
description: The Remote Hardware Module allows to read, write and watch GPIO pins on a remote node.
---
import Tabs from "@theme/Tabs";

View file

@ -2,6 +2,7 @@
id: serial
title: Serial Module Configuration
sidebar_label: Serial
description: This module is an interface to talk to and control your Meshtastic device over a serial port.
---
import Tabs from "@theme/Tabs";

View file

@ -2,6 +2,7 @@
id: store-and-forward-module
title: Store & Forward Module Settings
sidebar_label: Store & Forward
description: This module allows you to resend text messages after a device has been temporarily not in LoRa range of the mesh.
---
import Tabs from "@theme/Tabs";

View file

@ -2,6 +2,7 @@
id: telemetry
title: Telemetry Module Configuration
sidebar_label: Telemetry
description: This module allows sharing of Device, Environment, and Air Quality metrics from your Meshtastic device.
---
import Tabs from "@theme/Tabs";

View file

@ -2,6 +2,7 @@
id: traceroute
title: Traceroute Module Usage
sidebar_label: Traceroute
description: The traceroute module allows you to understand the path a message took to reach the final destination over the mesh.
---
import Tabs from "@theme/Tabs";

View file

@ -2,6 +2,7 @@
id: bluetooth
title: Bluetooth Settings
sidebar_label: Bluetooth
description: Configure Bluetooth settings on your Meshtastic device for connectivity with smartphones and other devices.
---
import Tabs from "@theme/Tabs";

View file

@ -2,6 +2,7 @@
id: channels
title: Channel Configuration
sidebar_label: Channels
description: Understand how to configure channels on your Meshtastic device, including private channels, encryption, MQTT, and location precision.
---
import Tabs from "@theme/Tabs";
@ -55,8 +56,8 @@ Each channel is assigned one of 3 roles:
- The channel settings are set to default.
:::note
While you can have a different PRIMARY channel and communicate over SECONDARY channels with the same Name & PSK, a hash of the PRIMARY channel's name sets the LoRa channel number, which determines the actual frequency you are transmitting on in the band.
To ensure devices with different PRIMARY channel name transmit on the same frequency, you must explicitly set the LoRa channel number.
While you can have a different PRIMARY channel and communicate over SECONDARY channels with the same Name & PSK, a hash of the PRIMARY channel's name sets the LoRa frequency slot, which determines the actual frequency you are transmitting on in the band.
To ensure devices with different PRIMARY channel name transmit on the same frequency, you must explicitly set the LoRa frequency slot.
:::
## Channel Settings Values

View file

@ -2,6 +2,7 @@
id: device
title: Device Configuration
sidebar_label: Device
description: Learn about and compare device roles such as Client, Repeater, and Router as well as other Device settings.
---
import Tabs from "@theme/Tabs";

View file

@ -2,6 +2,7 @@
id: display
title: Display Configuration
sidebar_label: Display
description: Details on the configuration options for the display on your Meshtastic device.
---
import Tabs from "@theme/Tabs";

View file

@ -3,6 +3,7 @@ id: config
title: Radio Configuration
sidebar_label: Radio Config
sidebar_position: 1
description: Dive into the technical specifics of configuring your Meshtastic radio settings, including frequency ranges, power limits, and channels for optimal communication.
---
There are several config sections in the Meshtastic firmware, these are broken out so they can be sent as small admin messages over the mesh.

View file

@ -2,13 +2,14 @@
id: lora
title: LoRa Configuration
sidebar_label: LoRa
description: Understanding the LoRa configuration settings on your Meshtastic device including region, modem, hop limit, and more.
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import LoRaRegions from "../../blocks/_lora-regions.mdx";
The LoRa config options are: Region, Modem Preset, Max Hops, Transmit Power, Bandwidth, Spread Factor, Coding Rate, Frequency Offset, Transmit Enabled, Channel Number, Ignore Incoming Array, Ignore MQTT, Override Duty Cycle Limit, SX126x RX Boosted Gain, and Override Frequency. LoRa config uses an admin message sending a `Config.LoRa` protobuf.
The LoRa config options are: Region, Modem Preset, Max Hops, Transmit Power, Bandwidth, Spread Factor, Coding Rate, Frequency Offset, Transmit Enabled, Frequency Slot, Ignore Incoming Array, Ignore MQTT, Override Duty Cycle Limit, SX126x RX Boosted Gain, and Override Frequency. LoRa config uses an admin message sending a `Config.LoRa` protobuf.
:::note
In order to communicate fully, devices within a mesh must have identical settings for Region and Modem Preset, or identical custom Modem settings.

View file

@ -2,6 +2,7 @@
id: network
title: Network Configuration
sidebar_label: Network
description: Learn about network configuration for your Meshtastic device including NTP, WiFi, and Ethernet.
---
import Tabs from "@theme/Tabs";

View file

@ -2,6 +2,7 @@
id: position
title: Position Configuration
sidebar_label: Position
description: GPS position configuration settings for your Meshtastic device including update intervals, broadcast settings, and GPIO.
---
import Tabs from "@theme/Tabs";

View file

@ -2,6 +2,7 @@
id: power
title: Power Configuration
sidebar_label: Power
description: Settings for advanced users who want to adjust the power configuration on their Meshtastic device.
---
import Admonition from "@theme/Admonition";
@ -49,73 +50,75 @@ Should be set to floating point value between 2 and 6
4. If "Battery Charge Percent" (e.g., B 3.82V 60%) is not displayed on the screen, it means that the default value of "Operative Adc Multiplier" is too high. Lower the "Operative Adc Multiplier" to a smaller number (it is recommended to decrease by 0.1) until the screen displays "Battery Charge Percent". Enter the current "Operative Adc Multiplier" in use into the "Operative Adc Multiplier" field in the calculator. Also, input the "Battery Charge Percent" displayed on the screen into the calculator.
5. Click the "Calculate" button to compute the "Calculated New Operative Adc Multiplier", and set it as the new "Operative Adc Multiplier" for the device.
<details>
<summary>ADC Calculator</summary>
<div>
<Admonition type="info">
<p>This calibration method only maps 4.2V to Battery Charge Percent 100%, and does not address the potential non-linearities of the ADC.</p>
</Admonition>
<table>
<tr>
<td> Battery Charge Percent: </td>
<td>
<input type="text" id="batteryChargePercent" defaultValue="65" />
</td>
</tr>
<tr>
<td>Current Adc Multiplier: </td>
<td>
<input type="text" id="operativeAdcMultiplier" defaultValue="2" />
</td>
</tr>
<tr>
<td>Calculated New Operative Adc Multiplier: </td>
<td>
<input
type="text"
id="newOperativeAdcMultiplier"
value="2"
disabled="disabled"
/>
</td>
</tr>
<tr>
<td></td>
<td>
<button
className="button button--outline button--lg cta--button"
onClick={calculateADC}
>
Calculate
</button>
</td>
</tr>
</table>
Default values for ADC Multipliers are:
<div class="no-print">
<details>
<summary>ADC Calculator</summary>
<div>
<Admonition type="info">
<p>This calibration method only maps 4.2V to Battery Charge Percent 100%, and does not address the potential non-linearities of the ADC.</p>
</Admonition>
<table>
<tr>
<td> Battery Charge Percent: </td>
<td>
<input type="text" id="batteryChargePercent" defaultValue="65" />
</td>
</tr>
<tr>
<td>Current Adc Multiplier: </td>
<td>
<input type="text" id="operativeAdcMultiplier" defaultValue="2" />
</td>
</tr>
<tr>
<td>Calculated New Operative Adc Multiplier: </td>
<td>
<input
type="text"
id="newOperativeAdcMultiplier"
value="2"
disabled="disabled"
/>
</td>
</tr>
<tr>
<td></td>
<td>
<button
className="button button--outline button--lg cta--button"
onClick={calculateADC}
>
Calculate
</button>
</td>
</tr>
</table>
Default values for ADC Multipliers are:
| Device | Default ADC Multiplier |
| :-------: | :--------------------: |
| hatter2 | 5.0 |
| diy | 1.85 |
| esp32-s3-pico | 3.1 |
| heltec_v1 & heltec_v2 | 3.2 |
| heltec_v3 & heltec_wsl_v3 | 4.9 |
| heltec_wireless_paper | 2 |
| heltec_wireless_tracker | 4.9 |
| lora_isp4520 | 1.436 |
| m5stack_coreink | 5 |
| nano-g1-explorer | 2 |
| picomputer-s3 | 3.1 |
| station-g1 | 6.45 |
| station-g2 | 4 |
| tlora_v2_1_16 | 2 |
| tlora_v2_1_18 | 2.11 |
| tlora_t3s3_v1 | 2.11 |
| t-deck | 2.11 |
| trackerd | 2 |
| Device | Default ADC Multiplier |
| :-------: | :--------------------: |
| hatter2 | 5.0 |
| diy | 1.85 |
| esp32-s3-pico | 3.1 |
| heltec_v1 & heltec_v2 | 3.2 |
| heltec_v3 & heltec_wsl_v3 | 4.9 |
| heltec_wireless_paper | 2 |
| heltec_wireless_tracker | 4.9 |
| lora_isp4520 | 1.436 |
| m5stack_coreink | 5 |
| nano-g1-explorer | 2 |
| picomputer-s3 | 3.1 |
| station-g1 | 6.45 |
| station-g2 | 4 |
| tlora_v2_1_16 | 2 |
| tlora_v2_1_18 | 2.11 |
| tlora_t3s3_v1 | 2.11 |
| t-deck | 2.11 |
| trackerd | 2 |
</div>
</details>
</div>
</details>
</div>
### Wait Bluetooth Interval

View file

@ -2,6 +2,7 @@
id: user
title: User Configuration
sidebar_label: User
description: Details on Long Name, Short Name, and Licensed operation.
---
import Tabs from "@theme/Tabs";

View file

@ -3,6 +3,7 @@ id: remote-admin
title: Remote Node Administration
sidebar_label: Remote Nodes
sidebar_position: 3
description: An advanced feature which allows remote administration of a device through a secure channel on the Mesh instead of via Bluetooth, Serial, or IPv4.
---
:::caution Disclaimer
@ -199,4 +200,4 @@ You've finished setting up and adding two devices to the admin channel. Remember
For further reading, I recommend starting out with the [Meshtastic Python CLI Guide](/docs/software/python/cli/) if you haven't already gone through this (hopefully you have since you are reading this). But for a full reference to the settings you can change, please see:
[Settings Overview](/docs/configuration) and
[Complete list of user settings in Protobufs](https://buf.build/meshtastic/protobufs/docs/main:meshtastic#meshtastic.User)
[Complete list of user settings in Protobufs](https://buf.build/meshtastic/protobufs/docs/main:meshtastic#meshtastic.User)

View file

@ -1,14 +1,14 @@
---
id: tips
title: Configuration Tips
description: Common Settings & Solutions
description: Tips and Solutions to help you get the most out of your Meshtastic device and network.
sidebar_label: Tips
sidebar_position: 4
---
## Roles
Leave your [ROLE](/docs/configuration/radio/device#role) set to `CLIENT` unless you're sure another role would suit the node's purpose. All `CLIENT` nodes will "repeat" and "route" packets. Roles are for very specific applications so please [read the documentation](/docs/configuration/radio/device#role) before changing your node's role.
Leave your [ROLE](/docs/configuration/radio/device#roles) set to `CLIENT` unless you're sure another role would suit the node's purpose. All `CLIENT` nodes will "repeat" and "route" packets. Roles are for very specific applications so please [read the documentation](/docs/configuration/radio/device#roles) before changing your node's role.
:::info
@ -29,9 +29,9 @@ If you'd like to connect with other Meshtastic users but only share your locatio
1. Ensure you have not changed the LoRa [Modem Preset](/docs/configuration/radio/lora#modem-preset) from the default `unset` / `LONG_FAST`.
2. On your PRIMARY channel, set anything you'd like for the channel's name and choose a random PSK.
3. Enable a SECONDARY channel named "LongFast" with PSK "AQ==".
4. If your LoRa channel is set to the default (`0`), the radio's frequency will be automatically changed based on your PRIMARY channel's name. In this case, you will have to manually set it back to your region's default (in LoRa settings) in order to interface with users on the default channel:
4. If your LoRa frequency slot is set to the default (`0`), the radio's transmit frequency will be automatically changed based on your PRIMARY channel's name. In this case, you will have to manually set it back to your region's default (in LoRa settings) in order to interface with users on the default slot:
### Default Primary Channels by Region
### Default Primary Frequency Slots by Region
| US | EU_433 | EU_868 | CN | JP | ANZ | KR | TW | RU | IN | NZ_865 | TH | UA_433 | UA_868 | MY_433 | MY_919 | SG_923 | LORA_24 |
|:--:|:------:|:------:|:--:|:--:|:---:|:--:|:--:|:--:|:--:|:------:|:--:|:------:|:------:|:------:|:------:|:------:|:-------:|
@ -47,19 +47,19 @@ Meshtastic nodes will rebroadcast all packets if they share [LoRa modem settings
If you would like your nodes to include/expand the "public" mesh, you must use the default [modem preset](/docs/configuration/radio/lora#modem-preset) `LONG_FAST`. If you change your PRIMARY channel name, you must manually set the LoRa channel to the default for your region (see above).
:::
## Chat Channels VS LoRa Modem Channels
## Chat Channels and LoRa Frequency Slots
Meshtastic uses the word "channels" to define two different configuration properties: [Messaging Channels](/docs/configuration/radio/channels) & [LoRa Modem Channels](/docs/configuration/radio/lora#channel-number)
Previously, Meshtastic used the word "channels" to define two different configuration properties: Messaging Channels & LoRa Channel Numbers. However, this could lead to confusion since "channels" was being used to refer to two distinct concepts. To clarify the distinction, the decision was made to change "LoRa Channel Number" to "LoRa Frequency Slot".
### Radio Config: Channels
These configure "message groups" and include your PRIMARY and SECONDARY channels. All SECONDARY channels use the same LoRa modem config as your PRIMARY channel (including LoRa channel number).
These configure "message groups" and include your PRIMARY and SECONDARY channels. All SECONDARY channels use the same LoRa modem config as your PRIMARY channel (including LoRa frequency slot).
There are 8 total chat channels. Channel 0 is your PRIMARY channel, with channels 1-7 available for private group messaging and/or special channels such as [`admin`](/docs/configuration/remote-admin).
There are 8 total messaging channels. Channel 0 is your PRIMARY channel, with channels 1-7 available for private group messaging and/or special channels such as [`admin`](/docs/configuration/remote-admin).
### Radio Config: LoRa: Channel Number
### Radio Config: LoRa Frequency Slot
This configures the frequency the radio is set to. Check out the [frequency calculator](/docs/overview/radio-settings#channel-frequency-calculator) to view the relationship between "channel number" and radio frequency.
This property, formerly known as "LoRa Channel Number", configures the frequency the radio is set to. Check out the [frequency calculator](/docs/overview/radio-settings#frequency-slot-calculator) to view the relationship between "frequency slot" and radio frequency.
## Best Practices
- If you are part of a large mesh and don't know what a setting does, don't change it (unless you're super curious).

View file

@ -75,6 +75,8 @@ A description about the project
<!--Repobeats image here-->
Repobeats images can be generated at [repobeats.axiom.co](https://repobeats.axiom.co/)
<!--If the repository is a library, include this section-->
## Installation & Usage

View file

@ -3,6 +3,7 @@ id: cli-script
title: Flashing with the CLI
sidebar_label: CLI Script (Advanced Users)
sidebar_position: 3
description: Instructions for using the CLI to flash Meshtastic firmware to an ESP32 chipset device.
---
import Tabs from "@theme/Tabs";

View file

@ -3,6 +3,7 @@ id: external-serial-adapter
title: Flashing with an External Serial Adapter
sidebar_label: External Serial Adapter (Advanced Users)
sidebar_position: 4
description: Instructions for using an external serial adapter to flash Meshtastic firmware to an ESP32 chipset device.
---
import Tabs from "@theme/Tabs";

View file

@ -3,6 +3,7 @@ id: flashing-esp32-devices
title: Flash ESP32 Devices
sidebar_label: ESP32 Device
sidebar_position: 2
description: Instructions to flash Meshtastic firmware to an ESP32 chipset device.
---
:::info

View file

@ -3,6 +3,7 @@ id: web-flasher
title: Meshtastic Web Flasher
sidebar_label: Web Flasher (recommended)
sidebar_position: 1
description: Instructions for using the Web Flasher(recommended) to flash Meshtastic firmware to an ESP32 chipset device.
---
import Link from "@docusaurus/Link";

View file

@ -3,6 +3,7 @@ id: convert-rak4631r
title: Convert RAK4631-R to RAK4631
sidebar_label: Convert RAK4631-R
sidebar_position: 4
description: Instructions for converting the RAK4631-R to RAK-4631 using Python and adafruit-nrfutil.
---
The only difference between the _RAK4631-R_ (RUI3) and the _RAK4631_ (Arduino) is the bootloader it is shipped with - the hardware is the same.

View file

@ -3,6 +3,7 @@ id: drag-n-drop
title: Drag & Drop nRF52 & RP2040 Firmware Updates
sidebar_label: Drag & Drop (recommended)
sidebar_position: 1
description: Instructions for using the Drag & Drop(recommended) file method to flash Meshtastic firmware to nRF52 or RP2040 chipset devices.
---
import Tabs from "@theme/Tabs";

View file

@ -3,6 +3,7 @@ id: flashing-nrf52-devices
title: Flash nRF52 & RP2040 Devices
sidebar_label: nRF52/RP2040 Device
sidebar_position: 2
description: Instructions to flash Meshtastic firmware to nRF52 or RP2040 chipset devices.
---
## Flashing Methods for nRF52 and RP2040 Devices

View file

@ -3,6 +3,7 @@ id: nrf52-erase
title: Flash nRF52/RP2040 Factory Erase
sidebar_label: Factory Erase
sidebar_position: 3
description: Instructions for factory erasing an nRF52 or RP2040 device.
---
import Link from "@docusaurus/Link";

View file

@ -3,6 +3,7 @@ id: ota
title: nRF52 OTA Firmware Updates
sidebar_label: Over-The-Air
sidebar_position: 2
description: Instructions for using the Over-The-Air(OTA) method to flash Meshtastic firmware to nRF52 chipset devices.
---
import Tabs from "@theme/Tabs";

View file

@ -3,6 +3,7 @@ id: update-techo-bootloader
title: How to Update the LilyGo T-Echo Bootloader to the Latest Version
sidebar_label: Update T-Echo Bootloader
sidebar_position: 5
description: Instructions for updating the T-Echo bootloader to the latest version for use with Meshtastic.
---
If you're experiencing issues with updating or flashing newer versions of the Meshtastic firmware, and your LilyGo T-Echo is not running the latest bootloader version (0.6.1), updating the bootloader may resolve these problems.

View file

@ -4,6 +4,7 @@ title: Getting Started
sidebar_label: Getting Started
slug: /getting-started
sidebar_position: 2
description: The official Meshtastic guide to get you started. Covers all devices and configurations.
---
import Link from "@docusaurus/Link";

View file

@ -4,6 +4,7 @@ title: Initial Configuration
sidebar_label: Initial Configuration
slug: /getting-started/initial-config
sidebar_position: 4
description: Getting started with the initial configuration of your Meshtastic device including serial, bluetooth, LoRa, and more.
---
import Tabs from "@theme/Tabs";

View file

@ -3,6 +3,7 @@ id: esp32
title: ESP32 Serial Drivers
sidebar_label: ESP32 Drivers
sidebar_position: 1
description: Instructions for installing ESP32 USB serial drivers to interact with a Meshtastic device.
---
import Tabs from "@theme/Tabs";

View file

@ -3,6 +3,7 @@ id: nrf52
title: nRF52/RP2040 Serial Drivers
sidebar_label: nRF52/RP2040 Drivers
sidebar_position: 2
description: Instructions for installing nRF52 and RP2040 USB serial drivers to interact with a Meshtastic device.
---
import Tabs from "@theme/Tabs";

View file

@ -3,6 +3,7 @@ id: test-serial-driver-installation
title: Test Serial Driver Installation
sidebar_label: Test Serial Driver Installation
sidebar_position: 3
description: Instructions for testing serial driver installation on Linux, macOS, or Windows.
---
import Link from "@docusaurus/Link";

View file

@ -40,9 +40,9 @@ For each channel where uplink and/or downlink is enabled, two other topics might
#### Protobufs topic
A gateway node will uplink and/or downlink raw ([protobuf](https://developers.google.com/protocol-buffers)) MeshPackets to the topic:
`msh/2/c/CHANNELNAME/USERID`, where `CHANNELNAME` is the name of the channel.
`msh/2/e/CHANNELNAME/USERID`, where `CHANNELNAME` is the name of the channel (firmware versions prior to 2.3.0 will publish to a topic with `/c/` in the place of `/e/`).
For example: `msh/2/c/LongFast/!abcd1234`
For example: `msh/2/e/LongFast/!abcd1234`
The payload is a raw protobuf, whose definitions for Meshtastic can be found [here](https://github.com/meshtastic/protobufs/blob/master/meshtastic). Reference guides for working with protobufs in several popular programming languages can be found [here](https://protobuf.dev/reference/). Looking at the MQTT traffic with a program like `mosquitto_sub` will tell you it's working, but you won't get much useful information out of it. For example:

View file

@ -7,15 +7,15 @@ sidebar_position: 2
### Sending/receiving messages on mosquitto server using python
Here is an example publish message in python:
Here is an example publish message in python (run `pip install paho-mqtt` first):
```python
#!/usr/bin/env python3
import paho.mqtt.client as mqtt
from random import randrange, uniform
from random import uniform
import time
client = mqtt.Client("some_client_id")
client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2)
client.connect('localhost')
while True:
@ -36,11 +36,11 @@ def on_message(mosq, obj, msg):
print("%-20s %d %s" % (msg.topic, msg.qos, msg.payload))
mosq.publish('pong', 'ack', 0)
def on_publish(mosq, obj, mid):
def on_publish(mosq, obj, mid, reason_codes, properties):
pass
if __name__ == '__main__':
client = paho.Client()
client = paho.Client(paho.CallbackAPIVersion.VERSION2)
client.on_message = on_message
client.on_publish = on_publish

View file

@ -440,10 +440,18 @@ meshtastic --test
### --ble BLE
BLE mac address to connect to (BLE is not yet supported for this tool).
Connect to a Meshtastic device using its BLE address or name. This option allows for wireless communication with the device, similar to how the `--host` option is used for TCP connections.
```shell title="Usage"
meshtastic --ble "83:38:92:32:37:48"
meshtastic --ble "device_name_or_address" --info
```
### --ble-scan
Scan for available Meshtastic devices using BLE. This command lists discoverable devices, providing a convenient method to identify devices for connection via BLE.
```shell title="Usage"
meshtastic --ble-scan
```
### --noproto

View file

@ -133,6 +133,79 @@ Use "--ch-set psk default" to restore the standard 'default' (minimally secure,
All "ch-set" commands will default to the primary channel at index 0, but can be applied to other channels with the "ch-index" parameter.
## Utilizing BLE via the Python CLI
The Python CLI supports communicating with Meshtastic devices via Bluetooth Low Energy (BLE), in addition to the standard serial and TCP/IP connections. To use BLE, you will need a Bluetooth adapter on your computer.
### Scan for BLE Devices
First, you can scan for available Meshtastic devices using:
```shell
meshtastic --ble-scan
```
This will list all Meshtastic devices discoverable over BLE along with their addresses and names in the following format:
```shell
Found: name='Meshtastic_1234' address='AA11BB22-CC33-DD44-EE55-FF6677889900'
BLE scan finished
```
### Available Commands
Once you have the device address or name, you can utilize it alongside your normal Python CLI commands like `--info`, `--nodes`, `--export-config`, etc. but with the `--ble` option to communicate via BLE rather than serial.
You can use **either** the name or address to issue your commands.
```shell
meshtastic --ble <name> --info
meshtastic --ble <address> --nodes
```
The initial time you use the `--ble` option for a specific device, you will be prompted to enter the BLE PIN code (as is normal with a client). Once paired, this step won't be required unless you forget the device.
:::note
On Linux, you may need to pair the BLE device using `bluetoothctl` before connecting. This allows entering the required PIN for pairing.
:::
### Additional BLE Examples
#### Scan for devices and get info from the first one:
```bash
meshtastic --ble-scan
# Sample output:
# Found: name='Meshtastic_1234' address='AA11BB22-CC33-DD44-EE55-FF6677889900'
# Found: name='Meshtastic_5678' address='FF00DD00-AA11-BB22-CC33-DD44EE5566FF'
BLE scan finished
meshtastic --ble AA11BB22-CC33-DD44-EE55-FF6677889900 --info
```
#### Connect to a named device and read the node list:
```shell
meshtastic --ble Meshtastic_1234 --nodes
```
#### Export device config with --export-config
```shell
meshtastic --ble Meshtastic_1234 --export-config > config.yaml
```
#### Send a command to a remote device using the --dest option:
```shell
meshtastic --dest '!fe1932db4' --set device.is_managed false --ble Meshtastic_9abc
```
#### For debugging, you can enable verbose BLE logging by adding the `--debug` flag:
```shell
meshtastic --ble AA11BB22-CC33-DD44-EE55-FF6677889900 --debug --info
```
## FAQ/common problems
This is a collection of common questions and answers from our friendly forum.
@ -161,4 +234,4 @@ There is a problem with Big Sur and pyserial. The workaround is to install a new
```shell
pip3 install -U --pre pyserial
```
```

View file

@ -13,7 +13,7 @@ Band
Broadcast
: Sending a message or data from one device to all other devices within range in the Meshtastic network, rather than to a specific recipient.
Channel | [Configuration](/docs/configuration/radio/channels/) | [Frequency Calculator](/docs/overview/radio-settings/#channel-frequency-calculator)
Channel | [Configuration](/docs/configuration/radio/channels/) | [Frequency Calculator](/docs/overview/radio-settings/#frequency-slot-calculator)
: At least two definitions in Meshtastic usage: 1) One of 8 configurable channels in the firmware, each supporting a separate name and encryption, with one set as primary and the rest secondary. 2) A specific frequency within a LoRa band that a device can be configured to use.
CLI | [Guide](/docs/software/python/cli/)

View file

@ -230,12 +230,14 @@ td {
padding-right: 10px !important;
}
/* Need all tab content to show for PDF generation */
/* Print styles for manual printing and PDF generation */
@media print {
ul.tabs {
ul.tabs,
.no-print {
display: none;
}
.tabs-container div > div {
display: block;
.tabs-container div > div,
.accordion__panel {
display: block !important;
}
}

View file

@ -64,6 +64,10 @@
{
"source": "/docs/getting-started/faq",
"destination": "/docs/faq/"
},
{
"source": "/docs/",
"destination": "/docs/introduction/"
}
]
}