Skip to main content
The Glasses Never Touch the Network: Building for MemoMind From the Phone Out
memomindsmart-glasseswearableshomelabaudiotailscale

The Glasses Never Touch the Network: Building for MemoMind From the Phone Out

Build a MemoMind Web plugin that records, uploads and pages text onto the glasses, and skip the Opus, CSP, Origin and Studio traps that bit me first.

Sekou M. Doumbouya

Sekou M. Doumbouya

· 25 min read

Listen to this article

The views expressed here are my own and do not represent those of any current or former employer.

My first in-app test sent nothing to my server. Not a 403. Not a CORS error. The server log had no line for it at all, which is the least helpful answer a network can give you.

I bought MemoMind One glasses to build on them. They arrived on November 23, 2026, and over the next three days a handful of coding agent sessions and I built a dictation app and an agent app for them. Then I ran a retro across those sessions and turned what broke, and what took longest, into the gotchas below. This is the guide I wanted on day one.

How to Read the Source Tags

Every claim carries one of three tags. Docs means MemoMind’s Open Platform docs or toolkit source say so (read November 24; the headers call themselves a release-candidate ABI contract, so expect movement). Verified means I or one of my sessions saw it happen. Untested means it is open.

One fact frames everything. Installing on real glasses goes through a Developer Workspace gated by whitelist approval. I applied, and I am waiting, so everything below has run in the desktop Plugin Studio against my real, live server, not yet on the glasses. How I ended up on that waitlist is the subject of the companion post.

Before any code, one session condensed the public docs and the toolkit headers into a single skill file my agents load. Exact signatures copied from the headers are why my agents stopped guessing APIs. If you build with agents, do this first.

The Phone Owns the Network, the Glasses Own the Screen

MemoMind has two kinds of plugin, and they split the work along a hard line. [Docs]

A Web plugin is HTML and JavaScript running in a WebView inside the MemoMind phone App, packaged as a .mmpkg. It owns everything that touches the outside world: networking through plain fetch, audio capture, storage, files and location. It talks to the glasses through the App’s bridge.

A glasses plugin, called a GMP, is C written against gm_plugin.h and compiled for the glasses’ RISC-V firmware into a .gmp. It owns the immediate things: the display through LVGL or a framebuffer, the buttons, and the IMU. It has no network, no filesystem, no camera, no raw microphone and no persistent storage. Only one glasses plugin runs at a time.

You do not have to write any C to draw on the glasses. A built-in glasses plugin called GM Web Bridge, speaking protocol gm.scene version 1.0, lets a Web plugin put text and images on the display. Both of my apps are Web plugins paired with that bridge. Data runs from your HTTPS service, to the Web plugin over fetch, to the App, over Bluetooth, to the glasses.

A few numbers to design around, all [Docs]. The display is a 600 by 350 logical canvas in GRAY_4, which means 4 bits per pixel and 16 levels of green. Not grayscale: plan your contrast in green. It refreshes at 30 hertz. A plugin message payload tops out at 81,901 bytes, and the bridge’s default request timeout is 5 seconds.

Use the stack below to see what each column can and cannot do, and which link joins them.

Where each part runs

Every request leaves from the phone. The glasses only draw and listen to buttons.

Your server Anywhere the phone can reach over HTTPS
  • Speech to text and the LLM
  • Long-lived keys
  • Storage that lasts
Web plugin (.mmpkg) WebView inside the MemoMind phone App
  • fetch (needs the network permission and a CSP entry)
  • Mic capture as Opus
  • Small storage, files, location
Glasses plugin (GMP) or the Web Bridge RISC-V firmware on the glasses
  • 600 by 350 display, 16 levels of green
  • Buttons and the IMU
  • No network, no files, no raw mic access
Source: MemoMind Open Platform docs and toolkit, read Nov 2026, and my own builds in Plugin Studio.

This is not a glasses app. It’s a phone app with a very small, very green second screen. Design it that way and half the gotchas below stop being surprising.

Studio Is Where You Will Actually Live

Plugin Studio is the desktop simulator and LAN installer. [Docs] It ships for Windows and macOS only; the toolkit’s Linux folder for Studio was empty when I checked on November 26. Real-device install goes App, then Settings, then Memo Lab, then Developer Workspace, where you scan Studio’s QR code on the same Wi-Fi. That last step is the whitelisted one.

Until you are approved, Studio is your whole development environment. All of these are [Verified] on the Windows build, version 0.1.0.

  • The EXE is unsigned, so SmartScreen warns. It needs WebView2 and has to run from inside the full toolkit folder. Allow it through the firewall on Private networks only.
  • There is an Import workspace action but no import-package button. Studio finds plugins only under PhoneSDK/examples/<plugin> and does not follow folder junctions, so copy plugins in. After any change, click Refresh repository, then re-select the plugin.
  • Studio keeps the old build selected after a code change. My first “0.2.0” test actually ran 0.1.0. Check the version on screen before you trust a result.
  • Studio caches style.css across a refresh. JavaScript reloads fine. CSS needs a full Studio restart. (I spent longer than I would like to admit restyling a button that was already restyled.)
  • Studio’s phone frame blocks the clipboard and cannot pass query parameters, so my dev build picks its backend by hostname. The frame is also invisible to computer use, so my agents took screenshots through Win32 PrintWindow instead.
  • Studio packages plain HTML plugins itself. You need build.py only for framework projects. My hand-packed .mmpkg was about 24 kilobytes across 5 files.

Read index.js, Not Just index.d.ts

The TypeScript definitions will mislead an agent. [Docs] index.d.ts has real types only for files, plugin messaging, audio and location. gm.runtime, gm.storage, gm.display and gm.device are typed as Record<string, function>. Parameter names live only in index.js, and there are no return types anywhere. getCapabilities() returns Promise<unknown>. An agent that reads only the .d.ts will invent parameters with total confidence.

Some things are declared but not wired. [Docs] The network and audio.playback permissions exist in the permission list, but no SDK method uses them: networking is plain fetch, and playback is plain HTML audio. The custom audio capture profile has no real profile behind it. Three error codes appear in the .d.ts but are missing from the runtime ERROR_CODES.

The manifest is strict. [Docs] It wants schemaVersion 2, permissionPolicyVersion 1 and bridgeVersion “2.0”. Permissions are objects, not strings, and you get at most 10 of them. A scope is allowed only on device.events and device.messaging and rejected everywhere else, so you cannot scope network to a domain in the manifest. That job belongs to the Content Security Policy.

A Web plugin manifest with display, buttons, audio capture and network (condensed; see the toolkit examples for every field):

{
  "schemaVersion": 2,
  "permissionPolicyVersion": 1,
  "bridgeVersion": "2.0",
  "id": "com.example.memo",
  "name": "Memo",
  "version": "0.1.0",
  "entry": "index.html",
  "permissions": [
    { "name": "display", "required": true },
    { "name": "device.events", "required": true, "scope": { "types": ["button"] } },
    { "name": "audio.capture", "required": true, "reason": "Push-to-talk dictation" },
    { "name": "network", "required": true }
  ],
  "deviceRequirements": {
    "protocols": [{ "id": "gm.scene", "minVersion": "1.0" }]
  }
}

One more surprise. [Docs] There is no “quit plugin” call. The documented way out is gm.display.closePage(), and createPage() brings the page back.

The Microphone Speaks Opus and Nothing Else

This is the gotcha that reshaped my design. [Docs] gm.audio.openCapture() streams Opus only: 16 kilohertz, mono, 20 millisecond frames. Each chunk carries data, the Opus packets concatenated, and frameLengths, the bytes in each frame, plus a sequence number, a discontinuity flag and a dropped-frame count. There is no PCM option. Only one capture can run at a time. The simpler openRecording() is capped at 15 seconds or 64 kibibytes.

My voice service wanted something else entirely. [Verified] Its realtime endpoint expected PCM16 at 16 kilohertz, base64-encoded inside JSON text frames, 640 bytes per 20 millisecond frame, and it rejected binary frames. It also took its token only as an Authorization: Bearer header, and a browser WebSocket cannot set headers. My router’s one-shot speech-to-text endpoint accepted WAV, PCM16 or WebM Opus. Raw Opus frames fit none of them.

Toggle the view below between what my voice service wanted and what actually shipped.

The microphone speaks Opus. My voice service wanted PCM16.

Switch between the path I designed first and the one that runs today.

  1. Glasses micOpus, 16 kHz mono, 20 ms frames
  2. Wrap in the pluginopusRecordingToOgg turns frames into an Ogg blob
  3. One multipart uploadfetch over HTTPS, after you stop talking
  4. ffmpeg on the serverOgg to 16 kHz WAV through a pipe
  5. Speech to text, then rewrite110 second segments, then the LLM
Source: MemoMind Web SDK (openCapture and opusRecordingToOgg) and my build sessions, Nov 2026. The shipped path is verified in Plugin Studio, not yet on the glasses.

What shipped is boring on purpose. [Verified] The plugin collects the frames and wraps them with the SDK’s own opusRecordingToOgg(). That function wraps; it does not decode. Then it uploads the Ogg file as multipart form data. Condensed, with illustrative names:

// condensed: one push-to-talk turn
import { createGMPlugin, opusRecordingToOgg } from './vendor/gm-plugin-web-sdk.esm.js';

const gm = createGMPlugin();
await gm.ready();

const chunks = [];
const frameLengths = [];
const capture = await gm.audio.openCapture({ profile: 'interactive' });
const reader = capture.stream.getReader();
const pump = (async () => {
  for (;;) {
    const { value, done } = await reader.read();
    if (done) break;
    chunks.push(value.data);                 // concatenated Opus packets
    frameLengths.push(...value.frameLengths); // bytes per 20 ms frame
  }
})();

// ...on the stop press:
await capture.stop();
await pump;
const data = concatBytes(chunks);             // join the Uint8Arrays
const ogg = opusRecordingToOgg({ data, frameLengths }); // returns an Ogg Blob; wraps, does not decode

const form = new FormData();
form.append('audio', ogg, 'memo.ogg'); // Blob: a filename is fine
form.append('profile', 'email');       // string: NO third argument, it throws
const res = await fetch('https://your-backend.example/memo', { method: 'POST', body: form });
if (!res.ok) keepForRetry(data, frameLengths); // never drop the audio on a failed upload

[Verified] Note those last lines. FormData.append(name, string, filename) throws. Pass a filename only when the value is a Blob. It is a plain web bug, and it still cost me a test cycle inside a WebView, where errors are harder to see.

On the server, ffmpeg decodes Ogg Opus to WAV with libopus. Lock the input format and the protocol so ffmpeg never auto-probes untrusted bytes:

ffmpeg -hide_banner -f ogg -protocol_whitelist pipe -c:a libopus -i pipe:0 \
  -ac 1 -ar 16000 -c:a pcm_s16le -f wav pipe:1

From there the server splits the WAV into 110 second segments, posts each segment to the router’s transcription endpoint, runs an LLM rewrite, and optionally speaks the result back with text-to-speech.

[Verified] I dropped the realtime WebSocket path and went turn-based: push to talk, record, upload, transcribe, rewrite. For live captions, every 2 seconds the plugin posts the last 1,500 frames, about 30 seconds of audio, to a preview endpoint. Elegant, no. But it works in Studio today, and it does not depend on WebSocket support in the App’s WebView, which is undocumented.

Two failure cases deserve a test of their own. [Verified] A silent room uploads a small file and comes back as a 422 “no speech recognized”, so the HUD needs a friendly card for it. And an adversarial review found that a stream error mid-recording threw the audio away, and so did a failed upload. Keep the frames until the server says 200.

Keeping Opus on the wire pays off. As a general rule of thumb, not a MemoMind measurement, Opus uplink runs about 16 to 24 kilobits per second, against 256 for raw PCM16. Decode on the server.

Two Gates Stand Between fetch and Your Server

Two things must both be true before a request leaves the phone. [Docs] The manifest must declare the network permission, or the call fails as UNDECLARED. And index.html must carry a Content Security Policy whose connect-src names your exact origin. The toolkit’s weather example ships a strict CSP meta tag pinned to its one API. Yours looks like this:

<meta http-equiv="Content-Security-Policy"
      content="default-src 'self'; connect-src https://your-backend.example">

Back to that opening silence. [Verified] My first in-app test sent nothing. The likely causes are a missing permission or CSP entry, or the App’s WebView not routing through the iOS VPN. Resolving it needs the Developer Workspace. [Docs] Whether WebSocket works, what Origin the WebView sends, and whether the phone’s VPN carries plugin traffic are all undocumented.

[Verified] iPhone Safari over Tailscale reached a Tailscale Serve HTTPS endpoint on my home box, the Tailscale-User-Login identity header came through, and a top-level page load sent no Origin. Studio serves plugins from a plain HTTP loopback origin, which my server allowlists. The iOS WebView’s Origin is still uncaptured. [Untested]

The Origin and CORS trap has two halves. [Verified] First, my voice proxy’s Origin allowlist is empty by default. A request carrying a non-listed Origin got a 403, while a request with no Origin passed. So a relay in front of it would have to strip the browser’s Origin before forwarding, one more reason I went around the realtime path. Second, a test echo server I used sent no CORS headers on purpose, so the page reported a CORS error even when the request had landed. The browser said failure. The server log said success. When those two disagree, believe the server log.

The Tailscale lessons, all [Verified]:

  • Use Serve, which stays inside your tailnet. Never Funnel, which publishes to the internet.
  • Serve adds identity headers only for untagged, user-owned devices, so my ACL used host aliases instead of tags. Once path handlers existed, writing Serve config needed root.
  • Never run tailscale serve reset on a box with other routes. Add and remove one port at a time.
  • tcpdump on the tailscale interface can miss Serve traffic. tailscale debug capture sees it.
  • The Serve certificate’s name is published in public certificate-transparency logs. Your hostname is not a secret, so do not build security on it being one.

[Verified] My router has no WebSocket upgrade by design and answered the realtime path with a 404, another reason to call speech-to-text directly.

[Verified] For the agent app, cards reach the glasses because the plugin polls my server. With the app in the background, iOS stops that polling, so my server queues the last 50 cards in memory until the plugin wakes.

[Docs] MemoMind’s terms say no long-lived keys go in plugin JavaScript. My plugin carries no token at all: the server adds upstream auth, and Tailscale identity is the gate. Store review uploads your plugin source, so a hard-coded private backend host in the code and CSP has to be templated out before any public submission.

Seven Lines, Forty-Six Characters

The display looks roomy at 600 by 350 until you put sentences on it.

[Verified] The glasses font has no ”●” glyph, so my recording indicator became “REC ·”. Before paging, I budgeted 220 characters per card, then 280. My first version showed the end of a long result, so the HUD opened mid-sentence. The fix: show the opening of finished text, and the newest words of live text.

[Verified] The final pagination is 7 lines of 46 characters per page, with a footer like “2/3 · press next”. Type something into the pager below and watch it split.

Seven lines, forty-six characters

Type or paste text. It wraps and pages the way the shipped HUD does.

 
Source: my shipped plugin's paging rule (7 lines of 46 characters, an "n/N · press next" footer), verified in Plugin Studio, Nov 2026. The sample text is made up, and the last-page footer here is illustrative. Real glasses render a proportional green font; this monospace box only shows the line budget.

Buttons arrive as single, double and long presses, three gestures per state, so the map matters. [Verified] With a result showing: press for the next page, double for back, hold to close. When ready: press to record, double for the latest result. While recording: press to stop, double to cancel, and hold does nothing, so a long press can never throw a recording away.

[Verified] A press while the mic was still opening could leave a second capture running with the mic on. On a face-worn device, that is the worst bug to ship. The fix is a “starting” state that ignores presses until the capture is open.

[Docs] Per MemoMind’s terms, the mic runs only when the wearer triggers it, so any agent action that needs the mic needs a wearer press. iOS suspends plugins on screen lock: the App keeps an active recording alive, but ordinary pages suspend.

Two plain web bugs bit me here too. [Verified] Author CSS display:grid overrode the hidden attribute, so hidden elements never hid. One global line fixes it:

[hidden] { display: none !important; }

And stale ASK events reappeared after they had settled, until I expired them in a finally block.

The Server You Will Need Is Most of the App

Each app is a thin plugin in front of a real service. Anvil Scribe is record-first dictation inside my model router, with rewrite profiles from email to meeting minutes; its voice tier is a small Qwen3-4B model on an always-on Mac. Anvil Agent exposes one MCP tool, memomind_glasses, so an agent can put text on the glasses, or ask the wearer a question and block until they answer. In Studio, Hermes asked me a question that way and waited 23 seconds for my answer. (Hermes kept using its old curl skill until a second version of its skill told it, explicitly, to use the MCP tool. Agents, like new hires, reach for the tool they learned first.)

The server side is public in anvil-serving. Agents wrote most of the code; I reviewed with Greptile and adversarial subagent reviews after my Codex review allowance ran out. The retro is clear that the sharpest lessons came from this layer, not from the glasses.

Multipart parsing was the big one. [Verified] My first regex guard tried to predict what Python’s email.parser would build, and review bypassed it with decoy boundary parameters, RFC 2231 boundary*= syntax, nested parts and bare carriage returns. 150 thousand nested parts took about 26 seconds to parse, and a uuencode transfer encoding turned a 4 mebibyte upload into 94 megabytes. The fix was a flat parser: boundary taken from email.parser itself, at most 17 delimiters, a 70 character boundary per RFC 2046, header blocks capped at 8 kibibytes, and only 7bit, 8bit or binary transfer encodings. The worst case afterward was 0.09 seconds and 3.3 mebibytes. The line from that session I keep: “a guard that predicts what email.parser will build always lags it.” Constrain the input until there is nothing left to predict.

[Verified] The audio service carries hard limits: an 8 mebibyte upload cap, a 900 second maximum recording, at most 2 concurrent transcriptions and 4 buffered uploads, and a 503 returned before the body is read once those are full.

[Verified] A test fake hid a real bug, and code review caught it, not the tests. The Pi bridge accepts only tail=50, and my code sent tail=4. The fake accepted anything, so the tests passed. A fake that does not enforce the real server’s rules only proves your code agrees with itself.

[Verified] The 4B rewrite model invented [Your Name] placeholders and double sign-offs in emails. Prohibitions did not help: “never invent names” still produced “Best, Team”. An example greeting made it worse, because the model copied it. What worked was an explicit layout template (subject, greeting, body, “Best,” and nothing after), 3 of 3 times in my launch check at 0.5 to 0.7 seconds. On a 4B model, give it a layout, not a list of don’ts.

[Docs] MemoMind’s terms bar using glasses audio and transcripts to train or evaluate AI models, so my memo store carries an evaluation-excluded marker that my corpus tooling refuses. The directory is mode 0700, the files 0600.

[Verified] Measured through Studio against my live server, with synthesized test speech unless noted. None of it was recorded from glasses, and the demo scenes in my screenshots were staged. Upload plus transcription took 0.34 seconds, later 0.47. An email rewrite took half a second to a full second. On launch morning, a synthesized spoken turn through the live edge returned in 1.16 seconds. My real voice, a 26.9 kilobyte clip, came back in 1.0 second, but that was on the earlier relay. The last full test run passed 1,209 tests.

The Gotchas at a Glance

GotchaWhat happenedWorkaroundSource
Mic is Opus onlyCapture is 16 kHz mono Opus; my service wanted PCM16Wrap with opusRecordingToOgg(), decode with ffmpegDocs
Half-typed SDKFour namespaces typed as Record<string, function>Read index.jsDocs
Two gates for fetchNo network permission fails as UNDECLAREDDeclare it, and name the origin in connect-srcDocs
Empty Origin allowlistA non-listed Origin got 403, no Origin passedAllowlist Studio’s origin; strip the browser Origin at any relayVerified
CORS error on successEcho server sent no CORS headers; the request still landedRead the server log, not the pageVerified
Studio CSS cachestyle.css survives Refresh repositoryRestart StudioVerified
Studio stale buildA code change kept the old build selectedCheck the version on screenVerified
Bearer-only WebSocketA browser WebSocket cannot send the headerUpload turns over fetch insteadVerified
Studio plugin discoveryFinds plugins only under PhoneSDK/examples, ignores junctionsCopy plugins in, refresh, re-selectVerified
FormData filenameA filename on a string value throwsPass a filename only for BlobsVerified
hidden ignoreddisplay:grid beat the attribute[hidden]{display:none !important}Verified
Missing glyphNo ”●” in the glasses fontUse “REC ·“Verified
Double captureA press during mic open started a second captureA “starting” state that ignores pressesVerified
Serve resetReset touches every Serve route on the boxAdd and remove one port at a timeVerified
WebView over VPNFirst in-app test reached nothingConfirm on a device once approvedUntested

What Doesn’t Work Yet

None of this has run on real glasses. Here is exactly what is open.

A real recording from the glasses mic, through the phone. Every audio number here came from Studio.

Whether the App’s WebView routes over the iOS Tailscale VPN. This is the biggest unknown, because my whole network posture rests on it. My server lives on the tailnet, behind Serve, with Tailscale identity as the gate. If plugin traffic does not ride the VPN, my opening silence becomes the permanent answer.

The iOS WebView’s Origin header. Even if traffic arrives, my proxy’s allowlist decides whether it passes. I know what Safari and Studio send. I do not know what the App sends, and an unlisted Origin earns a 403.

WebSocket inside the WebView. I designed around it rather than bet on it.

Behavior on real hardware after a hold and closePage(). The button map is verified in Studio. Whether a real close behaves the same is not.

The Pi backend end to end. It is built, not configured.

OpenClaw Config in Memo Lab. It is an App setting that sends push-to-talk to your own gateway, and it might be a path that needs no plugin at all. Untested.

Tag Every Claim With How You Know It

On a young platform, the docs are a draft and the simulator is a guess. The most useful thing I own is the line between what I read and what I saw, so I keep it in code comments, test fakes and posts like this one. The first line I expect to move is the biggest unknown above: whether the App’s WebView rides the phone’s VPN at all.

0 claps

Enjoyed this? Tap to applaud, hold to really applaud.

Share this post
LinkedInXHacker NewsBluesky

Co-authored with AI, based on the author's working sessions, dictations, and notes.