This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
projects:amateur_radio:meshtastic:getting_started [2024/05/08 04:08] – removed - external edit (Unknown date) 127.0.0.1 | projects:amateur_radio:meshtastic:getting_started [2025/05/25 14:27] (current) – [Enable MQTT Forwarding] Use LuciferNet MQTT and add privacy warning Andrew Yong | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Getting Started with Meshtastic in Singapore ====== | ||
+ | |||
+ | ([[# | ||
+ | |||
+ | ===== Reasons to Use Meshtastic ===== | ||
+ | |||
+ | < | ||
+ | |||
+ | Meshtastic® is a project that enables you to use inexpensive LoRa radios as a long range off-grid communication platform in areas without existing or reliable communications infrastructure. This project is 100% community driven and open source! | ||
+ | |||
+ | < | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== For Laypersons ==== | ||
+ | |||
+ | Meshtastic provides a phone app that looks and feels similar to other messaging apps, except that it does not require any cellular data or Wi-Fi. Instead, communications take place over a network of devices (nodes) that are owned and operated by the users, with nodes relaying messages to other nodes in range (typically several kilometers). | ||
+ | |||
+ | ==== For Persons with An Interest in Electronics or Radio Communications ==== | ||
+ | |||
+ | Meshtastic is a great platform with opportunities to observe and experiment with radio communications in the real world, urban and outdoors. The software, firmware and protocol are open source and extensible; the protocol can send GPS coordinates, | ||
+ | |||
+ | For more information about the LoRa modulation/ | ||
+ | |||
+ | ==== Use Cases ==== | ||
+ | |||
+ | * Off-grid communications | ||
+ | * Backcountry hiking, cycling etc. | ||
+ | * Unreliable/ | ||
+ | * Decentralized, | ||
+ | * Disaster Response/ | ||
+ | * Tactical situational awareness (e.g.: ATAK) | ||
+ | * Sensor networks (environment sensors, GPIO sensors) | ||
+ | * **And more!** | ||
+ | |||
+ | ===== Buy Hardware to Use Meshtastic ===== | ||
+ | |||
+ | :!: Do not power up LoRa boards without an antenna attached, the transmitter may get damaged by the reflected signal :!: | ||
+ | |||
+ | Minimum hardware needed to get connected: | ||
+ | |||
+ | - **[[https:// | ||
+ | - **[[https:// | ||
+ | - **[[https:// | ||
+ | |||
+ | ==== Meshtastic Devices ==== | ||
+ | |||
+ | :!: When ordering, select the 923 MHz option if available, otherwise, 915 MHz, or 868 MHz if no other 900 MHz band is available | ||
+ | |||
+ | :?: The device hardware for 868/915/923 MHz selection is the same, just with different antennae in the box; 433 MHz has hardware differences and can't be used for 900 MHz band | ||
+ | |||
+ | * ** Portable All-In-One Devices** (screen, battery, GPS, antenna, sensor(s), enclosure, nrf52840-based - lower power consumption) | ||
+ | * [[https:// | ||
+ | * Elecrow | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * LILYGO | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * RAK Wireless | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * **Portable All-In-One Kits** (screen, battery, GPS, antenna, sensor(s)) | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * **Outdoor Devices** | ||
+ | * Seeed Studio | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * **DIY Kits** (screen, antenna, optional battery; suitable for home/office use or powering with USB power bank) | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | :!: Some Heltec ESP32-based devices are missing USB-C Configuration Channel resistors, so USB-C PD compliant supplies will likely not supply power. Using a USB-A to USB-C cable solves this issue. LILYGO boards have the correct CC resistors (i.e. 5.1 kΩ from pins CC1 and CC2 to ground) and do not have this issue. | ||
+ | |||
+ | ==== Meshtastic Software ==== | ||
+ | |||
+ | :?: Connects to the Meshtastic node over Bluetooth LE, USB serial or Wi-Fi. Optional if you have a standalone node with keyboard. | ||
+ | |||
+ | * Android device + [[https:// | ||
+ | * iOS device + [[https:// | ||
+ | * Desktop device + [[https:// | ||
+ | |||
+ | ==== Antennae ==== | ||
+ | |||
+ | * With appropriate frequency for configured region | ||
+ | * 915 MHz are usually fine for SG_923 (LongFast default frequency is 917.125 MHz) | ||
+ | * Some devices bundle an antenna, they may not have best resonance at 923 MHz but are good enough to start with | ||
+ | |||
+ | === Antenna Suggestions === | ||
+ | |||
+ | * [[projects: | ||
+ | * **Ziisor TX915-JKD-20** - SMA 3.5 dBi hinged dipole; [[http:// | ||
+ | * **Ziisor TX915-JZLW-15** - U.FL 3 dBi fixed dipole; [[https:// | ||
+ | * | ||
+ | |||
+ | ==== Nice to Haves ==== | ||
+ | |||
+ | * **Battery** | ||
+ | * For mobile nodes that have battery connectors and onboard lithium-ion chargers | ||
+ | * For battery backup of stationary nodes | ||
+ | * [[projects: | ||
+ | * **Solar power** for hard-to-access nodes | ||
+ | * Bypass the DC-DC buck-boost connector on the USB-A end of the cable if using a LoRa board with built-in battery/ | ||
+ | * [[projects: | ||
+ | * **IP-rated enclosure** for outdoor nodes | ||
+ | |||
+ | ===== Installing Meshtastic Firmware ===== | ||
+ | |||
+ | Flash the latest firmware with the [[https:// | ||
+ | |||
+ | - Appropriate USB COM port drivers must be installed (Windows/ | ||
+ | - Put the device into programming mode | ||
+ | - Select your board and the latest firmware at [[https:// | ||
+ | - Follow the on-screen instructions to put the device in bootloader/ | ||
+ | - Click //Flash//, // | ||
+ | - Select //Full Erase and Install// if this is the first time installing Meshtastic, this will wipe any leftover data from factory programming | ||
+ | |||
+ | ===== First Use Configuration ===== | ||
+ | |||
+ | ==== Region Configuration ==== | ||
+ | |||
+ | A freshly installed Meshtastic device must have its region set, which limits the LoRa radio to operate within local regulatory restrictions; | ||
+ | |||
+ | Devices are only visible to, and can only communicate with, devices configured with the same region. | ||
+ | |||
+ | * **Android/ | ||
+ | * **Python CLI**: '' | ||
+ | |||
+ | **Usable regions in Singapore**: | ||
+ | |||
+ | * **EU_433** | ||
+ | * Frequency band: 433 - 434 MHz | ||
+ | * ERP: 10 mW (10 dBm) | ||
+ | * Duty cycle: 10% | ||
+ | * IMDA TS SRD band: 26a | ||
+ | * You will need a 433 MHz Meshtastic device **(868/ | ||
+ | * **SG_923** <- use this, it has higher output power, no duty cycle restriction and is also allocated to LPWAN | ||
+ | * Frequency band: 917 - 923 MHz | ||
+ | * ERP: 100 mW (20 dBm) | ||
+ | * IMDA TS SRD band: 30d (not 30b/30c as [[https:// | ||
+ | * You will need an 868/915/923 MHz Meshtastic device **(433 MHz devices do NOT support 923 MHz)** | ||
+ | * **Do not use regions not listed above** as they will encroach on other spectrum users | ||
+ | |||
+ | ==== Enable MQTT Forwarding ==== | ||
+ | |||
+ | Because we don't currently have enough nodes in Singapore to form a full mesh, we need to enable MQTT forwarding to use the Internet as a backhaul to forward messages between isolated nodes and meshes. The node must either be connected to Wi-Fi directly (mesh router-client to MQTT bridge), or be paired with an Android or iOS device with "MQTT Client Proxy" enabled (mobile node). | ||
+ | |||
+ | In future, when a full mesh is formed, MQTT can be disabled for a truly decentralized and private mesh, or left enabled as a backup in case of dead zones in the mesh. | ||
+ | |||
+ | **Your personal data (sensor, position, telemetry, etc.) are sent out to the public Internet with this configuration. | ||
+ | |||
+ | Disable the MQTT module if you are not comfortable with this. You can also decrease position precision in each channel' | ||
+ | |||
+ | * **Android/ | ||
+ | - In **Modules** -> // | ||
+ | - **Enabled**: | ||
+ | - **MQTT Client Proxy**: //**on**// (Portable nodes with BLE to phone only) | ||
+ | - **MQTT server**: // | ||
+ | - In **Channels** | ||
+ | - **LongFast** -> **MQTT Uplink**: //**on**//; **MQTT Downlink**: //**on**// | ||
+ | * **Python CLI**: | ||
+ | - '' | ||
+ | - Portable nodes with BLE to phone only: '' | ||
+ | - '' | ||
+ | |||
+ | ==== Configuration for Wi-Fi MQTT Routers ==== | ||
+ | |||
+ | :!: Turning Wi-Fi on turns BLE off, so further configuration will have to be done over the Web Client, Android client or Python CLI. | ||
+ | |||
+ | * **Android/ | ||
+ | - In //Device Configuration// | ||
+ | - //Device Role//: Router & Client | ||
+ | - // | ||
+ | - // | ||
+ | - //Device GPS//: Off | ||
+ | - //Fixed Position//: On | ||
+ | * **Python CLI**: | ||
+ | - '' | ||
+ | - '' | ||
+ | |||
+ | === Enable Store & Forward === | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | * Must be installed on a ROUTER or ROUTER_CLIENT node. | ||
+ | * This is an artificial limitation, but is in place to enforce best practices. | ||
+ | * Router nodes are intended to be always online. If this module misses any messages, the reliability of the stored messages will be reduced. | ||
+ | * ESP32 Processor based device with onboard PSRAM (T-Beam > v1.0, T3S3, and maybe others). | ||
+ | |||
+ | * **Android/ | ||
+ | - In // | ||
+ | * **Python CLI**: | ||
+ | - '' | ||
+ | |||
+ | :?: To find GPS coordinates for your address, you can use the [[https:// | ||
+ | |||
+ | ===== Build, Buy or 3D Print Enclosure for your Meshtastic Device ===== | ||
+ | |||
+ | Meshtastic devices are primarily development boards, thus being bare PCBs; many also use U.FL/IPEX connections for their LoRa antenna, which are extremely fragile. For your Meshtastic device to leave your desk, you are likely to want an enclosure. | ||
+ | |||
+ | Have a look at [[.device_enclosures: | ||
+ | |||
+ | ===== Python CLI Quickstart ===== | ||
+ | |||
+ | If you have used Meshtastic before and just want to switch over to SG_923, here is a configuration file to quickly configure your device for SG_923, and an MQTT server operated by [[https:// | ||
+ | |||
+ | **Your personal data (sensor, position, telemetry, etc.) are sent out to the public Internet with this configuration.** | ||
+ | |||
+ | **Disable the MQTT module if you are not comfortable with this. You can also decrease position precision in each channel' | ||
+ | |||
+ | - **Download [[https:// | ||
+ | - Linux/MacOS CLI\\ '' | ||
+ | - Windows CLI\\ '' | ||
+ | - **Install/ | ||
+ | - **Deploy the configuration**\\ '' | ||
+ | |||
+ | Android/iOS app: Skip ahead to [[# | ||
+ | |||
+ | |||
+ | ===== Other Meshtastic Notes ===== | ||
+ | |||
+ | ==== Data Rates ==== | ||
+ | |||
+ | ^ Channel setting | ||
+ | | Short Range / Fast | Short Fast | **10.94 kbps** | ||
+ | | Short Range / Slow | Short Slow | **6.25 kbps** | ||
+ | | Medium Range / Fast | Medium Fast | **3.52 kbps** | ||
+ | | Medium Range / Slow | Medium Slow | **1.95 kbps** | ||
+ | | Long Range / Fast | Long Fast | **1.07 kbps** | ||
+ | | Long Range / Moderate | ||
+ | | Long Range / Slow | Long Slow | **0.18 kbps** | ||
+ | |||
+ | - [[https:// | ||
+ | |||
+ | ==== Windows Python Incompatibility ==== | ||
+ | |||
+ | * Windows 11's built in Python binaries did not work out of the box with Meshtastic, I had to install Python' | ||
+ | - Install latest Python from [[https:// | ||
+ | - <code bash> | ||
+ | python3 -m pip install --upgrade pip | ||
+ | </ | ||
+ | - <code bash> | ||
+ | pip3 install meshtastic | ||
+ | </ | ||
+ | |||
+ | ==== Entering ESP32 Download Mode ==== | ||
+ | |||
+ | * Entering download mode on ESP32-C3 (and most other ESP32 based boards): | ||
+ | * Warm reset (useful if disconnecting power is inconvenient, | ||
+ | - Hold BOOT | ||
+ | - Tap RST | ||
+ | - Release BOOT after 2 seconds | ||
+ | * Cold reset | ||
+ | - Remove all power sources (USB, battery, solar, etc.) | ||
+ | - Hold BOOT | ||
+ | - Insert power supply | ||
+ | - Release BOOT after 2 seconds | ||
+ | |||