12 Commits
Author SHA1 Message Date
rich ee6e4d7a7b palm-client: tap and hold a message for React, Reply, Send DM and Path Details (also Options > Message Actions for the newest). Reactions use MeshCore One's format (@[Name]<emoji>\n<hash>, hash = Base32 of SHA-256(text || LE timestamp)), so MC1 and MeshMonitor show ours and we show theirs: kept in their own store, shown under the message, never chat or unread. Received messages keep their hash and, matched from the RX log push, the repeaters they came through. The emoji glyphs now go out as the emoji they show, not cp1252 quotes 2026-11-05 09:11:29 -05:00
rich 4068473ad1 palm-client: admin console for repeaters and rooms (CLI, status, telemetry)
Login on a repeater opens the console (rooms: More > Admin Console). A
command line sends CLI commands (SEND_TXT_MSG with txt_type CLI); replies,
which the radio delivers as CLI-type DMs, go to the console instead of the
conversation. Status (SEND_STATUS_REQ -> 0x87) shows the repeater's
RepeaterStats: battery, uptime, queue, noise, last RSSI/SNR, packet counts,
airtime, dups and errors. Telem (SEND_TELEMETRY_REQ -> 0x8B) decodes the
Cayenne LPP readings. Cmds lists common commands and Read settings (ten
gets); items ending in ... go into the command line to finish. One request
at a time, the rest queued; no answer is reported after the radio's
estimate plus 8 s.

remote_fmt.c (builders, parsers, text) is pure C and host-tested; the
console and screen are in segment 3 (12.4 KB).
2026-11-02 07:17:03 -05:00
rich fe5064cdab palm-client: contact detail with signal history, room login, add contact by key
Contact detail (new screen, segment 3): type, route, last advert, the full
key, and every time the radio heard the node directly with SNR/RSSI.
Message, Login (rooms and repeaters, password prompt), More: Reset Path,
Remove.

Signal history comes from the radio's RX log pushes (0x88), which it
already sends for every packet: a zero-hop advert names its sender; a
flooded packet's last path hash names the repeater we heard it from.
Hearings of the same node within a minute merge. 48 entries, kept in an
unsaved preference across launches. Parser host-tested, including
transport codes and direct routes (no 'from').

Rooms: Message logs in first if needed (SEND_LOGIN, then the
LOGIN_SUCCESS/FAIL push, waiting as long as the radio estimates). Room
posts are signed messages: the author's 4-byte prefix is now parsed and
the transcript shows the author's name instead of the room's.

Add Contact (Contacts > Add): name, type and 64-hex-digit key, sent with
ADD_UPDATE_CONTACT with an unknown path, for messaging a node whose advert
hasn't been heard.
2026-11-01 21:55:52 -05:00
rich 9d868898ac palm-client: add and leave channels (#hashtag and private by key)
Options > Add Channel: a #hashtag channel's key is the first 16 bytes of
SHA-256 of its UTF-8 name, '#' included (companion_protocol.md: #test ->
9cd8fcf2...); a private channel is joined with its 32-hex-digit key. It
goes in the first free slot via CMD_SET_CHANNEL and opens the new
conversation. Options > Leave Channel empties the open channel's slot
(empty name, zero secret) after asking. Creating a private channel isn't
offered: the Visor has no good randomness for a key.

SHA-256 is plain C in the second segment, host-tested against 'abc', the
documented #test key and every padding boundary. Adds VmParseHex and
VmBuildSetChannel with tests. sections.h leaves the attribute off under
clang so the editor's checker stops flagging it.
2026-11-01 16:15:57 -05:00
rich 0189a23267 palm-client: messaging protocol (send DM/channel, SENT, acks, channels, clock, advert)
Builders for SEND_TXT_MSG, SEND_CHANNEL_TXT_MSG (with MeshTerm's 150/130
byte limits), GET_CHANNEL, GET/SET_DEVICE_TIME and SEND_SELF_ADVERT; parsers
for CHANNEL_INFO, SENT (expected ack + timeout), PUSH_SEND_CONFIRMED and
CURR_TIME. All per MyMesh.cpp, checked byte for byte in host tests.
TxtPalmToUtf8 converts outgoing text from the Visor's Windows-1252 to UTF-8
and never cuts a character; it round-trips with TxtUtf8ToPalm.
2026-11-01 15:21:17 -05:00
rich 7d1c84f35d palm-client: offer a radio reboot after changing radio settings
Reception stayed dead after switching to PhillyMesh until the XIAO was
rebooted: SET_RADIO_PARAMS saves and reports the new values, but the
receiver only retunes on a restart. After a radio change, Settings asks
to reboot the radio (CMD_REBOOT + "reboot"; no reply), waits for it and
reconnects.
2026-11-01 15:10:07 -05:00
rich d00d7fab26 palm-client: contacts (database + screen), command retry, PhillyMesh preset
Contacts: Refresh downloads GET_CONTACTS into a backed-up Palm database
(VisorMeshContacts), keeping the previous list if the download fails, and
sorts by name. The screen lists name with type and route, taps show
details (key prefix, last advert). Path lengths are decoded as hash size
(bits 7-6) + hop count (bits 5-0), since PhillyMesh uses 2-byte hashes.

session.c keeps unread received bytes across waits; before, bytes after a
completed frame in the same read were dropped, which would lose
back-to-back frames like the contact list. Settings commands get two tries
(the Visor's USB link can drop while idle). Ports moves to an Options menu.
Local presets (tools/local-presets.json, PhillyMesh) are listed before
MeshCore's and survive gen_presets.py --fetch.
2026-11-01 14:54:53 -05:00
rich 5a347be52d palm-client: Node Settings screen (name, radio preset/params, TX power, path hash)
Settings validates against the firmware's limits before sending anything,
then sends only what changed (SET_ADVERT_NAME, SET_RADIO_PARAMS with the
client-repeat byte passed through from DEVICE_INFO, SET_RADIO_TX_POWER,
SET_PATH_HASH_MODE), requires RESP_OK for each and names the step that
failed, then re-reads DEVICE_INFO/SELF_INFO.

The preset pop-up uses a snapshot of MeshCore's suggested presets
(api.meshcore.nz, 27 entries) in tools/meshcore-presets.json; src/presets.c
is generated from it by tools/gen_presets.py with exact decimal conversion.
Radio state moves into session.c; TX power is now signed; adds
fixed-point decimal parse/format helpers with host tests.
2026-11-01 12:03:48 -05:00
rich c9183dc591 palm-client: connect screen (DEVICE_QUERY + APP_START) and session layer
session.c does request/reply over the transport: waits for the wanted
reply code, skips pushes (remembering PUSH_MSG_WAITING), maps RESP_ERR,
and retries sends while the USB bridge attaches. Connect keeps the link
open and the main form shows node name, frequency, BW/SF/CR, TX power
and firmware. Adds a DEVICE_INFO parser.

Fixes the DEVICE_INFO test fixture: it was hand-typed with two bytes
shifted, and an earlier test had been adjusted to match the typo (version
at offset 62). It's now generated from the capture file; the version is
at 60, as in MeshCore's layout.
2026-11-01 11:53:30 -05:00
rich 9fba1903af palm-client: protocol builders and parsers for the read-only commands
APP_START/SELF_INFO, GET_CONTACTS/CONTACT/END_OF_CONTACTS and
SYNC_NEXT_MESSAGE with v3 contact and channel message frames, laid out
per MeshCore MyMesh.cpp. Little-endian fields are assembled byte by byte
so they decode correctly on the big-endian 68k. Builders are checked
byte-for-byte against frames the real radio accepted; SELF_INFO and the
empty contact list are real captures (key and name redacted), contact
and message frames are synthetic. companion_query.py gains --text.
2026-11-01 11:20:35 -05:00
rich e21bc642b1 firmware: enable USB companion link, add bench query tool; verified on XIAO
Flashed the UART companion build to the SB-LoRa XIAO. With
ENABLE_USB_INTERFACE it also answers over USB, so it can be tested and
configured without an adapter. companion_query.py (stdlib only) sends
CMD_DEVICE_QUERY and got DEVICE_INFO for MeshCore v1.17.1; that frame
is now a palm-client host test.
2026-11-01 11:05:42 -05:00
rich cc989cf357 palm-client: Docker toolchain, app scaffold and protocol framing
prc-tools-remix 2.3.6 + PilRC + Palm OS 3.5 SDK (pinned) in a Docker
image; make builds visormesh.prc there when the toolchain isn't local.
App has a main form whose Query button sends CMD_DEVICE_QUERY over the
Serial Manager transport. Companion framing is plain C with host tests.
make install pushes the .prc to a Pi with the USB cradle (untested).
2026-11-01 10:19:33 -05:00