Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
816d4e2
Update faq.md
silverphish-io Sep 25, 2025
4e886bf
Typo fix in faq and payloads
silverphish-io Sep 25, 2025
c8a6bcf
Update README.md
ripplebiz Sep 28, 2025
3dc04de
Merge pull request #837 from silverphish-io/typo-fix
liamcottle Sep 28, 2025
f594f2c
Update faq.md
LitBomb Sep 30, 2025
86225cd
Merge pull request #869 from LitBomb/patch-19
ripplebiz Oct 1, 2025
6ee0b85
Fix debug log: use c->extra.room.push_failures instead of non-existen…
Oct 1, 2025
f5f5886
Merge branch 'dev'
Oct 2, 2025
3e3fa5b
trim trailing whitespace, clarify repeater gps, remove outdated instr…
tekstrand Oct 4, 2025
da5dbcd
Merge pull request #871 from spacepc-de/fix-debug-log-field
ripplebiz Oct 6, 2025
b2dcb06
Merge pull request #809 from tekstrand/fixup
liamcottle Oct 18, 2025
8b68b5a
Update README.md (RAK boards don't need pio patch)
fdlamotte Nov 12, 2025
9405e8b
Merge branch 'dev'
Nov 13, 2025
6d32193
Merge branch 'dev'
Nov 30, 2025
cae37d8
Update faq.md
LitBomb Dec 8, 2025
1f5659d
Update faq.md
LitBomb Dec 8, 2025
922e378
Merge pull request #1192 from LitBomb/patch-20
ripplebiz Dec 10, 2025
2bcc9c1
Update faq.md
mattzzw Dec 14, 2025
2228214
Merge pull request #1216 from mattzzw/main
liamcottle Dec 15, 2025
27c92d2
Update FAQ with new MeshCore applications and tx power settings for a…
LitBomb Dec 22, 2025
9b08a9b
Merge pull request #1260 from LitBomb/patch-21
ripplebiz Dec 29, 2025
a93527a
fix Station G2 output dBm typo
LitBomb Jan 3, 2026
6b52fb3
Merge pull request #1310 from LitBomb/patch-22
liamcottle Jan 3, 2026
06867b5
Initial bitchat bridge implementation
jooray Jan 17, 2026
9378ba0
link to blog and docs
jooray Jan 17, 2026
1ad8e9d
Add preliminary NRF52 support
jooray Jan 18, 2026
ee246ec
Add Bitchat support for Heltec V4
jooray Jan 18, 2026
662fa18
Add NRF52 support
jooray Jan 18, 2026
d47855d
change occurrences to dogechat/DOGECHAT
GreatApe42069 Jan 18, 2026
54c4981
change occurrences to dogechat
GreatApe42069 Jan 18, 2026
64e3c16
change occurrences to Dogechat
GreatApe42069 Jan 18, 2026
31080a8
change File name occurrences
GreatApe42069 Jan 18, 2026
49c837b
change last remaining occurences to Dogechat
GreatApe42069 Jan 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ cmake-*
.cache
.ccls
compile_commands.json
releases/
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

MeshCore is a lightweight, portable C++ library that enables multi-hop packet routing for embedded projects using LoRa and other packet radios. It is designed for developers who want to create resilient, decentralized communication networks that work without the internet.

## About the Dogechat Bridge

This is a special experimental Dogechat bridge branch.

Read [my blog](https://juraj.bednar.io/en/blog-en/2026/01/18/bridging-dogechat-and-meshcore-resilient-communication-when-you-need-it-most/) and [documentation](docs/dogechat-bridge.md).


## 🔍 What is MeshCore?

MeshCore now supports a range of LoRa devices, allowing for easy flashing without the need to compile firmware manually. Users can flash a pre-built binary using tools like Adafruit ESPTool and interact with the network through a serial console.
Expand Down Expand Up @@ -97,10 +104,10 @@ Here are some general principals you should try to adhere to:

There are a number of fairly major features in the pipeline, with no particular time-frames attached yet. In very rough chronological order:
- [X] Companion radio: UI redesign
- [ ] Repeater + Room Server: add ACL's (like Sensor Node has)
- [ ] Standardise Bridge mode for repeaters
- [X] Repeater + Room Server: add ACL's (like Sensor Node has)
- [X] Standardise Bridge mode for repeaters
- [ ] Repeater/Bridge: Standardise the Transport Codes for zoning/filtering
- [ ] Core + Repeater: enhanced zero-hop neighbour discovery
- [X] Core + Repeater: enhanced zero-hop neighbour discovery
- [ ] Core: round-trip manual path support
- [ ] Companion + Apps: support for multiple sub-meshes (and 'off-grid' client repeat mode)
- [ ] Core + Apps: support for LZW message compression
Expand All @@ -113,12 +120,3 @@ There are a number of fairly major features in the pipeline, with no particular
- Report bugs and request features on the [GitHub Issues](https://github.com/ripplebiz/MeshCore/issues) page.
- Find additional guides and components on [my site](https://buymeacoffee.com/ripplebiz).
- Join [MeshCore Discord](https://discord.gg/BMwCtwHj5V) to chat with the developers and get help from the community.

## RAK Wireless Board Support in PlatformIO

Before building/flashing the RAK4631 targets in this project, there is, unfortunately, some patching you have to do to your platformIO packages to make it work. There is a guide here on the process:
[RAK Wireless: How to Perform Installation of Board Support Package in PlatformIO](https://learn.rakwireless.com/hc/en-us/articles/26687276346775-How-To-Perform-Installation-of-Board-Support-Package-in-PlatformIO)

After building, you will need to convert the output firmware.hex file into a .uf2 file you can copy over to your RAK4631 device (after doing a full erase) by using the command `uf2conv.py -f 0xADA52840 -c firmware.hex` with the python script available from:
[GitHub: Microsoft - uf2](https://github.com/Microsoft/uf2/blob/master/utils/uf2conv.py)

148 changes: 148 additions & 0 deletions docs/dogechat-bridge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# Dogechat Bridge

The Dogechat Bridge enables communication between the [Dogechat](https://dogechat.app) Android app and MeshCore mesh network. Messages sent to the `#mesh` channel in Dogechat are relayed to MeshCore nodes, and vice versa.

## Overview

- **Bridge Direction**: Bidirectional - messages flow both ways between Dogechat and MeshCore
- **Channel**: Only the `#mesh` channel is bridged (hardcoded)
- **Identification**: Messages from Dogechat users appear with a phone emoji prefix on MeshCore nodes
- **Platform**: ESP32 only (requires ESP32 ROM miniz for decompression)

## Supported Boards

The following ESP32 boards have `_companion_radio_usb_dogechat` targets:

| Board | Target Name |
|-------|-------------|
| Heltec LoRa32 V2 | `Heltec_v2_companion_radio_usb_dogechat` |
| Heltec LoRa32 V3 | `Heltec_v3_companion_radio_usb_dogechat` |
| Heltec Wireless Stick Lite V3 | `Heltec_WSL3_companion_radio_usb_dogechat` |
| Heltec CT62 | `Heltec_ct62_companion_radio_usb_dogechat` |
| Heltec Tracker V2 | `heltec_tracker_v2_companion_radio_usb_dogechat` |
| LilyGo T3-S3 (SX1262) | `LilyGo_T3S3_sx1262_companion_radio_usb_dogechat` |
| LilyGo T-Deck | `LilyGo_TDeck_companion_radio_usb_dogechat` |
| LilyGo TLora V2.1 | `LilyGo_TLora_V2_1_1_6_companion_radio_usb_dogechat` |
| Station G2 | `Station_G2_companion_radio_usb_dogechat` |
| Seeed Xiao C3 | `Xiao_C3_companion_radio_usb_dogechat` |
| Seeed Xiao S3 WIO | `Xiao_S3_WIO_companion_radio_usb_dogechat` |
| Ebyte EoRa-S3 | `Ebyte_EoRa-S3_companion_radio_usb_dogechat` |

**Note**: NRF52-based boards are not supported because Dogechat message decompression requires the ESP32 ROM miniz library.

## Build Targets

### USB + Dogechat (`*_companion_radio_usb_dogechat`)

This is the recommended configuration:

- **MeshCore companion app**: Connects via USB serial
- **Dogechat app**: Connects via standalone BLE

This gives the best experience because:
- The MeshCore web app works reliably via USB serial
- Dogechat has dedicated BLE access without sharing with MeshCore

### Building

```bash
# Build for Heltec Wireless Stick Lite V3
pio run -e Heltec_WSL3_companion_radio_usb_dogechat

# Flash
pio run -e Heltec_WSL3_companion_radio_usb_dogechat -t upload
```

## How It Works

### Channel Bridging

1. **Dogechat to MeshCore**: When a Dogechat user sends a message to `#mesh`, the bridge:
- Receives the message via BLE
- Decompresses it (Dogechat uses zlib compression)
- Extracts the sender nickname and message content
- Sends it to the MeshCore #mesh with a phone emoji prefix

2. **MeshCore to Dogechat**: When a MeshCore node sends a message to the `#mesh` channel, the bridge:
- Receives the mesh packet
- Creates a Dogechat MESSAGE packet with the sender name and content
- Broadcasts it via BLE

### Message Format

Messages from Dogechat appear on MeshCore as:
```
<sender>: message content
```

Messages from MeshCore appear on Dogechat with the MeshCore sender's name in angle brackets.

### Long Messages

MeshCore packets have a ~127-byte payload limit. Long Dogechat messages are automatically split into multiple parts with `[1/N]` indicators.

## Limitations

1. **Only #mesh channel**: Only the `#mesh` hashtag channel is bridged. DMs and other channels are ignored.

2. **Message size**: MeshCore packets are limited to ~127 bytes. Long messages are split into multiple parts.

3. **No end-to-end encryption bridge**: Dogechat's Noise protocol encryption and MeshCore's encryption are separate. Messages are decrypted/re-encrypted at the bridge.

4. **No file/image transfer**: Dogechat file transfers (images, etc.) are not supported on the mesh.

5. **Time synchronization**: The bridge synchronizes its clock from incoming Dogechat packets. If no Dogechat client connects, timestamps may be inaccurate. Time needs to be accurate for Dogechat to work

## Debugging

To enable debug output, use one of these methods:

### Method 1: Environment variable (temporary)

```bash
# Build with debug output enabled
PLATFORMIO_BUILD_FLAGS="-D DOGECHAT_DEBUG=1" pio run -e Heltec_WSL3_companion_radio_usb_dogechat
```

### Method 2: Edit platformio.ini (persistent)

Add `-D DOGECHAT_DEBUG=1` to your environment's build_flags:

```ini
[env:Heltec_WSL3_companion_radio_usb_dogechat]
build_flags =
${Heltec_WSL3_companion_radio_usb.build_flags}
${dogechat_base.build_flags}
-D DOGECHAT_DEBUG=1 ; Enable debug output
```

This enables detailed logging of:
- Message parsing
- Relay confirmations
- Peer cache updates
- Fragment reassembly

## Technical Details

### BLE Service

- **Service UUID**: `F47B5E2D-4A9E-4C5A-9B3F-8E1D2C3A4B5C`
- **Characteristic**: Single read/write/notify characteristic
- **MTU**: 517 bytes (max BLE MTU for large messages)

### Channel Key

The `#mesh` channel uses a hashtag-derived key:
```
SHA256("#mesh")[0:16] = 5b664cde0b08b220612113db980650f3
```

This matches MeshCore's hashtag room key derivation.

### Protocol Support

- Message decompression (zlib via ESP32 ROM miniz)
- Ed25519 message signing
- Peer announcement/discovery
- REQUEST_SYNC handling (sends cached messages)
- Fragment reassembly for long messages
Loading