MeshCore Mode

Run GhostESP as a MeshCore node on the same SX1262 radio

GhostESP runs MeshCore as an alternative to Meshtastic on the same radio. Use it when the people you talk to are on MeshCore. Only one protocol runs at a time.

MeshCore is an independent platform; GhostESP is an independent implementation and is not affiliated with the MeshCore project.

mesh switch meshcore       # stop Meshtastic, start MeshCore, remember the choice
meshcore status            # confirm it is running

You can also switch with the protocol toggle in the on-device app. The remembered choice is what mesh on and boot auto-start use.

First run

1. Name your node. This is what neighbours see:

meshcore set name Ghost

On the device it is MeshCore Settings → Node name.

2. Announce yourself. Contacts are learned from adverts:

meshcore advert            # zero-hop: neighbours only
meshcore advert flood      # flood: the whole mesh learns your name and key

3. Check your identity. MeshCore identifies nodes by public key, not a node number:

meshcore pubkey            # our key and one-byte node hash, e.g. !3A
meshcore contacts          # who has been heard

4. Talk

meshcore send hello                      # group message on channel 0
meshcore ch 3 hello                      # group message on another channel
meshcore dm GhostTwo hello               # direct message a contact
meshcore messages                        # show received messages

Direct messages are encrypted to the contact’s full key and tracked with an ACK. On the device a DM shows Sending → Delivered, or Failed with a tap-to-retry. When the CLI picks a contact, prefer the name from meshcore contacts. A one-byte !hex prefix still works, but it is ambiguous when several contacts share a first byte.

On the device

Open LoRa from the main menu. With the radio off, the first row starts the selected protocol.

  • MeshCore Contacts lists known contacts; picking one opens the conversation.
  • Conversations are kept per channel, so channel 0 and channel 3 stay separate.
  • MeshCore Settings holds the radio toggle, node name, frequency, modem, TX power and the two advert buttons.
  • On encoder boards, double-press on the status screen toggles the radio.

Heltec OLED page

Press PRG to cycle pages; the compact page is reachable whether the radio is running or not.

  • Double-press PRG on that page to toggle the radio.
  • Stopped, it shows MC OFF and PRESS 2X TO START.
  • Running, it shows MESHCORE, frequency/SF, contacts/messages, TX/RX, app-link state and the last received message.

Start on boot

meshcore autostart on      # boot into MeshCore (also selects it as the boot protocol)
meshcore autostart off     # disable

Equivalent: lora autostart meshcore, mesh autostart meshcore.

Reference

CommandWhat it does
meshcore statusRunning state, frequency, modem, TX power, contacts, counters
meshcore on / offStart or stop (aliases of start / stop)
meshcore pubkeyOur Ed25519 public key and node hash
meshcore set name <name>Advertised name (31 characters max)
meshcore advert [flood]Send a self advert, zero-hop by default
meshcore regenGenerate a new identity keypair; peers need a new advert
meshcore contactsKnown contacts: name, key, last heard, path
meshcore channelsConfigured channel slots
meshcore send / ch <0-39>Group message on channel 0 or a chosen channel
meshcore dm <name|!hex> <text>Direct message a contact
meshcore messagesDrain received messages
meshcore set freq <mhz>Centre frequency, e.g. 869.525
meshcore set bw <khz> / sf <5-12> / cr <5-8>Modem settings
meshcore set tx <dbm>TX power, clamped to the board limit
meshcore set repeat <on|off>Forward group and advert floods (default off)
meshcore set latlon <lat> <lon> / loc <0|1>Position sharing
meshcore ble [on|off|status]Companion BLE link for the MeshCore app
meshcore selftestCrypto known-answer tests

The on-device page mirrors the settings: frequency, modem, TX power (tap to cycle) and the advert buttons. Changing frequency or modem re-tunes the radio in place. Every node in a group needs the same frequency, bandwidth, spreading factor and coding rate.

Companion app

meshcore ble on            # MeshCore app link (Nordic-UART-style GATT)
meshcore ble status        # link state and MTU

Only one protocol’s BLE service runs at a time, because one radio owns the SX1262.

If something is off

SymptomFix
No contactsContacts arrive with adverts. Run meshcore advert flood, then wait
Start failsThe other protocol may still own the radio: mesh off, then retry
MeshCore not enabled on this boardThe build was made without CONFIG_HAS_MESHCORE (it defaults on for LoRa builds)
Nothing on the expected channelAll nodes need the same frequency/BW/SF/CR and the same channel slot

See First run for the Meshtastic path and Command reference for boot and switching.