diff --git a/docs/GUIDELINES.md b/docs/GUIDELINES.md index 9e29fe1..6ffb3b1 100644 --- a/docs/GUIDELINES.md +++ b/docs/GUIDELINES.md @@ -17,4 +17,12 @@ type: guidelines ## 3. Design for a split screen - The screen may be shared with another app. Do not assume full width. -## 4. To be added +## 4. Bind to the Orin's network explicitly +- Android's default network is never the Orin link (it has no internet). Request + `TRANSPORT_ETHERNET` and bind to it; never rely on the default route. + +## 5. Keep the device awake while displaying +- A sleeping tablet is indistinguishable from a dead link. Hold the screen on + while the app is the display, and treat every reconnect as routine, not an error. + +## 6. To be added diff --git a/docs/impl/plans/INITIAL.md b/docs/impl/plans/INITIAL.md index 54e550d..9f08025 100644 --- a/docs/impl/plans/INITIAL.md +++ b/docs/impl/plans/INITIAL.md @@ -1,7 +1,7 @@ --- type: plan status: active -updated: 2026-09-04 +updated: 2026-10-09 --- # Initial plan @@ -19,9 +19,9 @@ needs no routing engine at all. Routing is the expensive last fraction. ## Open -- **Transport.** Over USB the tablet has an IP link via RNDIS, so it can reach the - broker directly. Whether it should, or should go through `svc-gw`, is decided in - that repo — see its initial plan. +- **Transport.** Whether the app reaches the broker directly or goes through + `svc-gw` is decided in that repo — see its initial plan. The physical link is + settled (below). - **CJK labels.** MapLibre cannot ship Japanese glyph sets as SDF ranges. Local font rendering must be configured, or labels will be slow or absent. - **Sunlight.** A typical tablet is unreadable through a windscreen in daylight. @@ -38,7 +38,29 @@ Two channels with different guarantees, not one socket: | On reconnect | expect current state immediately | resend anything pending | This client always initiates and owns reconnection — the Orin never dials out. -Assume the link drops constantly: cable knocked, screen off, WiFi lost. +Assume the link drops constantly: cable knocked, screen off, power changes. + +## The USB link, as measured (2026-10-09) + +Tested with the actual tablet (Redmi Pad SE 8.7 4G, Android 16) against the car +Orin. Details: [USB tablet link report](gitea:yukart/orin-nano-env-setup). + +- **Physical:** tablet USB-C → PD hub (charging from the car) → Orin's USB-C port. + The tablet is the USB host; the Orin is a USB network gadget. The tablet picks + **NCM** and gets `192.168.55.100`; the Orin is **`192.168.55.1`**. +- **Android won't route over it by default.** The link has no internet, so it never + becomes the default network while WiFi or cellular is up, and ordinary sockets go + elsewhere. Verified: the Orin was unreachable until WiFi and cellular were off. + The app must request the Ethernet network (`ConnectivityManager.requestNetwork` + with `TRANSPORT_ETHERNET`) and bind its sockets to it. +- **About 3 s blank per power change.** Cutting the hub's PD costs ~3.5 s (full + USB detach); restoring it ~2.2 s. Ignition and cranking produce these. +- **An asleep tablet is a dead link.** Off charger and idle, Android suspends about + a minute after screen-off and answers nothing, while the Orin still sees the USB + link up. The app keeps the device awake while it is the display (screen-on flag + in the full UI; the same for any overlay widget). +- Reconnect without user action, and expect the Orin to drop a silent client by + heartbeat (project-yukart decision 24). ## Session marking is worth building early