Skip to content

Conversation

@swannman
Copy link

@swannman swannman commented Nov 1, 2025

In the PugetMesh community we have channels like #bot and #testing that are mostly used for "can you hear me?" tests. These are the most heavily-used channels in the region, yet the messages are not useful to store offline - they take up space on the device and are time-consuming to sync when reconnecting a phone to the companion.

This PR introduces a per-channel "no store" flag that tells the companion not to store any messages for the channel unless a phone is connected. This reserves more offline storage for channels that actually matter, and makes reconnecting faster.

This PR also introduces the concept of channel flags. These are persisted in the unused 4-byte header of each channel in the data store. Other per-channel settings such as notifications enabled/disabled can be stored here in the future.

Testing performed on a WisMesh Tag:

Upgrade

  • Upgrade from previous dev branch firmware to this firmware: all channels default to noStore=false.

Behavior when noStore = false

  • Verified that the companion continued to receive and store messages for all channels when disconnected from phone.

Behavior when noStore = true

  • Verified that the companion continued to store messages for these channels when connected to phone
  • Verified that the companion did not store messages for these channels when disconnected from phone

Settings persistence

  • Phone app needs to send CMD_SET_CHANNEL to persist the channel flags after a change

Add a "no store" flag for channels
@swannman swannman marked this pull request as ready for review November 1, 2025 21:32
@swannman
Copy link
Author

swannman commented Nov 1, 2025

@liamcottle would you like me to add CMD_SET and CMD_GET commands for this flag so it's ready for integration with clients? Just need to know how to test them if so. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants