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.
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.
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'.
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.
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).
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.
visormesh.def adds vmcode3 and sections.h VM_SECT3, ahead of new screens
(segment 2 is at 27 KB). check_sections.py checks every extra section, and
now maps COFF symbols' (sec N) to section names: before, it only resolved
section symbols such as .text, not named ones. sect2.py takes --sect3.
Evidence, workaround and suggested fix for each: pilot-link's macOS USB
open race and dead debug logging, PilRC's corrupt NFNT header, the
prc-tools multi-section traps, MeshCore's radio params not retuning until
reboot, the clock persisting through contact lastmods, and stale bytes in
unused GET_CHANNEL replies. Nothing has been filed yet.
Line breaks: TxtWrap only broke at spaces and the width, so a \n in a
message was drawn as a character and the text ran on. It now ends the line
at \n, \r or \r\n (host-tested), and the Home preview shows breaks as
spaces.
Alerts: a new DM, or a channel message containing @[our name], plays the
system 'confirmation' sound (it follows the Visor's sound settings), unless
that conversation is on screen. Plain channel traffic stays quiet.
Opening a conversation with unread messages draws a '-- new --' divider
before the first of them and scrolls to it instead of to the end.
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.
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.
make install hung for minutes when Docker Desktop's amd64 emulation stopped
starting containers, although the .prc was already built. Without a local
toolchain, build/visormesh.prc now depends on the sources, resources and
.def, so an up-to-date install goes straight to pilot-xfer.
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.
The serial/USB link doesn't survive sleep, and the session kept thinking it
was connected. Ticks stop during sleep while the clock runs on, so a clock
jump past the ticks means we slept: drop the session, reconnect quietly
(the radio queued what arrived; connect syncs it) and refresh the screen.
If the reconnect fails it's retried on the next wake.
A slip in the Visor's date picker (Oct 1 2027 instead of Nov 1 2026) went
straight into the radio, whose clock only moves forward, so it can't be
undone without a radio reboot. When the radio's clock looks set (after
2025-01-01), SessionSyncClock now only corrects drift under 7 days and
otherwise flags a mismatch, shown on the Node clock line.
The Neo's prefMinutesWestOfGMT was 1140 (19 h), so the default UTC offset
was -19 h, which explains the radio clock being set to the wrong day. A
system value past +-14 h is now ignored (offset 0 until set in Settings).
The Node clock line shows dates too: the remaining problem looks like the
Visor's date, which the times alone couldn't show.
The radio clock stays ~9 h behind although Settings shows UTC -5: at
connect it was set to Visor time minus 5 h, i.e. an offset of +5 was in
effect, and later saves read the radio clock without setting it. Rather
than guess, Node now shows the Visor's clock, the computed UTC and the
offset in effect, the radio's clock as last read, and Palm OS's
prefMinutesWestOfGMT (the offset's default).
Answers the companion protocol per MyMesh.cpp: device/self info, clock
(forward-only like the firmware), channels with stale bytes in unused
slots, one contact of each type plus a UTF-8 name, queued messages behind
PUSH_MSG_WAITING, and DM sends with SENT, a confirmation ~2 s later (none
for 'noack') and an echo reply. Verified with companion_query.py.
Complete @[Name] tokens on a transcript line draw as MeshTerm's mention
chip (@ dropped); a chip is never wider than the raw token, so wrapped
lines still fit. Tapping someone's channel message inserts @[Name] at the
cursor; tapping a failed message of ours still offers Retry.
Code was 28.8 KB of the ~32 KB a single 68k code resource can reach.
visormesh.def declares section vmcode2; multigen generates the stub and
linker script; build-prc takes the name, creator and backup bit from the
.def. protocol.c and ui/text.c move there (segment 1 now 24.3 KB, segment
2 4.9 KB). Every function in them, static ones too, is declared VM_SECT2
so calls from segment 1 go through the __text__vmcode2 jump base, and
their two static const tables became plain data, since const data stays in
segment 1 where PC-relative code in segment 2 can't reach it. The rules
are in src/sections.h. Checked in the objects: no .text left in the moved
files, cross-segment calls go through the section bases.
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.
The bridge log showed GET_CHANNEL replies for unused slots with an empty
name but non-zero bytes after it: the firmware builds them in a reused
buffer, so they carry the previous reply's leftovers. Treating a non-zero
secret as in use listed all 40 slots as channels.
The transcript wrapped after a few characters on the Visor: gSmallFontWidths
was const, so prc-tools placed it in .text, but text.c reached it through an
extern declaration A5-relative (lea %a5@(0)) as if it were data, and read
garbage widths. The same applied to gPresets. Both generators now emit
non-const tables, with a note why. Host tests can't see this.
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.
messages.c keeps one record per message (conversation, times, direction,
status pending/sent/acked/failed, unread, SNR, path, sender, text in the
Visor's charset), newest 500, backed up. channels.c caches the radio's
channel slots so the conversation list works offline.
session.c now acts on pushes wherever frames are read, so an ack that
arrives during another request isn't lost: MSG_WAITING triggers a sync,
SEND_CONFIRMED marks the DM acked, adverts mark contacts changed.
SessionPoll drains input, syncs and expires overdue acks; SessionSend/
SessionRetry send with a single try (a repeated send would go out twice)
and track the ack deadline from the radio's estimate. Connect also sets the
radio clock forward from the Visor's, refreshes channels and contacts, and
pulls waiting messages. ContactsRefresh accepts a NULL count.
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.
Fixed-height rows drawn by a callback in a gadget area with a scroll bar;
section rows can be marked unselectable. Taps highlight like a Palm list
and report the row; the hard up/down buttons and the scroll bar page it.
Events are forwarded by the form rather than FrmSetGadgetHandler, so it
doesn't depend on Palm OS 3.5's gadget extensions.