Meshtastic GPS Tracker with ESP32 + LoRa: Complete Build
Build a Meshtastic GPS tracking network using the LiLyGo T-Beam Supreme as a mobile tracker and a Heltec LoRa 32 V3 as a base station. This mesh network provides off-grid text messaging and position tracking at ranges of 2-10km without cellular or WiFi coverage.
What You Need
Step-by-Step Instructions
-
Step 1 Flash Meshtastic Firmware via Web Flasher
Open flasher.meshtastic.org in Chrome or Edge. Connect the T-Beam Supreme via USB-C and select the correct board variant — for the T-Beam Supreme with SX1262 LoRa radio, select "T-Beam Supreme" from the device list.
Click Flash and wait approximately 2 minutes for the firmware to install. The web flasher handles partition tables and bootloader automatically. Once complete, the T-Beam reboots and displays the Meshtastic logo on its OLED screen.
For the Heltec LoRa 32 V3 base station, repeat the process selecting "Heltec V3" as the board variant. Both devices must run the same Meshtastic firmware version to communicate.
Tip: If flashing fails, hold the BOOT button while pressing RST on the T-Beam. Release BOOT after Chrome detects the serial port. -
Step 2 Configure LoRa Region and Channel
Open the Meshtastic app on your phone (iOS or Android) and connect to the T-Beam via Bluetooth. The first configuration step is setting your LoRa region, which determines the legal frequency band and transmission power for your country.
For the United States, select US (915MHz ISM band, up to 1W transmit power). For Europe, select EU_868 (868MHz, 25mW default with duty cycle limits). Incorrect region settings can violate radio regulations and cause interference.
Next, configure the channel. The default "LongFast" preset optimizes for maximum range with a data rate of approximately 1.07 kbps — sufficient for text messages and GPS coordinates. For faster message delivery at shorter range, switch to "MediumFast" or "ShortFast". All nodes in your mesh must use the same channel preset and encryption key to communicate.
Tip: Generate a custom encryption key in the Meshtastic app and share it only with your group. The default channel has no encryption — anyone with Meshtastic on the same frequency can read your messages. -
Step 3 Set Up GPS Tracking and Position Broadcasts
The T-Beam Supreme includes an integrated GPS module (L76K GNSS (GPS/GLONASS/BeiDou)) that acquires a fix within 30-60 seconds outdoors with a clear sky view. The GPS position is broadcast to the mesh at a configurable interval.
In the Meshtastic app, go to Module Configuration and then Position. Set the position broadcast interval to 120 seconds for active tracking, or 900 seconds (15 minutes) for battery conservation. The fixed position interval only sends updates when the device has moved more than a configured distance threshold.
GPS accuracy is typically 2-5 meters outdoors. Indoors or under heavy tree cover, accuracy degrades to 10-30 meters or the GPS may lose fix entirely. The T-Beam stores the last known position and broadcasts it with a timestamp so other nodes know how current the data is.
Each position broadcast includes latitude, longitude, altitude, speed, and heading. The mesh network relays this data through intermediate nodes, so a tracker 10km away can still report its position if there are relay nodes in between.
Tip: Enable the GPS power save mode in Meshtastic settings to reduce battery drain. The GPS module cycles between active and sleep states, maintaining a warm fix while drawing less current. -
Step 4 Configure MQTT Bridge to Home Assistant
To view Meshtastic GPS positions on a Home Assistant map, configure one node as an MQTT gateway. This node needs WiFi access (the Heltec LoRa 32 V3 base station is ideal since it has WiFi and can stay plugged in).
In the Meshtastic app, connect to the base station node and go to Module Configuration, then MQTT. Enable MQTT and enter your Home Assistant MQTT broker address (typically your Home Assistant IP on port 1883). Set the root topic to "msh" and enable JSON output.
Meshtastic publishes position data as JSON to topics like msh/2/json/LongFast/!nodeId. In Home Assistant, create MQTT device tracker entities for each Meshtastic node. The position data includes latitude and longitude fields that Home Assistant's device_tracker platform uses directly.
The MQTT bridge is unidirectional by default — mesh data goes to Home Assistant but Home Assistant cannot send messages back to the mesh. Enable uplink and downlink if you want bidirectional communication.
Tip: Use a static MQTT topic per node by setting the node's long name to something descriptive. This makes Home Assistant automations easier to configure than using hex node IDs. -
Step 5 Set Up Base Station Node
The base station node serves two roles: it relays messages between distant mesh nodes and bridges the mesh to your home network via MQTT. Place it at the highest point in your home, ideally near a window facing the direction of your outdoor activities.
Connect the Heltec LoRa 32 V3 to a USB power source — it draws approximately 120mA with WiFi and LoRa active. Attach the included SMA antenna vertically for best omnidirectional coverage. For significantly better range, replace the stock antenna with a 915MHz (or 868MHz for EU) fiberglass antenna mounted outside.
In Meshtastic, configure the base station's role as ROUTER. This prioritizes message relaying over other functions and optimizes the node for always-on operation. ROUTER nodes participate in mesh routing but do not initiate position broadcasts unless configured to do so.
For extended coverage, deploy additional relay nodes at elevated positions. Each relay extends the mesh by another 2-10km depending on terrain and antenna height. Solar-powered relay nodes using a 5W panel and 18650 battery can operate indefinitely.
Tip: Antenna height is the single biggest factor in LoRa range. Moving the antenna from a desk to a second-floor window can double your effective range. -
Step 6 Range Testing
Take the T-Beam Supreme mobile node outdoors and walk or drive away from your base station while monitoring the Meshtastic app for connectivity. The app shows signal-to-noise ratio (SNR) and received signal strength (RSSI) for each received message.
Typical ranges for Meshtastic on 915MHz with stock antennas: 2-5km in suburban areas with buildings and trees, 5-10km with line-of-sight over flat terrain, and 15-30km from elevated positions (hilltop to hilltop) with upgraded antennas. The LongFast channel preset maximizes range at the cost of data rate.
Run a range test using Meshtastic's built-in range test module. Enable it in Module Configuration and set it to send a test message every 30 seconds. Walk away from the base station and note where messages start failing. This establishes your reliable coverage area.
Failing messages at range boundaries are normal. Meshtastic automatically retries failed transmissions and uses mesh routing to find alternative paths through intermediate nodes. A relay node placed between two distant nodes can bridge gaps in coverage.
Frequently Asked Questions
What range can I expect from Meshtastic with ESP32 + LoRa?
With stock antennas: 2-5km suburban, 5-10km flat line-of-sight, 15-30km hilltop-to-hilltop. Antenna height and quality are the biggest factors. Upgrading to a fiberglass collinear antenna and mounting it outdoors at 5-10 meters height can double or triple range compared to the stock whip antenna.
What antenna should I use for maximum Meshtastic range?
For the base station, a 5dBi fiberglass collinear antenna mounted outdoors is the best balance of cost and performance. For mobile nodes, the stock SMA whip antenna is adequate. For extreme range, a directional Yagi antenna provides 10-12dBi gain but only in one direction. Always match the antenna frequency to your region (915MHz US, 868MHz EU).
Can I power a Meshtastic relay node with solar?
Yes. A 5W solar panel with a TP4056 charge controller and 3.7V 18650 battery (3500mAh) powers a Heltec LoRa 32 V3 relay node indefinitely in most climates. The node draws approximately 50-80mA in ROUTER mode without WiFi. Even on cloudy days, a 5W panel provides enough charge to maintain the battery.
What is the difference between Meshtastic and MeshCore?
Meshtastic is the established open-source LoRa mesh firmware with broad hardware support, a mature mobile app, and MQTT integration. MeshCore is a newer alternative focusing on simpler firmware and lower power consumption. As of early 2026, Meshtastic has the larger community, more documentation, and wider hardware compatibility. MeshCore is worth watching but less proven.
Is Meshtastic legal to use?
Yes, in most countries. Meshtastic operates on ISM (Industrial, Scientific, Medical) bands that are license-free: 915MHz in the US (FCC Part 15), 868MHz in Europe (ETSI EN 300 220), and 923MHz in Australia. You must set the correct region in Meshtastic to comply with local power limits and duty cycle regulations. No amateur radio license is required.
How many nodes can a Meshtastic mesh network support?
Meshtastic practically supports up to 80-100 nodes on a single channel before message collisions degrade performance. For larger networks, use multiple channels or reduce position broadcast frequency. The mesh routing protocol supports up to 3 hops between source and destination, which typically covers 10-40km depending on node placement.
Can Meshtastic send text messages without internet?
Yes. Meshtastic is a fully off-grid mesh network. Text messages, GPS positions, and telemetry data travel between nodes using LoRa radio — no cellular, WiFi, or internet connection required. This makes it ideal for hiking, camping, rural property monitoring, and emergency communication.