44 Commits
Author SHA1 Message Date
rich 4b05bf25d5 palm-client: Add Channel's New Key (private channels) fills in a random key from a pool fed by what can't be predicted: the exact tick and position of every pen and key event, and the signal readings of every packet the radio reports. Samples are folded into a SHA-256 pool, a key is a hash of it, and the pool moves on after each; it's kept between launches in an unsaved preference (never in a backup). Until 256 samples have come in, New Key asks for a few seconds of stylus movement. Host-tested in tests/test_entropy.c 2026-11-08 19:38:55 -05:00
rich 18c55ef8aa palm-client: three labels no longer run into what follows them: Node's 'Firmware:' is 'Version:', Preferences' Check when closed trigger moved right (its choices are '5 min' to '1 hour' so the longest still fits), and Flood Scopes' default moved right 2026-11-08 19:35:47 -05:00
rich 0357b2f838 palm-client: Add Channel's and Add Contact's notes are three lines each (both ran past the right edge), and a Font Preview line fits in the large font 2026-11-08 18:40:31 -05:00
rich bd9d9ce951 palm-client: SB-LoRa Test (Options menu) for board bring-up: the slot's chip selects, which address mapping reaches the SC16IS740 (connector A0 = CPU A1 or A0, with what each read back), its registers after a reset, a 64-byte internal UART loopback, the slot interrupt (the same loopback through the handler) and a DEVICE_QUERY to the radio. Nothing goes over the air; the bus is only touched once the OS reports a module. Host tests cover the mapping and loopback 2026-11-08 18:18:54 -05:00
rich 585ef5a6f8 palm-client: the Map gets its own Map menu: Basemap On/Off (M) leaves the nodes on plain white, Neighbour Lines On/Off (L) hides a repeater's neighbour lines. Both are remembered with the view 2026-11-06 11:28:28 -05:00
rich 254eb5e96a palm-client: Remove Stale Contacts' buttons are 2 wk / 1 mo / 3 mo / Cancel, so all four fit (Cancel was off the screen); the message spells the periods out 2026-11-06 11:19:48 -05:00
rich f033057283 palm-client: the contact screen's buttons get fixed widths, so More no longer runs past the right edge 2026-11-06 11:13:49 -05:00
rich 34c99d8b0a palm-client: block a sender (a contact's More, or hold their message > Block Sender): their new messages and reactions are dropped as they sync, also in the closed-app check. A contact is blocked by key and by name (channels name senders only by name). Contacts > Blocked Senders lists them to unblock 2026-11-05 15:02:22 -05:00
rich 80f2d2781b palm-client: a repeater's "neighbors" reply in its admin console also goes on the Map for 30 minutes: a line from it to each neighbour with a position, solid for SNR 0 dB or better, grey below. Cmds lists the region commands (region, get, allowf, denyf, save) 2026-11-05 15:02:22 -05:00
rich 7801272830 palm-client: Radio Stats (Go menu, or Stats on Node): the radio's battery, storage, uptime, queue, last signal, airtime and packet counts, read every 5 s, with a graph of its noise floor. Heard Packets (Go menu): the last 40 packets from the RX log, filtered to chat or adverts, a tap showing one in full with its repeaters. info_fmt.c shares the path text with Path Details. The resources also hold the forms and alerts for the features that follow 2026-11-05 14:50:04 -05:00
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 d2f992eafc palm-client: connection state in conversations' title too (the title is cut to make room); tapping "offline" or Options > Connect connects; a reconnect after wake that fails or is stopped is retried 2, 4 ... 256 s later (it often ran before the USB link was back and was never tried again) 2026-11-04 08:56:02 -05:00
rich acf4544f24 palm-client: Options > About VisorMesh: app version, and the radio's firmware when connected 2026-11-04 07:39:45 -05:00
rich 04346a4b7c palm-client: standard Edit menu on every screen with a text field; Contacts, Serial Ports and Screenshot shortcuts move off C, P and S 2026-11-03 18:20:37 -05:00
rich b9dc923e0f palm-client: screenshots (Options > Screenshot, Screenshot in 5 s; make shots)
The screen bits go into a VisorMeshShots record (shots.c, segment 1, no
globals: the delayed one runs from a procedure alarm inside whatever loop is
running, so menus and popups can be captured). make shots fetches the
database over HotSync and tools/shots.py writes PNGs to build/shots/.
2026-11-03 11:48:13 -05:00
rich 3fd932da4f palm-client: pin DMs to the top of Home's Direct list (tap and hold: Pin/Unpin)
Pins are kept by key prefix (pins.c, segment 4, up to 8), so they work for
senders who aren't contacts; those get a Pin-only popup. Pinned DMs sort
first, most recent first among themselves; the rest keep their order.
2026-11-03 11:31:44 -05:00
rich aa09b1800d palm-client: tap and hold a channel on Home for Mute/Unmute, Channel Scope, Leave
RowList gets an optional hold callback: the pen still (3 px) on a row for half
a second unhighlights it, and lifting calls the callback (DMs fall back to a
tap). The channel actions take a slot, with the menu versions wrapping them.
2026-11-03 11:11:30 -05:00
rich be2d287ab2 palm-client: background check opens the channel and contact lists
Without them every channel lookup failed: the alert showed 'Channel N', channel
messages sounded as private and muted channels weren't skipped.
2026-11-03 10:55:55 -05:00
rich e3a3aa376e palm-client: new-message alert lists the count per conversation; icon from meshcore-visor-hair-1.png
Checks add the messages they pulled (outside muted channels) to a pending
table in unsaved prefs, with names looked up while they have globals; the
display launch lists up to five conversations and 'N more elsewhere'.
make_icon.sh takes a PNG and thresholds the 1-bit icons instead of dithering.
2026-11-03 10:48:53 -05:00
rich 33867c9ffe palm-client: menus split into Go / Channel / Options, per screen
Channel menu only on Home (Add) and in a channel conversation (Add, Leave,
Mute, Scope); DMs and the other screens get Go and Options. The Contacts
list now has the menu too.
2026-11-03 08:45:07 -05:00
rich 966b0bdc1b palm-client: app icon from meshcore-visor-hair.svg (tools/make_icon.sh); background check status on Preferences
The alarm now stays set while the app is open (checks skip) and is set as
soon as the interval changes; each check records what it got to, shown as
'Last 8:11 no radio, next 8:16'.
2026-11-03 08:37:52 -05:00
rich 531697479c palm-client: check for messages while closed (alarm every 5-60 min, Preferences > Check when closed)
The alarm launch sublaunches the app with globals to connect without the
channel/contact refresh, sync queued messages and play the sound; new
messages keep the alarm for display, which shows an alert with Open.
Untested on the device.
2026-11-03 07:23:16 -05:00
rich 6dd623f778 palm-client: glyphs for 12 common emoji, tap an emoji to see it enlarged 2026-11-02 13:07:01 -05:00
rich deec3112d4 palm-client: Map screen with an OSM basemap (tools/make_map.py) and positioned nodes 2026-11-02 12:33:52 -05:00
rich 7c4473bcb5 palm-client: flood scopes (list, radio default, per-channel scope, discover from neighbouring repeaters) 2026-11-02 11:17:44 -05:00
rich b57c51feb7 palm-client: mute channels and a larger text option (5x8 font) on a Preferences screen 2026-11-02 10:58:16 -05:00
rich beff26b28e palm-client: notification sounds per event kind, with a Sounds screen 2026-11-02 10:38:42 -05:00
rich ab583ff4dc palm-client: SB-LoRa transport (bus SPI, SC16IS740 driver, Slot link) with simulated-carrier tests 2026-11-02 10:03:51 -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 c713d8ba34 palm-client: modules into segment 2 with a build check; better Unicode display
Segment 1 was back at 27 KB. Settings, Contacts, Channel, Home, Node,
convos, messages, contacts, channels, rowlist and draw move to vmcode2:
segment 1 is now 10.3 KB, segment 2 23.4 KB. tools/sect2.py adds the
VM_SECT2 static declarations.

Checked in the compiled code, the rules in sections.h were too cautious:
literals in a vmcode2 function are emitted into vmcode2, a file's static
const data and calls to unannotated functions go through the __text__
base, and taking a vmcode2 function's address (event handlers, callbacks)
gives its real address. The real traps are shared extern const tables and
-fwritable-strings (PC-relative into .data). tools/check_sections.py runs
after every link and fails the build on any PC-relative reference from
vmcode2 to outside it; python3 added to the toolchain image for it.

Unicode: characters past Latin-1 all became '?', and Windows-1252 quotes
and dashes had no glyph in the small font. Now arrows, check marks, stars,
bullets and node-type marks map to the font's UI symbols, typographic
quotes and dashes to ASCII, any emoji to a new smiley glyph, and
variation selectors / zero-width joiners are dropped.
2026-11-01 17:29:20 -05:00
rich 8dd34839e0 palm-client: two-line compose field; redraw fully after the keyboard
The single-line compose field didn't scroll, so typing past its width was
blind; it's now a two-line multi-line field (Palm scrolls it to keep the
cursor visible; the transcript is 8 px shorter). Graffiti return still
sends: the form catches linefeed before the field.

Screens treated every frmUpdateEvent as new data and only redrew their own
content, so after the on-screen keyboard (frmRedrawUpdateCode) the field,
buttons and counter weren't redrawn. Conversation, Home, Contacts and Node
now redraw the form for frmRedrawUpdateCode.
2026-11-01 17:22:54 -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 6c7061f3f1 palm-client: real UTC timestamps (UTC offset setting) and UTF-8 names
Palm OS 3.5's clock is local time with no zone, and SessionNow used it as
UTC: outgoing messages carried times hours off, contact ages all read
'now', and clock sync set the radio (which only moves forward) to the
wrong time. SessionNow now applies a UTC offset kept as an app preference
(default from prefMinutesWestOfGMT, editable in Settings as hours, quarter
hours allowed); display converts back with SessionLocalPalm. Changing the
offset re-syncs the radio clock.

Contact, channel and node names are converted from UTF-8 when stored;
names with emoji showed missing-glyph boxes.
2026-11-01 15:41:57 -05:00
rich c04bebeb81 palm-client: MeshTerm-style screens: conversations, transcript, contacts, node
Home is now the conversation list (channels in slot order, then direct
conversations most recent first) with markers, unread badges, failed
marks, ages and previews; it connects on launch with the saved link.
The conversation screen shows day dividers, sender chips, time column,
wrapped text and SNR or delivery marks (pending, waiting for ack, acked,
failed), with a compose field, a UTF-8 byte counter, Send (or Graffiti
return), and tap-to-retry on failed messages. Contacts pins our node and
shows type marks, heard ages and routes; Message opens a DM. The old main
screen becomes Node with Advert and Done. One Options menu everywhere;
while connected the event loop polls every half second and posts a form
update when messages or contacts change.
2026-11-01 15:29:19 -05:00
rich 5249d7f5e6 palm-client: write the small font's NFNT directly (PilRC's was corrupt)
Font Preview showed garbled text: the bundled PilRC's FONT compiler writes
a broken NFNT header (first/last char words missing, later fields shifted,
height lost), reproduced with a two-glyph test font. gen_font.py now builds
the NFNT itself (header, glyph strip, location and offset/width tables),
decodes it back and checks every glyph, and PilRC includes it as a DATA
resource. Resources now rebuild when the font changes.
2026-11-01 15:15:46 -05:00
rich 1bae27fe9b palm-client: small 4x6 UI font and a Font Preview screen
tools/gen_font.py builds an NFNT (app font 0x80) from X.org's public-domain
misc-fixed 4x6 BDF plus hand-drawn MeshTerm-style symbols (star, node-type
marks, ack/fail/pending, lock) in 0x80-0x9F, reusing Windows-1252's slots for
ellipsis and angle quotes. It also writes glyphs.h and a width table for host
tests. src/ui/draw.c registers the font and adds section, chip, cut and
right-align helpers. Options > Font Preview draws sample screens so the font
can be judged on the Visor's LCD before the real screens use it.
2026-11-01 15:12:23 -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 8a118e4cac palm-client: USB link to the radio via the Visor's HsUd port and a Mac bridge
The Ports screen showed the Neo's Serial Manager drivers, including
'HsUd' (USB, the GENERIC port). The app gets a Serial/USB link switch
(USB default); Query radio retries since the bridge needs a moment to
attach, and SrmSendWait is gone (it can block over USB with no host).
tools/visor_bridge.py (stdlib + libusb via ctypes) finds the GENERIC
port from the Visor's connection info and forwards bytes to the radio's
serial port, logging each companion frame. Ports shows one line per
driver so all of them fit.
2026-11-01 11:32:22 -05:00
rich 259c666ad8 palm-client: Ports diagnostics screen; make editor for clangd
The Ports screen lists Serial Manager drivers (creator, feature flags,
max baud, description) to find which one reaches the USB cradle, as a
first step toward a USB bridge for testing before the boards arrive.
make editor copies the SDK headers out of the image and writes
compile_flags.txt so the editor stops flagging Palm OS types.
2026-11-01 11:24:36 -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