LoRa Commands
Command reference for GhostESP LoRa: Meshtastic, MeshCore and boot auto-start
On this page
Reference for the lora, mesh and meshcore commands. Setting up for the first time? Start with First run. Run lora help or help all for the live list on the device.
Start, Stop, Status
| Command | What it does |
|---|---|
lora status | Radio state, region, frequency, modem, TX power, companion mode, last error |
lora start / lora on | Power Vext (Heltec), init the SX1262, join LongFast, begin RX/TX |
lora stop / lora off | Stop RX, release the radio and Vext |
lora setup | Print first-run guidance (fixed text): region is required, current defaults, then lora start |
mesh | Show what owns the radio, and the remembered boot choice |
mesh off | Stop the active protocol |
Protocol Switching
One radio, one protocol at a time.
| Command | What it does |
|---|---|
mesh switch meshtastic | Stop MeshCore, start Meshtastic, remember it |
mesh switch meshcore | Stop Meshtastic, start MeshCore, remember it |
mesh on [protocol] | Start the remembered protocol, or the one you name |
The remembered choice only changes after a protocol starts successfully, so a failed switch never leaves boot pointed at a dead radio.
Boot Auto-Start
Auto-start is opt-in and remembers whether to start and which protocol.
| Command | What it does |
|---|---|
lora autostart | Show the setting and the boot protocol |
lora autostart meshtastic | Boot Meshtastic (needs a saved region) |
lora autostart meshcore | Boot MeshCore (no region needed) |
lora autostart on / off | Toggle auto-start, keep the current protocol |
mesh autostart <meshtastic|meshcore|off> | Same thing from mesh |
meshcore autostart on|off | MeshCore shortcut; on also selects MeshCore |
The radio starts late in boot, after the display and storage init, so it never starves system memory. Confirm what came up with mesh after a reboot.
Messages and Peers
| Command | What it does |
|---|---|
lora chat <text> | Broadcast on the LongFast channel (default-key encrypted) |
lora chat | List recent messages (aliases: lora send, lora messages) |
lora nodes | List known nodes as !node short rssi snr [pki][+] (no hops or last-heard fields) |
lora nodeinfo [node] | Advertise our name/key and request a reply |
lora dm <node> <text> | Encrypted direct message; the peer key must be known |
lora pkinfo <node> | Show the stored peer key and our own key |
lora channels | Show the 8 channel slots, their roles and hashes |
Radio Settings
Changes apply on the next lora start unless noted.
| Command | What it does |
|---|---|
lora set region <code> | Legal band plan; see Regions for all 24 codes |
lora region <code> | Shorthand for lora set region |
lora set sf <5..12> | Spreading factor; higher means longer range, lower rate. SF6 is rejected (it needs an implicit header) and BW500 needs SF7 or higher |
lora set bw <125|250|500> | Bandwidth in kHz; must match peers |
lora set cr <5..8> | Coding rate, CR4/5 to CR4/8 |
lora set tx <dBm> | TX power; minimum 2 dBm, values above the board/region cap are rejected |
lora set preset <0..16> | Use a named Meshtastic preset instead of a custom modem |
lora set hop <1..7> | Hop limit: how many relays a packet may cross |
lora set role <0..12> | Device role: 0 client, 1 client mute, 2 router, 5 tracker, 6 sensor, 8 client hidden, 10 TAK tracker, 11 router late, 12 client base |
lora set offset <MHz> | Frequency offset correction for a drifting crystal (±2.0 MHz) |
lora set ovrfreq <MHz> | Hard frequency override, ignoring the region plan |
lora set chnum <n> | Select the region frequency slot directly (0 uses the channel hash, 1..512) |
lora set txen <n> | Enable or disable transmit (listen-only): a nonzero number enables TX, 0 disables. The argument is numeric - on parses as 0 and disables TX |
lora set owner <long> <short> | Advertised names (long under 40 chars, short under 8 chars), then send NodeInfo again |
lora set companion <wifi|ble> | Transport for the companion app bridge |
Phone App and Companion
| Command | What it does |
|---|---|
lora ble on / off | Start or stop the Meshtastic BLE service (Ghost-XXXX) |
lora ble status | Advertising/connected/linked flags only |
lora app | App FIFO push/pop/drop counters, linked state and pending-data flag |
lora companion wifi | Bridge over Wi-Fi (keeps BLE free for scans) |
lora companion ble | Bridge over BLE (shares the radio) |
Pairing steps are in BLE App Link.
Diagnostics
| Command | What it does |
|---|---|
lora diag | IRQ counters, TX queue, app FIFO, last RX metadata |
lora cad | Five channel-activity trials with instantaneous RSSI |
lora reg <hex> [count] | Read SX1262 registers; lora reg 0740 2 should show sync word 24 B4 |
lora pubkey | Our Curve25519 public key |
lora pkselftest | X25519, SHA-256 and AES-CCM known-answer tests |
lora pkitest <node> | PKI encrypt and decrypt loopback against a peer (no TX) |
lora pktry <hex> | Probe a captured frame against the PKI decrypt variants |
lora pki-regen | Generate a new identity keypair |
Avoid lora pki-regen in normal troubleshooting: it replaces the identity key peers already stored, and they need a fresh NodeInfo before direct messages work again.
Active Mesh Verbs
The same actions without naming a protocol, applied to whichever one is running:
| Command | What it does |
|---|---|
mesh send <text> | Send on channel 0 |
mesh messages | Read received messages |
mesh dm <peer> <text> | Direct message |
mesh peers | Nodes (Meshtastic) or contacts (MeshCore) |
mesh channels | List channels |
mesh app [on|off] | BLE app link |
mesh selftest | Crypto self test for MeshCore; under Meshtastic it points you to lora pkselftest |
mesh meshtastic <args> / mesh meshcore <args> | Run a protocol-specific command |
Regions
All 24 region codes lora set region accepts, with the band they cover and the duty-cycle limit applied to transmits. The exact centre frequency also depends on the preset and channel slot, so two nodes on the same region and preset always land on the same frequency.
| Code | Band (MHz) | Duty |
|---|---|---|
us915 | 902.0 - 928.0 | 100% |
eu868 | 869.400 - 869.65 | 10% |
eu433 | 433.0 - 434.0 | 10% |
cn | 470.0 - 510.0 | 100% |
jp | 920.5 - 923.5 | 100% |
anz | 915.0 - 928.0 | 100% |
kr | 920.0 - 923.0 | 100% |
tw | 920.0 - 925.0 | 100% |
ru | 868.7 - 869.2 | 100% |
in | 865.0 - 867.0 | 100% |
nz865 | 864.0 - 868.0 | 100% |
th | 920.0 - 925.0 | 10% |
ua433 | 433.0 - 434.7 | 10% |
my433 | 433.0 - 435.0 | 100% |
my919 | 919.0 - 924.0 | 100% |
sg923 | 917.0 - 925.0 | 100% |
ph433 | 433.0 - 434.7 | 100% |
ph868 | 868.0 - 869.4 | 100% |
ph915 | 915.0 - 918.0 | 100% |
anz433 | 433.05 - 434.79 | 100% |
kz433 | 433.075 - 434.775 | 100% |
kz863 | 863.0 - 868.0 | 100% |
np865 | 865.0 - 868.0 | 100% |
br902 | 902.0 - 907.5 | 100% |
Pick the region legal for where you are. The duty guard throttles transmits when the band’s airtime budget is used up, and lora status shows the remaining budget.
See MeshCore mode for the meshcore commands, and Mesh details for the wire format.
