Skip to content

Commit b6694f8

Browse files
committed
merge: origin/dev into cloud/issues-047 — bring up to date for merge to dev
Resolved 2 conflicts: - developer.service.ts: kept debug log with hashedKey/apiKey fields - DisplayManager6.1.ts: kept 047's view-based dashboard bypass + dev's performance timing Also fixed: CloudflareStreamService stale config.quality reference (SRT refactor) Build verified: types, sdk, cloud all clean.
2 parents 5e34008 + 4bf563b commit b6694f8

File tree

4,533 files changed

+851298
-7038
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,533 files changed

+851298
-7038
lines changed

.github/workflows/china-deployment-dev.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: China Cloud Api Deployment (Dev)
33
on:
44
push:
55
branches:
6-
- "ya/clean-china-cicd"
6+
- "dev"
7+
- "ya/fix-china-cloud-acr"
78
paths:
89
- "cloud/**"
910
- ".github/workflows/china-deployment-dev.yml"
@@ -130,6 +131,8 @@ jobs:
130131
value: "cloud"
131132
- name: RESEND_API_KEY
132133
value: "${{ secrets.RESEND_API_KEY }}"
134+
- name: UDP_HOST
135+
value: "dev-udp-api.mentraglass.cn"
133136
EOL
134137
135138
# Create start.sh file
@@ -147,7 +150,7 @@ jobs:
147150
alibaba-access-key-secret: ${{ secrets.ALIBABA_ACCESS_KEY_SECRET }}
148151
deployment-region: "cn-shenzhen"
149152
app-name: "api"
150-
acr-instance-id: "cri-h675v46p9lj694l6"
153+
acr-instance-id: "cri-jqkk34lm32lg9ce7"
151154
acr-vpc-domain: "mentra-acr-cnsz-a-registry-vpc.cn-shenzhen.cr.aliyuncs.com"
152155
acr-public-domain: "mentra-acr-cnsz-a-registry.cn-shenzhen.cr.aliyuncs.com"
153156
docker-context: "./cloud"

.github/workflows/porter-debug.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
- cloud/issues-044
99
- new-context-soniox
1010
- cloud/044-ci-build-audit
11+
- hotfix/cloud-observability
12+
- hotfix/crash-diagnostics
13+
- cloud/062-mongodb-audit
14+
- hotfix/graceful-shutdown
15+
- hotfix/remove-forced-gc-add-livez
1116
paths:
1217
- "cloud/**"
1318
- ".github/workflows/porter-debug.yml"
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: 🚀 Deploy cloud-prod to US West only
2+
3+
on:
4+
workflow_dispatch: # Manual trigger only — no auto-deploy
5+
push:
6+
branches:
7+
- cloud/064-bstack-cli
8+
paths:
9+
- "cloud/**"
10+
- ".github/workflows/porter-us-west.yml"
11+
jobs:
12+
us-west:
13+
runs-on: blacksmith-4vcpu-ubuntu-2404
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set Git SHA tag
19+
id: vars
20+
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
21+
22+
- name: Setup Porter CLI
23+
uses: porter-dev/setup-porter@v0.1.0
24+
25+
- name: Deploy to us-west
26+
timeout-minutes: 30
27+
run: exec porter apply -f ./cloud/porter.yaml
28+
env:
29+
PORTER_APP_NAME: cloud-prod
30+
NODE_ENV: production
31+
PORTER_CLUSTER: "4965"
32+
PORTER_PROJECT: "15081"
33+
PORTER_HOST: https://dashboard.porter.run
34+
PORTER_PR_NUMBER: ${{ github.event.number }}
35+
PORTER_REPO_NAME: ${{ github.event.repository.name }}
36+
PORTER_TAG: ${{ steps.vars.outputs.sha_short }}
37+
PORTER_TOKEN: ${{ secrets.PORTER_APP_15081_4965 }}
38+
PORTER_DEPLOYMENT_TARGET_ID: 540690ee-b1d7-4a5e-80e9-683d11001c75

.gitignore

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
1+
# MCU Client exceptions - allow build directories for embedded projects
2+
!mcu_client/**/build/
3+
!mcu_client/**/include/
4+
!mcu_client/**/lib/
5+
!mcu_client/**/*.so
6+
!mcu_client/**/*.a
7+
!mcu_client/**/*.lib
8+
!mcu_client/**/*.o
9+
!mcu_client/**/*.obj
10+
11+
# ESP32 PlatformIO directories
12+
mcu_client/esp32_ble_simulator/.pio/
13+
mcu_client/**/esp32**/.pio/
14+
115
local/*
16+
imx681_mipi_raw/
17+
K900Server_mentra/
218
K900_server_sdk/*
319
AugmentOS-Cloud-Example-App/*
420
RtmpStreamExampleBasic/*
521
server/config.json
622
K900_server_sdk/*
723
K900_android_sdk/*
824
K900Server_open/*
25+
K900Server_mentra/*
926
k900_android_sdk/*
1027
K900ServerPlus/*
1128
K900_server/*
@@ -20,7 +37,9 @@ asg_client/app/libs/temp_check/*
2037
.vscode/
2138
.zed/
2239
node_modules/
23-
build/
40+
# React/Web build directories (not MCU builds)
41+
**/node_modules/**/build/
42+
web-build/
2443
.DS_Store
2544
*.tgz
2645
my-app*
@@ -95,15 +114,24 @@ aiohttp/_http_writer.html
95114
aiohttp/_websocket.c
96115
aiohttp/_websocket.html
97116
bin
98-
build
117+
# Python build directory (specific to Python projects)
118+
**/python/build
99119
coverage.xml
100120
develop-eggs
101121
dist
102122
docs/_build/
103123
eggs
104124
htmlcov
125+
<<<<<<< dev-nexfirmware-evt1
126+
# Python include/lib directories (not MCU includes)
127+
**/python/**/include/
128+
**/python/**/lib/
129+
**/venv/**/include/
130+
**/venv/**/lib/
131+
=======
105132
#include/
106133
.lib/
134+
>>>>>>> dev
107135
man/
108136
nosetests.xml
109137
parts
@@ -118,7 +146,9 @@ virtualenv.py
118146

119147
# Gradle files
120148
.gradle/
121-
build/
149+
# Android build directories (not MCU builds)
150+
**/android/**/build/
151+
**/app/build/
122152

123153
# Local configuration file (sdk path, etc)
124154
local.properties
@@ -160,13 +190,20 @@ __pycache__/
160190

161191
# Distribution / packaging
162192
.Python
163-
build/
193+
# Python build directories (not MCU builds)
194+
**/python/**/build/
164195
develop-eggs/
165196
dist/
166197
downloads/
167198
eggs/
168199
.eggs/
200+
<<<<<<< dev-nexfirmware-evt1
201+
# Python lib directories (specific to Python builds)
202+
**/python/**/lib/
203+
**/python/**/lib64/
204+
=======
169205
.lib/
206+
>>>>>>> dev
170207
lib64/
171208
parts/
172209
sdist/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "mcu_client/peripheral_uart_next/nrf5340"]
2+
path = mcu_client/peripheral_uart_next/nrf5340
3+
url = ./mcu_client/peripheral_uart_next/nrf5340

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Changelog
2+
3+
## [Unreleased]
4+
### Changed
5+
- Increased A6N projector container width to 470 pixels for live caption display.
6+
- Container border hidden, text center-aligned, and secondary font set to lv_font_montserrat_24 for A6N projector live caption container.
7+
- Simplified container initial text to show simple welcome message with device name when glasses are disconnected/unpaired.
8+
- Display now shows dynamic BLE device name with MAC address suffix (e.g., "Nex1-A1B2C3") instead of static name.
9+
- Changed device name format from "NexSim XXXXXX" to "Nex1-XXXXXX" for cleaner appearance.
10+
11+
### Fixed
12+
- A6N brightness control: Fixed BLE protobuf handler to use linear 0x00-0xFF register mapping instead of 0-9 levels, ensuring consistent brightness behavior between shell commands and mobile app.
13+
- Shell brightness command now accepts any value 0-100 with linear mapping instead of fixed levels (20,40,60,80,100).
14+
- Modular display configuration updates for improved UI consistency.
15+

COLE_LOG_AUDIT_TODO.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Action Required: Static Logging Audit & Migration
2+
3+
Hi Cole,
4+
5+
## 🚨 Critical Task: Audit and Convert All Static Logging (printk, BSP_LOG, etc.)
6+
7+
### Background
8+
We have implemented a modular Zephyr logging system, but **direct `printk()` and BSP_LOG calls** are still present in the codebase. These bypass all runtime log control (including `log halt` and `ping_disable`) and are the root cause of persistent UART flooding.
9+
10+
### What Needs To Be Done
11+
- **Search the entire codebase** for:
12+
- `printk()`
13+
- `BSP_LOGE`, `BSP_LOGW`, `BSP_LOGI`, `BSP_LOGD`, `BSP_LOGV`
14+
- Any other static/legacy logging (e.g., `printf`, `puts`, etc.)
15+
- **Convert all of these** to Zephyr LOG macros (`LOG_ERR`, `LOG_WRN`, `LOG_INF`, `LOG_DBG`) and ensure they are:
16+
- Registered with `LOG_MODULE_REGISTER`
17+
- Controlled by runtime log level and shell commands
18+
- (For ping/pong and similar modules) Also respect the `ping_logging_enabled` flag if appropriate
19+
- **Commit and push** your changes so the team can test and continue from a clean, fully controllable logging state.
20+
21+
### Why This Matters
22+
- Direct `printk()`/BSP_LOG calls **bypass all log control** and flood the UART, making debugging and shell usage impossible.
23+
- Zephyr LOG system allows full runtime control, filtering, and shell-based management.
24+
25+
### Example Fix
26+
**Before:**
27+
```c
28+
printk("[PING] Timeout - no pong response\n");
29+
```
30+
**After:**
31+
```c
32+
if (ping_logging_enabled) {
33+
LOG_WRN("[PING] Timeout - no pong response");
34+
}
35+
```
36+
37+
### Files/Areas to Prioritize
38+
- `src/protobuf_handler.c` (CRITICAL: many printk calls)
39+
- `src/main.c` (printk calls)
40+
- `src/mos_components/mos_lvgl_display/src/mos_lvgl_display.c` (BSP_LOG calls)
41+
- Any other file with static logging
42+
43+
---
44+
45+
## ✅ Next Steps
46+
1. **Audit and convert** all static logging to Zephyr LOG system
47+
2. **Test** that log control (log halt, log go, log level set, ping_disable, etc.) works as expected
48+
3. **Commit and push** your changes
49+
4. **Notify the team** so we can continue testing and development
50+
51+
Thanks!
52+
53+
---
54+
*Generated by GitHub Copilot on 2025-09-29*

asg_client/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,7 @@ This removes your custom build and restores the factory app.
6161
### Build Notes
6262

6363
Must use Java SDK 17. To set this, in Android Studio, go to Settings > Build, Execution, Deployment > Build Tools > Gradle, go to Gradle JDK and select version 17
64+
65+
### Documentation
66+
67+
See [docs/](docs/README.md) for architecture overview, command API reference, feature docs, and the full Mentra Live setup guide.

asg_client/app/build.gradle

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ android {
186186

187187
minSdk 28
188188
targetSdk 33
189-
versionCode 34
190-
versionName "34.0"
189+
versionCode 35
190+
versionName "35.0"
191191

192192
ndk {
193193
abiFilters "armeabi-v7a", "arm64-v8a"
@@ -310,6 +310,7 @@ dependencies {
310310
// StreamPackLite dependencies
311311
implementation project(':core')
312312
implementation project(':extension-rtmp')
313+
implementation project(':extension-srt')
313314

314315
// OkHttp for network requests
315316
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
@@ -323,6 +324,11 @@ dependencies {
323324
// Sentry SDK for error reporting
324325
implementation 'io.sentry:sentry-android:7.5.0'
325326

327+
// Google WebRTC for Android (WHIP streaming)
328+
// Community-maintained prebuilt of the official Google WebRTC codebase; uses org.webrtc package.
329+
// Pinned to M114 (2023) — compiled with Java 11, compatible with this project's Java 17 toolchain.
330+
implementation 'io.github.webrtc-sdk:android:114.5735.08.1'
331+
326332
// AndroidX Test dependencies
327333
androidTestImplementation 'androidx.test:core:1.5.0'
328334
androidTestImplementation 'androidx.test:runner:1.5.2'

asg_client/app/src/main/AndroidManifest.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,18 @@
137137
</intent-filter>
138138
</receiver>
139139

140+
<!-- Intent IPC receiver for third-party app commands -->
141+
<receiver
142+
android:name="com.mentra.asg_client.receiver.IntentCommandReceiver"
143+
android:enabled="true"
144+
android:exported="true">
145+
<intent-filter>
146+
<action android:name="com.mentra.asg_client.ACTION_SEND_COMMAND" />
147+
<action android:name="com.mentra.asg_client.ACTION_REGISTER_LISTENER" />
148+
<action android:name="com.mentra.asg_client.ACTION_UNREGISTER_LISTENER" />
149+
</intent-filter>
150+
</receiver>
151+
140152
<service
141153
android:name="com.mentra.asg_client.service.core.AsgClientService"
142154
android:enabled="true"
@@ -159,6 +171,18 @@
159171
android:exported="true"
160172
android:foregroundServiceType="camera|microphone" />
161173

174+
<service
175+
android:name="com.mentra.asg_client.io.streaming.services.SrtStreamingService"
176+
android:enabled="true"
177+
android:exported="true"
178+
android:foregroundServiceType="camera|microphone" />
179+
180+
<service
181+
android:name="com.mentra.asg_client.io.streaming.services.WhipStreamingService"
182+
android:enabled="true"
183+
android:exported="true"
184+
android:foregroundServiceType="camera|microphone" />
185+
162186
<service
163187
android:name="com.mentra.asg_client.io.ota.services.OtaService"
164188
android:enabled="true"

0 commit comments

Comments
 (0)