MeshCore Rooms (BBS)¶
Developer reference for MeshCore Rooms login/post, session RPCs, saved passwords, auto-sync scheduling, or room wire text. Repo-wide rules live in AGENTS.md.
- UI split: Chat → Rooms (
RoomsPanel.tsx) lists joined/engaged rooms only (saved guest credential, favorite, last-post sync watermark / last-read, auto-sync / auto-login, or an active BBS session). Membership helpers live inmeshcoreRoomMembership.ts. Network → Room servers (RoomServersPanel.tsx) lists discoveredhw_model === 'Room'contacts that are not joined — browse, favorite, Open → Chat Rooms (handleOpenRoom). Empty Chat Rooms points users at Network → Room servers. Remove from Rooms (More menu / Room details) logs out if needed, forgets saved password, unfavorites, clears last-read + last-post watermark, and returns the room to Network → Room servers (local post history is kept). - Chat Rooms chrome: shared
chat/ConversationLayout(same as RRC): room list column (hidden withmesh-client:roomsListCollapsed; no initials rail; 288px wide, so its header keeps the title with the Order / Sync / collapse icons and puts Log in all and the Docs link on a second row), the open room with one header (Search, Starred, Mute, Room details, Leave, and a More menu with Jump to date, Export and Manage on Repeaters; before login only Room details), and a Room details side panel (auto-login / auto-sync switches, sync interval, forget password, Members + ACL refresh viaget acl; opens before login too, ACL needs an admin session) docked at 1280px and up (mesh-client:rooms:detailsCollapsed) and a sheet below. Phones (under 768px) show the list or the room, with Back. Login card replaces the conversation body until logged in; post composer isChatComposer. Room list markers areStatusDottones frommeshcoreRoomSidebarMarker.ts(green logged in, blue saved password, hollow ring none). Manage on Repeaters jumps to Repeaters & Rooms ops (CLI / setperm / infra). Rooms tab badge (summed into the Chat rail badge) viameshcoreRoomsUnread.tscounts joined rooms only (mesh-client:meshcoreRoomsUnread). Blank guest Login = read-only when allowed;"hello"is the default read/write guest password; Continue read-only also sends blank. Cancel login aborts the outer login op (path resolve + SendLogin) viameshcoreBeginRoomLoginOperation/meshcoreCancelRoomLogin; queue TX-spacing waits are interruptible so Cancel does not sit out the 60s mesh spacing. - Ops (not on Rooms / Room servers tabs): Ping / Status / Neighbors / Sensor / Configure / CLI / ACL setperm live on
RepeatersPanel(mixed Repeater + Room table). Manage opens the shared configuration panel for that room, including guest access, ACL permissions, and Default flood scope; Advanced opens the existing CLI. Open room on a room row jumps to Chat → Rooms. Guest passwords stay inmeshcoreRoomCredentialStorage; ops admin usesmeshcoreInfraAdminSecrets(admin-only records allowed). - Server flood scope (firmware v1.15+): Configure → Default flood scope reads
region default; Apply sendsregion default <name>(blank becomes<null>) and verifies another read before reporting success. The firmware persists the change and can create the region automatically. Public region names are limited to 30 UTF-8 bytes; unsupported firmware disables the field. This scopes the server’s flooded adverts and room delivery; known direct routes, subscriptions and guest/admin permissions remain separate. It uses the existing serialized admin CLI path, with the same connection/node guards as other configuration writes. Companion channel scopes are separate local preferences. - Room remote CLI: needs room admin password via SendLogin ACL (
meshcoreCancelRoomLoginthen admin login insidesendRepeaterCliCommand); guest BBS login is not enough (repeatersPanel.roomCliNeedsAdminPassword). - Post length (single-packet): room posts use the shared
ChatComposer(variant="room") and are single-packet like MeshCore chat — over the room payload limit (getMeshcoreRoomPayloadLimitinchatComposerLimits.ts) the send is blocked with the samemeshcoreSingleNoticecallout rather than split into[i/N]parts, and the ~5s fast-send advisory applies. Seechat.md(Composer limits / send cadence). - Session / RPC:
meshcoreRoomSession.ts,meshcoreRoomLoginRpc.ts,meshcoreRoomPostRpc.ts,meshcoreRoomLogoutRpc.ts,meshcoreRoomLoginQueue.ts,meshcoreRoomLoginPathSync.ts,meshcoreRoomSentWait.ts; credentials inmeshcoreRoomCredentialStorage.ts/meshcoreRoomSyncStorage.ts. LoginSuccess: prefer v7+permissions(PERM_ACL_);reservedis the legacy admin/guest hint (0=RW, 1=admin, 2=guest) — do not treat it as ACL. Hops:resolveMeshcoreRoomLoginHopsAwayuses route bytes when UI hops are 0, and treats sticky UI hops with an empty path as 0-hop so SendLogin is not blocked as noRoute. History catch-up:*resetMeshcoreRoomCompanionSyncSinceForCatchUpremove+re-adds the companion contact (firmware zeroessync_sinceonly on new contacts) when this device has no local last-post watermark; add is retried if remove already succeeded so the contact is not left deleted. - Saved passwords:
meshcoreRoomSavedSecrets.ts— sidebar/overlay Forget / Stop auto-login / Enable auto-login (login card, when a saved password exists but auto-login is off). Connect auto-login skips rooms with no saved guest password (listMeshcoreRoomAutoLoginOnConnectNodeIds; admin-only records do not count), so turning the Room details switch on while logged in saves the session guest password first (saveMeshcoreRoomSessionPasswordIfUnsaved, including into an admin-only record); with no session and no saved guest password the switch stays off.forgetMeshcoreRoomSavedSecretsclears credential + disables auto-login and auto-sync;disableMeshcoreRoomLoginAfterAuthFailuredisables both without clearing password or in-memory failure UI. - Scheduler:
meshcoreRoomSyncScheduler.ts+useMeshcoreRuntime.ts— periodic re-login (Auto-sync, RF-only) goes through the sameloginRoompath as the UI (path sync, catch-up, abort, waiting-message drain) withschedulerFastPath(skipTrace /MESHCORE_ROOM_SYNC_ROUTE_RESOLVE_FAST_MS). Single-flight ticks. Auth failure (LoginFail only, see below) disables auto-sync and auto-login viadisableMeshcoreRoomLoginAfterAuthFailure. Timeouts intimeConstants.ts(shorter for TCP / 0-hop). - Connect auto-login:
meshcoreRoomAutoLoginOnConnect.ts+useMeshcoreRuntime.ts— 500ms debounce (MESHCORE_ROOM_AUTO_LOGIN_DEBOUNCE_MS) when Room contacts appear (roomAutoLoginReadyKey, including pubkey-ready). Overlapping triggers share one pass (runMeshcoreRoomAutoLoginSingleFlight) and dirty-re-run so a second room hydrating mid-pathSync still logs in. Disconnect bumps a generation so a dying pass must notSendLoginon the new conn (also clears transient in-memory auto-login failures). Skips logged-in, queued (meshcoreIsRoomLoginQueued), sticky auth failures (shouldSkipMeshcoreRoomAutoLogin), and not-yet-hydrated contacts. Transient timeouts/path errors still set the sidebar failure banner but do not sticky-skip further connect auto-login; auth/LoginFail still disables auto-login+sync viadisableMeshcoreRoomLoginAfterAuthFailure. - What counts as a wrong password: only a LoginFail push (
MESHCORE_ROOM_LOGIN_REJECTED_MESSAGEfrommeshcoreRoomLoginRpc.ts, or theroomLogin.rejected*messagemeshcoreRoomLoginthrows for it), checked bymeshcoreRoomLoginErrorIsAuthFailure. A companionRESP_ERRto SendLogin is aMeshcoreRadioRejectedErrorwith its firmware code (shown asradioContactMissing/radioContactTableFull/roomLogin.failed); like route-programming refusals ("radio rejected request"), it is transient and never turns auto-login or auto-sync off. Do not classify by the word "rejected": the companion protocol has no request ids, so anRESP_ERRfor another command can land on a waiting SendLogin. meshcore.js 1.15.1 does not emit LoginFail (0x86);patches/README.mdrecords that the handler was not carried because stock room firmware does not answer a bad password, so in practice a wrong password times out. - Room post authors: SignedPlain 4-byte pubkey prefix → contact/registry map at ingest. meshcore.js decodes contact message text as UTF-8, which loses prefix bytes from
0x80up and cuts the post at a0x00; the local patch (patches/@liamcottle__meshcore.js@1.15.1.patch) keeps the 4 prefix bytes as one char each for SignedPlain and decodes only the body (meshcoreRoomPostAuthorWire.test.ts). An author who is not a known contact still shows as Unknown. A room post's event has the room server asfrom, so when the same post arrives again (a drained waiting message is dispatched by both the protocol subscriber andmeshcoreProcessWaitingMessageItem, and rooms resend history)PacketRouterkeeps the author, name and body already stored for that id instead of writing the room's name over an Unknown author (meshcoreIngest.test.ts, "room posts dispatched through PacketRouter"). A room post id ends with the post's body as stored (meshcoreRoomMessageId, used for live posts, own posts and rows read back at launch), so a stored row under that id is this post, two different posts in the same second keep two rows, and a post the room resends after a restart lands on its reloaded row. Reload builds that id from the saved text and author (meshcoreHydratedMessageRecordswith the saved rows), not from what the reload repairs show, because those repairs can rewrite a post (an unknown author'sName: textreloads as a post by "Name"). A raw author prefix is recognised outside SignedPlain only by characters a UTF-8 decoded key byte leaves behind: U+FFFD or a control character other than tab, line feed and carriage return (looksLikeSignedPlainWirePrefix). Text that starts with letters in any script, an emoji or a short first line keeps its first four characters, live, on display (App.tsxrunsrepairMeshcoreHydratedMessagesover every MeshCore message) and after a restart. A non-SignedPlain line with no author prefix (for example "Bot Stats (24h):") is the room server's own line:meshcoreIngeststores and saves it with the room as author under the room's full name, and the live decoder puts the room in its id the same way (isMeshcoreRoomOwnLinein both), so its live id matches the one a reload builds.PacketRouterstores each event's raw copy before the ingest runs; the ingest drops that copy (a record with nostatus, which ingested, reloaded and own sending rows always have) before deduping, so a line whose raw text is already its body is not taken for a repeat of itself. Unknown/sender_id0 twins of a named post (same room/body/time) collapse viameshcoreRoomPostMatch/ hydratemeshcoreReconcileRoomSenderIds+repairMeshcoreHydratedRoomPostDuplicates. - Retention:
pruneMeshcoreMessagesByCountOnindatabase.tskeeps the newest N room posts (rows whoseMESHCORE_MESSAGE_CHANNEL_SQLis -2, the same rows hydration loads into the room window) apart from the newest N channel and DM rows, peridentity_id, N being the MeshCore Cap stored messages count. Busy traffic on one mesh profile therefore cannot prune another profile's history. DM-shaped posts from older builds stay in the channel and DM pool. The contact prunes skip Room contacts that hold posts of either kind (NO_STORED_ROOM_POSTS_SQL). - Wire text:
meshcoreChannelText.ts— channel/DM/room payloads, SignedPlain inbound strip, tapback/reply lines;meshcoreGifWire.ts— Openg:GIFID;meshcoreOpenReaction.ts— Openr:HASH:INDEX. Default companion keyless outbound; opt-in Open wire via RadiomeshcoreOpenWireCompatEnabled(UI onRadioPanel).