@mentra/bluetooth-sdk 3.2.0-dev.200 → 3.2.0-dev.203
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -45
- package/android/src/main/java/com/mentra/bluetoothsdk/BluetoothSdkModule.kt +5 -1
- package/android/src/main/java/com/mentra/bluetoothsdk/Bridge.kt +63 -0
- package/android/src/main/java/com/mentra/bluetoothsdk/DeviceManager.kt +5 -4
- package/android/src/main/java/com/mentra/bluetoothsdk/GeneratedChangelogCatalog.kt +1 -1
- package/android/src/main/java/com/mentra/bluetoothsdk/GeneratedReleaseMetadata.kt +5 -5
- package/android/src/main/java/com/mentra/bluetoothsdk/MentraBluetoothSdk.kt +285 -29
- package/android/src/main/java/com/mentra/bluetoothsdk/MessageAckPolicy.kt +4 -0
- package/android/src/main/java/com/mentra/bluetoothsdk/WifiRequestResolution.kt +246 -0
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/ClassicAudioConnectionTracker.kt +104 -0
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/MentraLive.kt +312 -45
- package/android/src/main/java/com/mentra/bluetoothsdk/sgcs/SGCManager.kt +2 -0
- package/android/src/main/java/com/mentra/bluetoothsdk/status/DeviceStatus.kt +14 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/GlassesStatusClassicAudioTest.kt +14 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/MessageAckPolicyTest.kt +16 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/WifiRequestResolutionTest.kt +271 -0
- package/android/src/test/java/com/mentra/bluetoothsdk/sgcs/ClassicAudioConnectionTrackerTest.kt +131 -0
- package/build/BluetoothSdk.types.d.ts +62 -1
- package/build/BluetoothSdk.types.d.ts.map +1 -1
- package/build/BluetoothSdk.types.js.map +1 -1
- package/build/_private/BluetoothSdkModule.d.ts +3 -2
- package/build/_private/BluetoothSdkModule.d.ts.map +1 -1
- package/build/_private/BluetoothSdkModule.js.map +1 -1
- package/build/generated/changelogCatalog.d.ts +1 -1
- package/build/generated/changelogCatalog.js +1 -1
- package/build/generated/changelogCatalog.js.map +1 -1
- package/build/generated/releaseMetadata.js +5 -5
- package/build/generated/releaseMetadata.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -0
- package/build/index.js.map +1 -1
- package/ios/BluetoothSdkModule.swift +8 -2
- package/ios/Source/BluetoothSdkDefaults.swift +1 -1
- package/ios/Source/Bridge.swift +63 -0
- package/ios/Source/DeviceManager.swift +6 -3
- package/ios/Source/GeneratedChangelogCatalog.swift +1 -1
- package/ios/Source/GeneratedReleaseMetadata.swift +5 -5
- package/ios/Source/MentraBluetoothSDK.swift +365 -93
- package/ios/Source/WifiRequestResolution.swift +251 -0
- package/ios/Source/sgcs/MentraLive.swift +170 -35
- package/ios/Source/sgcs/SGCManager.swift +13 -1
- package/ios/Source/status/DeviceStatus.swift +28 -0
- package/ios/Tests/WifiRequestResolutionTests.swift +320 -0
- package/package.json +1 -1
- package/src/BluetoothSdk.types.ts +76 -1
- package/src/_private/BluetoothSdkModule.ts +4 -1
- package/src/generated/changelogCatalog.ts +1 -1
- package/src/generated/releaseMetadata.ts +5 -5
- package/src/index.ts +11 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BluetoothSdkModule.js","sourceRoot":"","sources":["../../src/_private/BluetoothSdkModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAe,mBAAmB,EAAC,MAAM,MAAM,CAAA;AACtD,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAA;AAErC,OAAO,EAAC,uBAAuB,EAAC,MAAM,oBAAoB,CAAA;AAE1D,OAAO,EAML,kBAAkB,EAClB,cAAc,EACd,cAAc,GA6Cf,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAC,2BAA2B,EAAC,MAAM,wBAAwB,C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AAC,YAAY,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA;AAC/F,wBAAwB,CAAC,YAAY,GAAG,UAAU,MAA0B;IAC1E,OAAO,kBAAkB,CAAC,2BAA2B,CAAC,MAAM,CAAkC,CAAC,CAAA;AACjG,CAAC,CAAA;AAED,eAAe,wBAAwB,CAAA;AACvC,MAAM,CAAC,MAAM,YAAY,GAAG,wBAAsD,CAAA","sourcesContent":["import {createScanSession} from \"./scanSession\"\nimport {NativeModule, requireNativeModule} from \"expo\"\nimport {Platform} from \"react-native\"\n\nimport {installNativeLogConsole} from \"./nativeLogConsole\"\n\nimport {\n BluetoothSettingsUpdate,\n BluetoothSdkModuleEvents,\n BluetoothStatus,\n PhotoCaptureDefaults,\n CalendarEvent,\n CAMERA_FOV_DEFAULT,\n CAMERA_FOV_MAX,\n CAMERA_FOV_MIN,\n CameraFovPreset,\n CameraFovRequest,\n CameraFovOverrideRequest,\n CameraFovResult,\n CameraFovSetting,\n CameraRoiPosition,\n CameraStatusEvent,\n ConnectOptions,\n DashboardMenuItem,\n Device,\n DeviceModel,\n GlassesMediaVolumeGetResult,\n GlassesMediaVolumeSetResult,\n GlassesStatus,\n GalleryStatusEvent,\n HotspotStatusChangeEvent,\n MicPreference,\n NativePhoneNotification,\n NativeNotificationConfig,\n NativeNotificationStatus,\n ObservableStoreCategory,\n OtaQueryResult,\n OtaStartAckEvent,\n PhotoRequestParams,\n PhotoSuccessResponseEvent,\n PublicBluetoothStatus,\n RgbLedAction,\n RgbLedColor,\n RgbLedControlSuccessResponseEvent,\n ScanDiagnostic,\n ScanModelOptions,\n ScanOptions,\n SettingsAckSuccessEvent,\n StreamKeepAliveRequest,\n StreamStartRequest,\n StreamStatusEvent,\n VideoRecordingStartedStatusEvent,\n VideoRecordingSettings,\n VideoRecordingStoppedStatusEvent,\n VideoRecordingStatusEvent,\n VersionInfoResult,\n WarmUpCameraParams,\n WifiSearchResult,\n WifiStatusChangeEvent,\n} from \"../BluetoothSdk.types\"\nimport {warmUpCameraParamsForNative} from \"./cameraRequestPayload\"\nimport {photoRequestParamsForNative} from \"./photoRequestPayload\"\n\n/**\n * Private React Native native-module facade.\n *\n * This file intentionally lives under `_private` so the package root can expose\n * a small SDK surface while MentraOS uses its monorepo-only internal alias\n * during migration. Raw status getters/listeners stay here so React hooks can\n * shape native store snapshots before app code sees them.\n */\n\ntype GlassesListener = (changed: Partial<GlassesStatus>) => void\ntype BluetoothStatusListener = (changed: Partial<PublicBluetoothStatus>) => void\ntype MaybePromise<T> = T | Promise<T>\n\ndeclare class BluetoothSdkNativeModule extends NativeModule<BluetoothSdkModuleEvents> {\n // Observable Store Functions (native)\n getGlassesStatus(): Promise<GlassesStatus>\n getBluetoothStatus(): Promise<PublicBluetoothStatus>\n getDefaultDevice(): Promise<Device | null>\n update(category: ObservableStoreCategory, values: object): Promise<void>\n\n // Display Commands\n displayEvent(params: Record<string, unknown>): Promise<void>\n displayText(text: string, x?: number, y?: number, size?: number): Promise<void>\n clearDisplay(): Promise<void>\n setDashboardContent(content: string): Promise<void>\n\n // Connection Commands\n requestStatus(): Promise<void>\n connectDefault(options?: ConnectOptions): Promise<void>\n connectDefaultWithOptions(options: Required<ConnectOptions>): Promise<void>\n setDefaultDevice(device: Device | null): Promise<void>\n clearDefaultDevice(): Promise<void>\n getScanDiagnostic?: (model: DeviceModel) => Promise<ScanDiagnostic | null>\n startScan(model: DeviceModel): Promise<void>\n stopScan(): Promise<void>\n scan(options: ScanOptions): Promise<Device[]>\n scan(model: DeviceModel, options?: ScanModelOptions): Promise<Device[]>\n connect(device: Device, options?: ConnectOptions): Promise<void>\n connectWithOptions(device: Device, options: Required<ConnectOptions>): Promise<void>\n cancelConnectionAttempt(): Promise<void>\n connectDefaultController(): Promise<void>\n disconnectController(): Promise<void>\n connectSimulated(): Promise<void>\n disconnect(): Promise<void>\n forget(): Promise<void>\n forgetController(): Promise<void>\n showDashboard(): Promise<void>\n setBrightness(level: number, autoMode?: boolean | null): Promise<void>\n setAutoBrightness(enabled: boolean): Promise<void>\n setDashboardPosition(height: number, depth: number): Promise<void>\n setDashboardMenu(items: DashboardMenuItem[]): Promise<void>\n setCalendarEvents(events: CalendarEvent[]): Promise<void>\n setHeadUpAngle(angleDegrees: number): Promise<void>\n setImuEnabled(enabled: boolean): Promise<void>\n setScreenDisabled(disabled: boolean): Promise<void>\n ping(): Promise<void>\n dbg1(): Promise<void>\n dbg2(): Promise<void>\n\n // Incident Reporting\n sendIncidentId(incidentId: string, apiBaseUrl?: string | null): Promise<void>\n\n // WiFi Commands\n requestWifiScan(): Promise<WifiSearchResult[]>\n sendWifiCredentials(ssid: string, password: string): Promise<WifiStatusChangeEvent>\n forgetWifiNetwork(ssid: string): Promise<WifiStatusChangeEvent>\n setHotspotState(enabled: boolean): Promise<HotspotStatusChangeEvent>\n /** Enable or disable Wi-Fi ADB on Mentra Live (no-op on other devices). */\n setWifiAdbState(enabled: boolean): Promise<void>\n /** Set the glasses system clock when phone detects clock skew (Mentra Live and G2). */\n setSystemTime(timestampMs: number): Promise<void>\n /** Logs current WiFi frequency (MHz) and 5 GHz band to Android logcat. */\n logCurrentWifiFrequency(): Promise<void>\n\n // Gallery Commands\n setGalleryModeEnabled(enabled: boolean): Promise<SettingsAckSuccessEvent>\n setVoiceActivityDetectionEnabled(enabled: boolean): Promise<void>\n /** Mentra Live center-mic loudness / Barrier gate (cs_swit type 10). */\n setLoudnessGateEnabled(enabled: boolean): Promise<void>\n /**\n * @deprecated Sticky action-button photo presets are deprecated. Prefer per-request\n * `requestPhoto(...)` options (e.g. `mode: \"text\"` for text sensor size/crop).\n */\n setPhotoCaptureDefaults(settings: PhotoCaptureDefaults): Promise<SettingsAckSuccessEvent>\n setVideoRecordingDefaults(width: number, height: number, fps: number): Promise<SettingsAckSuccessEvent>\n setMaxVideoRecordingDuration(minutes: number): Promise<SettingsAckSuccessEvent>\n setCameraFov(request: CameraFovRequest): Promise<CameraFovResult>\n setLegacyCameraFov(request: CameraFovRequest): Promise<CameraFovResult>\n restoreLegacyCameraFov(): Promise<void>\n setCameraFovOverride(request: CameraFovOverrideRequest): Promise<CameraFovResult>\n releaseCameraFovOverride(leaseId: string): Promise<SettingsAckSuccessEvent>\n /**\n * Configure camera HAL tuning (ANR / gain) on Mentra Live glasses.\n * Sends a {@code camera_tuning_config} BLE message; the ASG client relays it as a\n * {@code camconfig} broadcast so the HAL picks up new parameters without a reboot.\n *\n * Scan-mode convention: pass `{anr: false, gain: false}` when activating scan mode\n * (disables ANR and pixsmart gain) and `{anr: true, gain: true}` to restore defaults.\n */\n setCameraTuningConfig(anrOn: boolean, gainOn: boolean): Promise<SettingsAckSuccessEvent>\n queryGalleryStatus(): Promise<GalleryStatusEvent>\n requestPhoto(params: PhotoRequestParams): Promise<PhotoSuccessResponseEvent>\n warmUpCamera(params: WarmUpCameraParams): Promise<CameraStatusEvent>\n stopCameraWarmUp(requestId: string): Promise<void>\n\n // OTA Commands\n setOtaVersionUrl(otaVersionUrl: string): void\n getOtaVersionUrl(): string\n checkForOtaUpdate(): Promise<boolean>\n startOtaUpdate(otaVersionUrl?: string | null): Promise<OtaStartAckEvent>\n sendOtaQueryStatus(): Promise<OtaQueryResult>\n startAr99OtaFromFile(path: string): Promise<boolean>\n cancelAr99Ota(): Promise<void>\n sendAr99FactoryReset(): Promise<void>\n buildAr99OtaSignature(\n secret: string,\n appName: string,\n currentVersion: string,\n serialNumber: string,\n nonce: string,\n ): string\n\n // Version Info Commands\n requestVersionInfo(): Promise<VersionInfoResult>\n\n // Video Recording Commands\n startVideoRecording(\n requestId: string,\n save: boolean,\n sound: boolean,\n settings?: VideoRecordingSettings,\n ): Promise<VideoRecordingStartedStatusEvent>\n stopVideoRecording(\n requestId: string,\n webhookUrl?: string,\n authToken?: string,\n ): Promise<VideoRecordingStoppedStatusEvent>\n queryVideoRecordingStatus(requestId: string): Promise<VideoRecordingStatusEvent>\n\n // Stream Commands\n startStream(params: StreamStartRequest): Promise<StreamStatusEvent>\n startExternallyManagedStream(params: StreamStartRequest): Promise<StreamStatusEvent>\n stopStream(): Promise<StreamStatusEvent>\n sendExternallyManagedStreamKeepAlive(params: StreamKeepAliveRequest): Promise<void>\n\n // Microphone Commands\n setMicState(enabled: boolean, useGlassesMic?: boolean, sendTranscript?: boolean, sendLc3Data?: boolean): Promise<void>\n setPreferredMic(preferredMic: MicPreference): Promise<void>\n restartTranscriber(): Promise<void>\n\n // Audio Playback Monitoring\n // Notify native side when our app starts/stops playing audio\n // Used to suspend LC3 mic during audio playback to avoid MCU overload\n setOwnAppAudioPlaying(playing: boolean): Promise<void>\n\n // Live PCM output stream (miniapp speaker.createStream). MentraOS-internal\n // ? 16-bit LE PCM chunks into a streaming AudioTrack (USAGE_MEDIA, so it\n // follows the phone's media route, e.g. A2DP to glasses). Implemented with\n // AudioTrack on Android and AVAudioEngine on iOS.\n /** Open a PCM stream session. One AudioTrack per id; caller manages ids. */\n pcmStreamOpen(streamId: string, sampleRate: number, channels: number, volume: number): Promise<void>\n /**\n * Append base64 PCM. Resolves with the queued-but-unplayed backlog in ms;\n * blocks (on a background dispatcher) while the backlog is above the\n * backpressure ceiling, so awaited writes self-throttle to realtime.\n */\n pcmStreamWrite(streamId: string, base64: string): Promise<{bufferedMs: number}>\n /** Drain the backlog, then stop. Resolves with the total played duration. */\n pcmStreamClose(streamId: string): Promise<{durationMs: number}>\n /** Stop immediately, dropping any backlog. Idempotent. */\n pcmStreamAbort(streamId: string): Promise<void>\n\n /** Mentra Live only: K900 `cs_getvol` / `sr_getvol`. */\n getGlassesMediaVolume(): Promise<GlassesMediaVolumeGetResult>\n /** Mentra Live only: K900 `cs_vol` / `sr_vol`; level clamped 0??5 on native. */\n setGlassesMediaVolume(level: number): Promise<GlassesMediaVolumeSetResult>\n\n // RGB LED Control\n rgbLedControl(\n requestId: string,\n packageName: string | null,\n action: RgbLedAction,\n color: RgbLedColor | null,\n onDurationMs: number,\n offDurationMs: number,\n count: number,\n ): Promise<RgbLedControlSuccessResponseEvent>\n\n // STT Commands\n setSttModelDetails(path: string, languageCode: string): Promise<void>\n getSttModelPath(): Promise<string>\n checkSttModelAvailable(): Promise<boolean>\n validateSttModel(path: string): Promise<boolean>\n extractTarBz2(sourcePath: string, destinationPath: string): Promise<boolean>\n\n // TTS Commands\n setTtsModelDetails(path: string, languageCode: string): Promise<void>\n getTtsModelPath(): Promise<string>\n getTtsModelLanguage(): Promise<string>\n checkTtsModelAvailable(): Promise<boolean>\n validateTtsModel(path: string): Promise<boolean>\n generateTtsAudio(\n text: string,\n modelPath: string,\n outputPath: string,\n speakerId: number,\n speed: number,\n ): Promise<boolean>\n\n /** Android G2 content upload. iOS receives ANCS directly and rejects uploads. */\n sendPhoneNotification(notification: NativePhoneNotification): Promise<void>\n configureNativeNotifications(config: NativeNotificationConfig): Promise<void>\n getNativeNotificationStatus(): Promise<NativeNotificationStatus>\n\n // Helper methods for type-safe observable store access\n updateGlasses(values: Partial<GlassesStatus>): Promise<void>\n updateBluetoothSettings(values: BluetoothSettingsUpdate): Promise<void>\n onGlassesStatus(callback: GlassesListener): () => void\n onBluetoothStatus(callback: BluetoothStatusListener): () => void\n\n // Process resident-set-size in MB. iOS-only; Android stub returns 0.\n getMemoryMB(): number\n}\n\nexport type BluetoothSdkInternalModule = BluetoothSdkNativeModule\n\n// This call loads the native module object from the JSI.\n// NativeModule<BluetoothSdkModuleEvents> already extends EventEmitter<BluetoothSdkModuleEvents>\nconst NativeBluetoothSdkModule = requireNativeModule<BluetoothSdkNativeModule>(\"BluetoothSdk\")\ninstallNativeLogConsole(NativeBluetoothSdkModule, Platform.OS)\n\nconst DEFAULT_CONNECT_OPTIONS: Required<ConnectOptions> = {\n saveAsDefault: true,\n cancelExistingConnectionAttempt: true,\n requiresAncs: true,\n}\n\nconst DEFAULT_SCAN_TIMEOUT_MS = 15_000\n\nfunction bindNativeMethod<T extends (...args: never[]) => unknown>(module: Record<string, unknown>, name: string): T {\n const method = module[name]\n if (typeof method !== \"function\") {\n console.warn(`[BluetoothSdk] Native method \"${name}\" is unavailable ??rebuild the app (bun android / bun ios)`)\n return (async () => {\n throw new Error(`BluetoothSdk.${name} is not available in this native build. Rebuild the app.`)\n }) as T\n }\n return method.bind(module) as T\n}\n\nconst CAMERA_ROI_MIN = 0\nconst CAMERA_ROI_MAX = 2\nconst CAMERA_ROI_POSITION_VALUES: Record<CameraRoiPosition, CameraFovSetting[\"roiPosition\"]> = {\n center: 0,\n bottom: 1,\n top: 2,\n}\n\n// Named presets are a convenience layer over the numeric {fov, roiPosition} API.\n// The default is the full sensor; \"standard\" preserves the historical 102° crop.\nconst CAMERA_FOV_PRESETS: Record<CameraFovPreset, CameraFovSetting> = {\n narrow: {fov: 82, roiPosition: 0},\n standard: {fov: 102, roiPosition: 0},\n wide: {fov: CAMERA_FOV_MAX, roiPosition: 0},\n}\n\nfunction clampInteger(value: number, min: number, max: number): number {\n return Math.max(min, Math.min(max, Math.round(value)))\n}\n\nfunction normalizeCameraFov(request: CameraFovRequest): CameraFovSetting {\n if (\"preset\" in request) {\n return CAMERA_FOV_PRESETS[request.preset] ?? CAMERA_FOV_PRESETS.standard\n }\n\n const roiPosition = request.roiPosition ?? \"center\"\n\n return {\n fov: clampInteger(Number.isFinite(request.fov) ? request.fov : CAMERA_FOV_DEFAULT, CAMERA_FOV_MIN, CAMERA_FOV_MAX),\n roiPosition: clampInteger(CAMERA_ROI_POSITION_VALUES[roiPosition] ?? 0, CAMERA_ROI_MIN, CAMERA_ROI_MAX) as\n | 0\n | 1\n | 2,\n }\n}\n\nfunction searchResultsForModel(status: Partial<PublicBluetoothStatus>, model: DeviceModel): Device[] {\n return status.searchResults?.filter((device) => device.model === model) ?? []\n}\n\nfunction normalizeScanArgs(modelOrOptions: DeviceModel | ScanOptions, options?: ScanModelOptions): ScanOptions {\n if (typeof modelOrOptions === \"string\") {\n return {model: modelOrOptions, ...options}\n }\n return modelOrOptions\n}\n\nfunction normalizeTimeoutMs(timeoutMs: number | undefined, defaultTimeoutMs: number): number {\n return typeof timeoutMs === \"number\" && Number.isFinite(timeoutMs) && timeoutMs > 0 ? timeoutMs : defaultTimeoutMs\n}\n\nfunction dashboardMenuItemToNative(item: DashboardMenuItem): Record<string, unknown> {\n return {\n ...(item.values ?? {}),\n title: item.title,\n packageName: item.packageName,\n }\n}\n\nfunction adaptConnectionStatusToNative(connection: GlassesStatus[\"connection\"]): Record<string, unknown> {\n switch (connection.state) {\n case \"connected\":\n return {connectionState: \"CONNECTED\", connected: true, fullyBooted: connection.fullyBooted}\n case \"scanning\":\n return {connectionState: \"SCANNING\", connected: false, fullyBooted: false}\n case \"connecting\":\n return {connectionState: \"CONNECTING\", connected: false, fullyBooted: false}\n case \"bonding\":\n return {connectionState: \"BONDING\", connected: false, fullyBooted: false}\n case \"disconnected\":\n return {connectionState: \"DISCONNECTED\", connected: false, fullyBooted: false}\n }\n}\n\nfunction adaptGlassesUpdateToNative(values: Partial<GlassesStatus>): Record<string, unknown> {\n const {wifi, hotspot, connection, ...rest} = values\n let update: Record<string, unknown> = {...rest}\n if (connection) {\n update = {\n ...update,\n ...adaptConnectionStatusToNative(connection),\n }\n }\n if (wifi?.state === \"connected\") {\n update = {\n ...update,\n wifiConnected: true,\n wifiSsid: wifi.ssid,\n wifiLocalIp: wifi.localIp ?? \"\",\n }\n } else if (wifi?.state === \"disconnected\") {\n update = {\n ...update,\n wifiConnected: false,\n wifiSsid: \"\",\n wifiLocalIp: \"\",\n }\n }\n if (hotspot?.state === \"enabled\") {\n update = {\n ...update,\n hotspotEnabled: true,\n hotspotSsid: hotspot.ssid,\n hotspotPassword: hotspot.password,\n hotspotGatewayIp: hotspot.localIp,\n }\n } else if (hotspot?.state === \"disabled\") {\n update = {\n ...update,\n hotspotEnabled: false,\n hotspotSsid: \"\",\n hotspotPassword: \"\",\n hotspotGatewayIp: \"\",\n }\n }\n return update\n}\n\n// Add helper methods to the module\nconst nativeGetGlassesStatus = NativeBluetoothSdkModule.getGlassesStatus.bind(\n NativeBluetoothSdkModule,\n) as () => MaybePromise<GlassesStatus>\nNativeBluetoothSdkModule.getGlassesStatus = function () {\n return Promise.resolve(nativeGetGlassesStatus())\n}\n\nconst nativeGetBluetoothStatus = NativeBluetoothSdkModule.getBluetoothStatus.bind(\n NativeBluetoothSdkModule,\n) as () => MaybePromise<BluetoothStatus>\nNativeBluetoothSdkModule.getBluetoothStatus = function () {\n return Promise.resolve(nativeGetBluetoothStatus())\n}\n\nconst nativeGetDefaultDevice = NativeBluetoothSdkModule.getDefaultDevice.bind(\n NativeBluetoothSdkModule,\n) as () => MaybePromise<Device | null>\nNativeBluetoothSdkModule.getDefaultDevice = function () {\n return Promise.resolve(nativeGetDefaultDevice())\n}\n\nconst nativeSetMicState = NativeBluetoothSdkModule.setMicState.bind(NativeBluetoothSdkModule) as (\n enabled: boolean,\n useGlassesMic: boolean,\n sendTranscript: boolean,\n sendLc3Data: boolean,\n) => MaybePromise<void>\n\nconst nativeDisplayText = NativeBluetoothSdkModule.displayText.bind(NativeBluetoothSdkModule) as (\n text: string,\n x: number,\n y: number,\n size: number,\n) => MaybePromise<void>\n\nNativeBluetoothSdkModule.updateGlasses = function (values: Partial<GlassesStatus>) {\n return this.update(\"glasses\", adaptGlassesUpdateToNative(values))\n}\n\nNativeBluetoothSdkModule.updateBluetoothSettings = function (values: BluetoothSettingsUpdate) {\n return this.update(\"bluetooth\", values)\n}\n\nNativeBluetoothSdkModule.displayText = function (text: string, x?: number, y?: number, size?: number) {\n return Promise.resolve(nativeDisplayText(text, x ?? 0, y ?? 0, size ?? 24))\n}\n\nNativeBluetoothSdkModule.setBrightness = function (level: number, autoMode?: boolean | null) {\n return this.updateBluetoothSettings({\n ...(autoMode == null ? {} : {auto_brightness: autoMode}),\n brightness: level,\n })\n}\n\nNativeBluetoothSdkModule.setAutoBrightness = function (enabled: boolean) {\n return this.updateBluetoothSettings({auto_brightness: enabled})\n}\n\nNativeBluetoothSdkModule.setDashboardPosition = function (height: number, depth: number) {\n return this.updateBluetoothSettings({\n dashboard_height: height,\n dashboard_depth: depth,\n })\n}\n\nNativeBluetoothSdkModule.setDashboardMenu = function (items: DashboardMenuItem[]) {\n return this.updateBluetoothSettings({menu_apps: items.map(dashboardMenuItemToNative)})\n}\n\nNativeBluetoothSdkModule.setCalendarEvents = function (events: CalendarEvent[]) {\n return this.updateBluetoothSettings({calendar_events: events})\n}\n\nNativeBluetoothSdkModule.setHeadUpAngle = function (angleDegrees: number) {\n return this.updateBluetoothSettings({head_up_angle: angleDegrees})\n}\n\nNativeBluetoothSdkModule.setImuEnabled = function (enabled: boolean) {\n return this.updateBluetoothSettings({imu_enabled: enabled})\n}\n\nNativeBluetoothSdkModule.setScreenDisabled = function (disabled: boolean) {\n return this.updateBluetoothSettings({screen_disabled: disabled})\n}\n\nNativeBluetoothSdkModule.setVoiceActivityDetectionEnabled = function (enabled: boolean) {\n return this.updateBluetoothSettings({voice_activity_detection_enabled: enabled})\n}\n\nNativeBluetoothSdkModule.setLoudnessGateEnabled = function (enabled: boolean) {\n return this.updateBluetoothSettings({loudness_gate_enabled: enabled})\n}\n\nconst nativeSetCameraFov = bindNativeMethod<(fov: CameraFovSetting) => MaybePromise<CameraFovResult>>(\n NativeBluetoothSdkModule as unknown as Record<string, unknown>,\n \"setCameraFov\",\n)\nNativeBluetoothSdkModule.setCameraFov = function (request: CameraFovRequest) {\n const setting = normalizeCameraFov(request)\n return Promise.resolve(nativeSetCameraFov(setting))\n}\n\nconst nativeSetLegacyCameraFov = bindNativeMethod<(fov: CameraFovSetting) => MaybePromise<CameraFovResult>>(\n NativeBluetoothSdkModule as unknown as Record<string, unknown>,\n \"setLegacyCameraFov\",\n)\nNativeBluetoothSdkModule.setLegacyCameraFov = function (request: CameraFovRequest) {\n return Promise.resolve(nativeSetLegacyCameraFov(normalizeCameraFov(request)))\n}\n\nconst nativeRestoreLegacyCameraFov = bindNativeMethod<() => MaybePromise<void>>(\n NativeBluetoothSdkModule as unknown as Record<string, unknown>,\n \"restoreLegacyCameraFov\",\n)\nNativeBluetoothSdkModule.restoreLegacyCameraFov = function () {\n return Promise.resolve(nativeRestoreLegacyCameraFov())\n}\n\nconst nativeSetCameraFovOverride = bindNativeMethod<\n (request: CameraFovSetting & {leaseId: string; ttlMs: number}) => MaybePromise<CameraFovResult>\n>(NativeBluetoothSdkModule as unknown as Record<string, unknown>, \"setCameraFovOverride\")\nNativeBluetoothSdkModule.setCameraFovOverride = function (request: CameraFovOverrideRequest) {\n const setting = normalizeCameraFov(request)\n const requestedTtl =\n typeof request.ttlMs === \"number\" && Number.isFinite(request.ttlMs) && request.ttlMs > 0\n ? Math.round(request.ttlMs)\n : 300_000\n return Promise.resolve(\n nativeSetCameraFovOverride({\n ...setting,\n leaseId: request.leaseId,\n ttlMs: Math.min(requestedTtl, 600_000),\n }),\n )\n}\n\nNativeBluetoothSdkModule.setMicState = function (\n enabled: boolean,\n useGlassesMic?: boolean,\n sendTranscript?: boolean,\n sendLc3Data?: boolean,\n) {\n return Promise.resolve(\n nativeSetMicState(enabled, useGlassesMic ?? true, sendTranscript ?? false, sendLc3Data ?? false),\n )\n}\n\nNativeBluetoothSdkModule.setPreferredMic = function (preferredMic: MicPreference) {\n return this.updateBluetoothSettings({preferred_mic: preferredMic})\n}\n\nNativeBluetoothSdkModule.onGlassesStatus = function (callback: GlassesListener) {\n const subscription = this.addListener(\"glasses_status\", callback)\n return () => subscription.remove()\n}\n\nNativeBluetoothSdkModule.onBluetoothStatus = function (callback: BluetoothStatusListener) {\n const subscription = this.addListener(\"bluetooth_status\", callback)\n return () => subscription.remove()\n}\n\nconst nativeConnectDefault = NativeBluetoothSdkModule.connectDefault.bind(NativeBluetoothSdkModule)\nNativeBluetoothSdkModule.connectDefault = function (options?: ConnectOptions) {\n if (!options) {\n return nativeConnectDefault()\n }\n return this.connectDefaultWithOptions({...DEFAULT_CONNECT_OPTIONS, ...options})\n}\n\nNativeBluetoothSdkModule.connect = function (device: Device, options?: ConnectOptions) {\n return this.connectWithOptions(device, {...DEFAULT_CONNECT_OPTIONS, ...options})\n}\n\nconst nativeStopScan = NativeBluetoothSdkModule.stopScan.bind(NativeBluetoothSdkModule)\nconst activeScanCancellations = new Set<() => Promise<void>>()\nNativeBluetoothSdkModule.stopScan = async function () {\n if (activeScanCancellations.size === 0) return nativeStopScan()\n await Promise.all([...activeScanCancellations].map(cancel => cancel()))\n}\n\nNativeBluetoothSdkModule.scan = async function (modelOrOptions: DeviceModel | ScanOptions, options?: ScanModelOptions) {\n if (activeScanCancellations.size > 0) await this.stopScan()\n const scanOptions = normalizeScanArgs(modelOrOptions, options)\n const timeoutMs = normalizeTimeoutMs(scanOptions.timeoutMs ?? scanOptions.timeout, DEFAULT_SCAN_TIMEOUT_MS)\n const session = createScanSession(\n {\n start: (model) => this.startScan(model),\n stop: nativeStopScan,\n subscribe: (onResults) =>\n this.onBluetoothStatus((status) => {\n if (Array.isArray(status.searchResults)) onResults(searchResultsForModel(status, scanOptions.model))\n }),\n getResults: async () => searchResultsForModel(await this.getBluetoothStatus(), scanOptions.model),\n // Older native binaries simply omit diagnostics until the host is rebuilt.\n getDiagnostic:\n typeof this.getScanDiagnostic === \"function\" ? () => this.getScanDiagnostic!(scanOptions.model) : undefined,\n },\n {...scanOptions, timeoutMs},\n )\n activeScanCancellations.add(session.cancel)\n try {\n return await session.result\n } finally {\n activeScanCancellations.delete(session.cancel)\n }\n}\n\nconst nativeRequestPhoto = NativeBluetoothSdkModule.requestPhoto.bind(NativeBluetoothSdkModule)\nNativeBluetoothSdkModule.requestPhoto = function (params: PhotoRequestParams) {\n return nativeRequestPhoto(photoRequestParamsForNative(params) as unknown as PhotoRequestParams)\n}\n\nconst nativeWarmUpCamera = NativeBluetoothSdkModule.warmUpCamera.bind(NativeBluetoothSdkModule)\nNativeBluetoothSdkModule.warmUpCamera = function (params: WarmUpCameraParams) {\n return nativeWarmUpCamera(warmUpCameraParamsForNative(params) as unknown as WarmUpCameraParams)\n}\n\nexport default NativeBluetoothSdkModule\nexport const BluetoothSdk = NativeBluetoothSdkModule as Bluetooth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AAM,CAAC,CAAA;IAC3C,IAAI,CAAC;QACH,OAAO,MAAM,OAAO,CAAC,MAAM,CAAA;IAC7B,CAAC;YAAS,CAAC;QACT,uBAAuB,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IAChD,CAAC;AACH,CAAC,CAAA;AAED,MAAM,kBAAkB,GAAG,wBAAwB,CAAC,YAAY,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA;AAC/F,wBAAwB,CAAC,YAAY,GAAG,UAAU,MAA0B;IAC1E,OAAO,kBAAkB,CAAC,2BAA2B,CAAC,MAAM,CAAkC,CAAC,CAAA;AACjG,CAAC,CAAA;AAED,MAAM,kBAAkB,GAAG,wBAAwB,CAAC,YAAY,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAA;AAC/F,wBAAwB,CAAC,YAAY,GAAG,UAAU,MAA0B;IAC1E,OAAO,kBAAkB,CAAC,2BAA2B,CAAC,MAAM,CAAkC,CAAC,CAAA;AACjG,CAAC,CAAA;AAED,eAAe,wBAAwB,CAAA;AACvC,MAAM,CAAC,MAAM,YAAY,GAAG,wBAAsD,CAAA","sourcesContent":["import {createScanSession} from \"./scanSession\"\nimport {NativeModule, requireNativeModule} from \"expo\"\nimport {Platform} from \"react-native\"\n\nimport {installNativeLogConsole} from \"./nativeLogConsole\"\n\nimport {\n BluetoothSettingsUpdate,\n BluetoothSdkModuleEvents,\n BluetoothStatus,\n PhotoCaptureDefaults,\n CalendarEvent,\n CAMERA_FOV_DEFAULT,\n CAMERA_FOV_MAX,\n CAMERA_FOV_MIN,\n CameraFovPreset,\n CameraFovRequest,\n CameraFovOverrideRequest,\n CameraFovResult,\n CameraFovSetting,\n CameraRoiPosition,\n CameraStatusEvent,\n ConnectOptions,\n DashboardMenuItem,\n Device,\n DeviceModel,\n GlassesMediaVolumeGetResult,\n GlassesMediaVolumeSetResult,\n GlassesStatus,\n GalleryStatusEvent,\n HotspotStatusChangeEvent,\n MicPreference,\n NativePhoneNotification,\n NativeNotificationConfig,\n NativeNotificationStatus,\n ObservableStoreCategory,\n OtaQueryResult,\n OtaStartAckEvent,\n PhotoRequestParams,\n PhotoSuccessResponseEvent,\n PublicBluetoothStatus,\n RgbLedAction,\n RgbLedColor,\n RgbLedControlSuccessResponseEvent,\n ScanDiagnostic,\n ScanModelOptions,\n ScanOptions,\n SettingsAckSuccessEvent,\n StreamKeepAliveRequest,\n StreamStartRequest,\n StreamStatusEvent,\n VideoRecordingStartedStatusEvent,\n VideoRecordingSettings,\n VideoRecordingStoppedStatusEvent,\n VideoRecordingStatusEvent,\n VersionInfoResult,\n WarmUpCameraParams,\n SavedWifiNetworksResult,\n WifiForgetResult,\n WifiSearchResult,\n WifiStatusChangeEvent,\n} from \"../BluetoothSdk.types\"\nimport {warmUpCameraParamsForNative} from \"./cameraRequestPayload\"\nimport {photoRequestParamsForNative} from \"./photoRequestPayload\"\n\n/**\n * Private React Native native-module facade.\n *\n * This file intentionally lives under `_private` so the package root can expose\n * a small SDK surface while MentraOS uses its monorepo-only internal alias\n * during migration. Raw status getters/listeners stay here so React hooks can\n * shape native store snapshots before app code sees them.\n */\n\ntype GlassesListener = (changed: Partial<GlassesStatus>) => void\ntype BluetoothStatusListener = (changed: Partial<PublicBluetoothStatus>) => void\ntype MaybePromise<T> = T | Promise<T>\n\ndeclare class BluetoothSdkNativeModule extends NativeModule<BluetoothSdkModuleEvents> {\n // Observable Store Functions (native)\n getGlassesStatus(): Promise<GlassesStatus>\n getBluetoothStatus(): Promise<PublicBluetoothStatus>\n getDefaultDevice(): Promise<Device | null>\n update(category: ObservableStoreCategory, values: object): Promise<void>\n\n // Display Commands\n displayEvent(params: Record<string, unknown>): Promise<void>\n displayText(text: string, x?: number, y?: number, size?: number): Promise<void>\n clearDisplay(): Promise<void>\n setDashboardContent(content: string): Promise<void>\n\n // Connection Commands\n requestStatus(): Promise<void>\n connectDefault(options?: ConnectOptions): Promise<void>\n connectDefaultWithOptions(options: Required<ConnectOptions>): Promise<void>\n setDefaultDevice(device: Device | null): Promise<void>\n clearDefaultDevice(): Promise<void>\n getScanDiagnostic?: (model: DeviceModel) => Promise<ScanDiagnostic | null>\n startScan(model: DeviceModel): Promise<void>\n stopScan(): Promise<void>\n scan(options: ScanOptions): Promise<Device[]>\n scan(model: DeviceModel, options?: ScanModelOptions): Promise<Device[]>\n connect(device: Device, options?: ConnectOptions): Promise<void>\n connectWithOptions(device: Device, options: Required<ConnectOptions>): Promise<void>\n cancelConnectionAttempt(): Promise<void>\n connectDefaultController(): Promise<void>\n disconnectController(): Promise<void>\n connectSimulated(): Promise<void>\n disconnect(): Promise<void>\n forget(): Promise<void>\n forgetController(): Promise<void>\n showDashboard(): Promise<void>\n setBrightness(level: number, autoMode?: boolean | null): Promise<void>\n setAutoBrightness(enabled: boolean): Promise<void>\n setDashboardPosition(height: number, depth: number): Promise<void>\n setDashboardMenu(items: DashboardMenuItem[]): Promise<void>\n setCalendarEvents(events: CalendarEvent[]): Promise<void>\n setHeadUpAngle(angleDegrees: number): Promise<void>\n setImuEnabled(enabled: boolean): Promise<void>\n setScreenDisabled(disabled: boolean): Promise<void>\n ping(): Promise<void>\n dbg1(): Promise<void>\n dbg2(): Promise<void>\n\n // Incident Reporting\n sendIncidentId(incidentId: string, apiBaseUrl?: string | null): Promise<void>\n\n // WiFi Commands\n requestWifiScan(): Promise<WifiSearchResult[]>\n getSavedWifiNetworks(): Promise<SavedWifiNetworksResult>\n sendWifiCredentials(ssid: string, password: string): Promise<WifiStatusChangeEvent>\n forgetWifiNetwork(ssid: string): Promise<WifiForgetResult>\n setHotspotState(enabled: boolean): Promise<HotspotStatusChangeEvent>\n /** Enable or disable Wi-Fi ADB on Mentra Live (no-op on other devices). */\n setWifiAdbState(enabled: boolean): Promise<void>\n /** Set the glasses system clock when phone detects clock skew (Mentra Live and G2). */\n setSystemTime(timestampMs: number): Promise<void>\n /** Logs current WiFi frequency (MHz) and 5 GHz band to Android logcat. */\n logCurrentWifiFrequency(): Promise<void>\n\n // Gallery Commands\n setGalleryModeEnabled(enabled: boolean): Promise<SettingsAckSuccessEvent>\n setVoiceActivityDetectionEnabled(enabled: boolean): Promise<void>\n /** Mentra Live center-mic loudness / Barrier gate (cs_swit type 10). */\n setLoudnessGateEnabled(enabled: boolean): Promise<void>\n /**\n * @deprecated Sticky action-button photo presets are deprecated. Prefer per-request\n * `requestPhoto(...)` options (e.g. `mode: \"text\"` for text sensor size/crop).\n */\n setPhotoCaptureDefaults(settings: PhotoCaptureDefaults): Promise<SettingsAckSuccessEvent>\n setVideoRecordingDefaults(width: number, height: number, fps: number): Promise<SettingsAckSuccessEvent>\n setMaxVideoRecordingDuration(minutes: number): Promise<SettingsAckSuccessEvent>\n setCameraFov(request: CameraFovRequest): Promise<CameraFovResult>\n setLegacyCameraFov(request: CameraFovRequest): Promise<CameraFovResult>\n restoreLegacyCameraFov(): Promise<void>\n setCameraFovOverride(request: CameraFovOverrideRequest): Promise<CameraFovResult>\n releaseCameraFovOverride(leaseId: string): Promise<SettingsAckSuccessEvent>\n /**\n * Configure camera HAL tuning (ANR / gain) on Mentra Live glasses.\n * Sends a {@code camera_tuning_config} BLE message; the ASG client relays it as a\n * {@code camconfig} broadcast so the HAL picks up new parameters without a reboot.\n *\n * Scan-mode convention: pass `{anr: false, gain: false}` when activating scan mode\n * (disables ANR and pixsmart gain) and `{anr: true, gain: true}` to restore defaults.\n */\n setCameraTuningConfig(anrOn: boolean, gainOn: boolean): Promise<SettingsAckSuccessEvent>\n queryGalleryStatus(): Promise<GalleryStatusEvent>\n requestPhoto(params: PhotoRequestParams): Promise<PhotoSuccessResponseEvent>\n warmUpCamera(params: WarmUpCameraParams): Promise<CameraStatusEvent>\n stopCameraWarmUp(requestId: string): Promise<void>\n\n // OTA Commands\n setOtaVersionUrl(otaVersionUrl: string): void\n getOtaVersionUrl(): string\n checkForOtaUpdate(): Promise<boolean>\n startOtaUpdate(otaVersionUrl?: string | null): Promise<OtaStartAckEvent>\n sendOtaQueryStatus(): Promise<OtaQueryResult>\n startAr99OtaFromFile(path: string): Promise<boolean>\n cancelAr99Ota(): Promise<void>\n sendAr99FactoryReset(): Promise<void>\n buildAr99OtaSignature(\n secret: string,\n appName: string,\n currentVersion: string,\n serialNumber: string,\n nonce: string,\n ): string\n\n // Version Info Commands\n requestVersionInfo(): Promise<VersionInfoResult>\n\n // Video Recording Commands\n startVideoRecording(\n requestId: string,\n save: boolean,\n sound: boolean,\n settings?: VideoRecordingSettings,\n ): Promise<VideoRecordingStartedStatusEvent>\n stopVideoRecording(\n requestId: string,\n webhookUrl?: string,\n authToken?: string,\n ): Promise<VideoRecordingStoppedStatusEvent>\n queryVideoRecordingStatus(requestId: string): Promise<VideoRecordingStatusEvent>\n\n // Stream Commands\n startStream(params: StreamStartRequest): Promise<StreamStatusEvent>\n startExternallyManagedStream(params: StreamStartRequest): Promise<StreamStatusEvent>\n stopStream(): Promise<StreamStatusEvent>\n sendExternallyManagedStreamKeepAlive(params: StreamKeepAliveRequest): Promise<void>\n\n // Microphone Commands\n setMicState(enabled: boolean, useGlassesMic?: boolean, sendTranscript?: boolean, sendLc3Data?: boolean): Promise<void>\n setPreferredMic(preferredMic: MicPreference): Promise<void>\n restartTranscriber(): Promise<void>\n\n // Audio Playback Monitoring\n // Notify native side when our app starts/stops playing audio\n // Used to suspend LC3 mic during audio playback to avoid MCU overload\n setOwnAppAudioPlaying(playing: boolean): Promise<void>\n\n // Live PCM output stream (miniapp speaker.createStream). MentraOS-internal\n // ? 16-bit LE PCM chunks into a streaming AudioTrack (USAGE_MEDIA, so it\n // follows the phone's media route, e.g. A2DP to glasses). Implemented with\n // AudioTrack on Android and AVAudioEngine on iOS.\n /** Open a PCM stream session. One AudioTrack per id; caller manages ids. */\n pcmStreamOpen(streamId: string, sampleRate: number, channels: number, volume: number): Promise<void>\n /**\n * Append base64 PCM. Resolves with the queued-but-unplayed backlog in ms;\n * blocks (on a background dispatcher) while the backlog is above the\n * backpressure ceiling, so awaited writes self-throttle to realtime.\n */\n pcmStreamWrite(streamId: string, base64: string): Promise<{bufferedMs: number}>\n /** Drain the backlog, then stop. Resolves with the total played duration. */\n pcmStreamClose(streamId: string): Promise<{durationMs: number}>\n /** Stop immediately, dropping any backlog. Idempotent. */\n pcmStreamAbort(streamId: string): Promise<void>\n\n /** Mentra Live only: K900 `cs_getvol` / `sr_getvol`. */\n getGlassesMediaVolume(): Promise<GlassesMediaVolumeGetResult>\n /** Mentra Live only: K900 `cs_vol` / `sr_vol`; level clamped 0??5 on native. */\n setGlassesMediaVolume(level: number): Promise<GlassesMediaVolumeSetResult>\n\n // RGB LED Control\n rgbLedControl(\n requestId: string,\n packageName: string | null,\n action: RgbLedAction,\n color: RgbLedColor | null,\n onDurationMs: number,\n offDurationMs: number,\n count: number,\n ): Promise<RgbLedControlSuccessResponseEvent>\n\n // STT Commands\n setSttModelDetails(path: string, languageCode: string): Promise<void>\n getSttModelPath(): Promise<string>\n checkSttModelAvailable(): Promise<boolean>\n validateSttModel(path: string): Promise<boolean>\n extractTarBz2(sourcePath: string, destinationPath: string): Promise<boolean>\n\n // TTS Commands\n setTtsModelDetails(path: string, languageCode: string): Promise<void>\n getTtsModelPath(): Promise<string>\n getTtsModelLanguage(): Promise<string>\n checkTtsModelAvailable(): Promise<boolean>\n validateTtsModel(path: string): Promise<boolean>\n generateTtsAudio(\n text: string,\n modelPath: string,\n outputPath: string,\n speakerId: number,\n speed: number,\n ): Promise<boolean>\n\n /** Android G2 content upload. iOS receives ANCS directly and rejects uploads. */\n sendPhoneNotification(notification: NativePhoneNotification): Promise<void>\n configureNativeNotifications(config: NativeNotificationConfig): Promise<void>\n getNativeNotificationStatus(): Promise<NativeNotificationStatus>\n\n // Helper methods for type-safe observable store access\n updateGlasses(values: Partial<GlassesStatus>): Promise<void>\n updateBluetoothSettings(values: BluetoothSettingsUpdate): Promise<void>\n onGlassesStatus(callback: GlassesListener): () => void\n onBluetoothStatus(callback: BluetoothStatusListener): () => void\n\n // Process resident-set-size in MB. iOS-only; Android stub returns 0.\n getMemoryMB(): number\n}\n\nexport type BluetoothSdkInternalModule = BluetoothSdkNativeModule\n\n// This call loads the native module object from the JSI.\n// NativeModule<BluetoothSdkModuleEvents> already extends EventEmitter<BluetoothSdkModuleEvents>\nconst NativeBluetoothSdkModule = requireNativeModule<BluetoothSdkNativeModule>(\"BluetoothSdk\")\ninstallNativeLogConsole(NativeBluetoothSdkModule, Platform.OS)\n\nconst DEFAULT_CONNECT_OPTIONS: Required<ConnectOptions> = {\n saveAsDefault: true,\n cancelExistingConnectionAttempt: true,\n requiresAncs: true,\n}\n\nconst DEFAULT_SCAN_TIMEOUT_MS = 15_000\n\nfunction bindNativeMethod<T extends (...args: never[]) => unknown>(module: Record<string, unknown>, name: string): T {\n const method = module[name]\n if (typeof method !== \"function\") {\n console.warn(`[BluetoothSdk] Native method \"${name}\" is unavailable ??rebuild the app (bun android / bun ios)`)\n return (async () => {\n throw new Error(`BluetoothSdk.${name} is not available in this native build. Rebuild the app.`)\n }) as T\n }\n return method.bind(module) as T\n}\n\nconst CAMERA_ROI_MIN = 0\nconst CAMERA_ROI_MAX = 2\nconst CAMERA_ROI_POSITION_VALUES: Record<CameraRoiPosition, CameraFovSetting[\"roiPosition\"]> = {\n center: 0,\n bottom: 1,\n top: 2,\n}\n\n// Named presets are a convenience layer over the numeric {fov, roiPosition} API.\n// The default is the full sensor; \"standard\" preserves the historical 102° crop.\nconst CAMERA_FOV_PRESETS: Record<CameraFovPreset, CameraFovSetting> = {\n narrow: {fov: 82, roiPosition: 0},\n standard: {fov: 102, roiPosition: 0},\n wide: {fov: CAMERA_FOV_MAX, roiPosition: 0},\n}\n\nfunction clampInteger(value: number, min: number, max: number): number {\n return Math.max(min, Math.min(max, Math.round(value)))\n}\n\nfunction normalizeCameraFov(request: CameraFovRequest): CameraFovSetting {\n if (\"preset\" in request) {\n return CAMERA_FOV_PRESETS[request.preset] ?? CAMERA_FOV_PRESETS.standard\n }\n\n const roiPosition = request.roiPosition ?? \"center\"\n\n return {\n fov: clampInteger(Number.isFinite(request.fov) ? request.fov : CAMERA_FOV_DEFAULT, CAMERA_FOV_MIN, CAMERA_FOV_MAX),\n roiPosition: clampInteger(CAMERA_ROI_POSITION_VALUES[roiPosition] ?? 0, CAMERA_ROI_MIN, CAMERA_ROI_MAX) as\n | 0\n | 1\n | 2,\n }\n}\n\nfunction searchResultsForModel(status: Partial<PublicBluetoothStatus>, model: DeviceModel): Device[] {\n return status.searchResults?.filter((device) => device.model === model) ?? []\n}\n\nfunction normalizeScanArgs(modelOrOptions: DeviceModel | ScanOptions, options?: ScanModelOptions): ScanOptions {\n if (typeof modelOrOptions === \"string\") {\n return {model: modelOrOptions, ...options}\n }\n return modelOrOptions\n}\n\nfunction normalizeTimeoutMs(timeoutMs: number | undefined, defaultTimeoutMs: number): number {\n return typeof timeoutMs === \"number\" && Number.isFinite(timeoutMs) && timeoutMs > 0 ? timeoutMs : defaultTimeoutMs\n}\n\nfunction dashboardMenuItemToNative(item: DashboardMenuItem): Record<string, unknown> {\n return {\n ...(item.values ?? {}),\n title: item.title,\n packageName: item.packageName,\n }\n}\n\nfunction adaptConnectionStatusToNative(connection: GlassesStatus[\"connection\"]): Record<string, unknown> {\n switch (connection.state) {\n case \"connected\":\n return {connectionState: \"CONNECTED\", connected: true, fullyBooted: connection.fullyBooted}\n case \"scanning\":\n return {connectionState: \"SCANNING\", connected: false, fullyBooted: false}\n case \"connecting\":\n return {connectionState: \"CONNECTING\", connected: false, fullyBooted: false}\n case \"bonding\":\n return {connectionState: \"BONDING\", connected: false, fullyBooted: false}\n case \"disconnected\":\n return {connectionState: \"DISCONNECTED\", connected: false, fullyBooted: false}\n }\n}\n\nfunction adaptGlassesUpdateToNative(values: Partial<GlassesStatus>): Record<string, unknown> {\n const {wifi, hotspot, connection, ...rest} = values\n let update: Record<string, unknown> = {...rest}\n if (connection) {\n update = {\n ...update,\n ...adaptConnectionStatusToNative(connection),\n }\n }\n if (wifi?.state === \"connected\") {\n update = {\n ...update,\n wifiConnected: true,\n wifiSsid: wifi.ssid,\n wifiLocalIp: wifi.localIp ?? \"\",\n }\n } else if (wifi?.state === \"disconnected\") {\n update = {\n ...update,\n wifiConnected: false,\n wifiSsid: \"\",\n wifiLocalIp: \"\",\n }\n }\n if (hotspot?.state === \"enabled\") {\n update = {\n ...update,\n hotspotEnabled: true,\n hotspotSsid: hotspot.ssid,\n hotspotPassword: hotspot.password,\n hotspotGatewayIp: hotspot.localIp,\n }\n } else if (hotspot?.state === \"disabled\") {\n update = {\n ...update,\n hotspotEnabled: false,\n hotspotSsid: \"\",\n hotspotPassword: \"\",\n hotspotGatewayIp: \"\",\n }\n }\n return update\n}\n\n// Add helper methods to the module\nconst nativeGetGlassesStatus = NativeBluetoothSdkModule.getGlassesStatus.bind(\n NativeBluetoothSdkModule,\n) as () => MaybePromise<GlassesStatus>\nNativeBluetoothSdkModule.getGlassesStatus = function () {\n return Promise.resolve(nativeGetGlassesStatus())\n}\n\nconst nativeGetBluetoothStatus = NativeBluetoothSdkModule.getBluetoothStatus.bind(\n NativeBluetoothSdkModule,\n) as () => MaybePromise<BluetoothStatus>\nNativeBluetoothSdkModule.getBluetoothStatus = function () {\n return Promise.resolve(nativeGetBluetoothStatus())\n}\n\nconst nativeGetDefaultDevice = NativeBluetoothSdkModule.getDefaultDevice.bind(\n NativeBluetoothSdkModule,\n) as () => MaybePromise<Device | null>\nNativeBluetoothSdkModule.getDefaultDevice = function () {\n return Promise.resolve(nativeGetDefaultDevice())\n}\n\nconst nativeSetMicState = NativeBluetoothSdkModule.setMicState.bind(NativeBluetoothSdkModule) as (\n enabled: boolean,\n useGlassesMic: boolean,\n sendTranscript: boolean,\n sendLc3Data: boolean,\n) => MaybePromise<void>\n\nconst nativeDisplayText = NativeBluetoothSdkModule.displayText.bind(NativeBluetoothSdkModule) as (\n text: string,\n x: number,\n y: number,\n size: number,\n) => MaybePromise<void>\n\nNativeBluetoothSdkModule.updateGlasses = function (values: Partial<GlassesStatus>) {\n return this.update(\"glasses\", adaptGlassesUpdateToNative(values))\n}\n\nNativeBluetoothSdkModule.updateBluetoothSettings = function (values: BluetoothSettingsUpdate) {\n return this.update(\"bluetooth\", values)\n}\n\nNativeBluetoothSdkModule.displayText = function (text: string, x?: number, y?: number, size?: number) {\n return Promise.resolve(nativeDisplayText(text, x ?? 0, y ?? 0, size ?? 24))\n}\n\nNativeBluetoothSdkModule.setBrightness = function (level: number, autoMode?: boolean | null) {\n return this.updateBluetoothSettings({\n ...(autoMode == null ? {} : {auto_brightness: autoMode}),\n brightness: level,\n })\n}\n\nNativeBluetoothSdkModule.setAutoBrightness = function (enabled: boolean) {\n return this.updateBluetoothSettings({auto_brightness: enabled})\n}\n\nNativeBluetoothSdkModule.setDashboardPosition = function (height: number, depth: number) {\n return this.updateBluetoothSettings({\n dashboard_height: height,\n dashboard_depth: depth,\n })\n}\n\nNativeBluetoothSdkModule.setDashboardMenu = function (items: DashboardMenuItem[]) {\n return this.updateBluetoothSettings({menu_apps: items.map(dashboardMenuItemToNative)})\n}\n\nNativeBluetoothSdkModule.setCalendarEvents = function (events: CalendarEvent[]) {\n return this.updateBluetoothSettings({calendar_events: events})\n}\n\nNativeBluetoothSdkModule.setHeadUpAngle = function (angleDegrees: number) {\n return this.updateBluetoothSettings({head_up_angle: angleDegrees})\n}\n\nNativeBluetoothSdkModule.setImuEnabled = function (enabled: boolean) {\n return this.updateBluetoothSettings({imu_enabled: enabled})\n}\n\nNativeBluetoothSdkModule.setScreenDisabled = function (disabled: boolean) {\n return this.updateBluetoothSettings({screen_disabled: disabled})\n}\n\nNativeBluetoothSdkModule.setVoiceActivityDetectionEnabled = function (enabled: boolean) {\n return this.updateBluetoothSettings({voice_activity_detection_enabled: enabled})\n}\n\nNativeBluetoothSdkModule.setLoudnessGateEnabled = function (enabled: boolean) {\n return this.updateBluetoothSettings({loudness_gate_enabled: enabled})\n}\n\nconst nativeSetCameraFov = bindNativeMethod<(fov: CameraFovSetting) => MaybePromise<CameraFovResult>>(\n NativeBluetoothSdkModule as unknown as Record<string, unknown>,\n \"setCameraFov\",\n)\nNativeBluetoothSdkModule.setCameraFov = function (request: CameraFovRequest) {\n const setting = normalizeCameraFov(request)\n return Promise.resolve(nativeSetCameraFov(setting))\n}\n\nconst nativeSetLegacyCameraFov = bindNativeMethod<(fov: CameraFovSetting) => MaybePromise<CameraFovResult>>(\n NativeBluetoothSdkModule as unknown as Record<string, unknown>,\n \"setLegacyCameraFov\",\n)\nNativeBluetoothSdkModule.setLegacyCameraFov = function (request: CameraFovRequest) {\n return Promise.resolve(nativeSetLegacyCameraFov(normalizeCameraFov(request)))\n}\n\nconst nativeRestoreLegacyCameraFov = bindNativeMethod<() => MaybePromise<void>>(\n NativeBluetoothSdkModule as unknown as Record<string, unknown>,\n \"restoreLegacyCameraFov\",\n)\nNativeBluetoothSdkModule.restoreLegacyCameraFov = function () {\n return Promise.resolve(nativeRestoreLegacyCameraFov())\n}\n\nconst nativeSetCameraFovOverride = bindNativeMethod<\n (request: CameraFovSetting & {leaseId: string; ttlMs: number}) => MaybePromise<CameraFovResult>\n>(NativeBluetoothSdkModule as unknown as Record<string, unknown>, \"setCameraFovOverride\")\nNativeBluetoothSdkModule.setCameraFovOverride = function (request: CameraFovOverrideRequest) {\n const setting = normalizeCameraFov(request)\n const requestedTtl =\n typeof request.ttlMs === \"number\" && Number.isFinite(request.ttlMs) && request.ttlMs > 0\n ? Math.round(request.ttlMs)\n : 300_000\n return Promise.resolve(\n nativeSetCameraFovOverride({\n ...setting,\n leaseId: request.leaseId,\n ttlMs: Math.min(requestedTtl, 600_000),\n }),\n )\n}\n\nNativeBluetoothSdkModule.setMicState = function (\n enabled: boolean,\n useGlassesMic?: boolean,\n sendTranscript?: boolean,\n sendLc3Data?: boolean,\n) {\n return Promise.resolve(\n nativeSetMicState(enabled, useGlassesMic ?? true, sendTranscript ?? false, sendLc3Data ?? false),\n )\n}\n\nNativeBluetoothSdkModule.setPreferredMic = function (preferredMic: MicPreference) {\n return this.updateBluetoothSettings({preferred_mic: preferredMic})\n}\n\nNativeBluetoothSdkModule.onGlassesStatus = function (callback: GlassesListener) {\n const subscription = this.addListener(\"glasses_status\", callback)\n return () => subscription.remove()\n}\n\nNativeBluetoothSdkModule.onBluetoothStatus = function (callback: BluetoothStatusListener) {\n const subscription = this.addListener(\"bluetooth_status\", callback)\n return () => subscription.remove()\n}\n\nconst nativeConnectDefault = NativeBluetoothSdkModule.connectDefault.bind(NativeBluetoothSdkModule)\nNativeBluetoothSdkModule.connectDefault = function (options?: ConnectOptions) {\n if (!options) {\n return nativeConnectDefault()\n }\n return this.connectDefaultWithOptions({...DEFAULT_CONNECT_OPTIONS, ...options})\n}\n\nNativeBluetoothSdkModule.connect = function (device: Device, options?: ConnectOptions) {\n return this.connectWithOptions(device, {...DEFAULT_CONNECT_OPTIONS, ...options})\n}\n\nconst nativeStopScan = NativeBluetoothSdkModule.stopScan.bind(NativeBluetoothSdkModule)\nconst activeScanCancellations = new Set<() => Promise<void>>()\nNativeBluetoothSdkModule.stopScan = async function () {\n if (activeScanCancellations.size === 0) return nativeStopScan()\n await Promise.all([...activeScanCancellations].map(cancel => cancel()))\n}\n\nNativeBluetoothSdkModule.scan = async function (modelOrOptions: DeviceModel | ScanOptions, options?: ScanModelOptions) {\n if (activeScanCancellations.size > 0) await this.stopScan()\n const scanOptions = normalizeScanArgs(modelOrOptions, options)\n const timeoutMs = normalizeTimeoutMs(scanOptions.timeoutMs ?? scanOptions.timeout, DEFAULT_SCAN_TIMEOUT_MS)\n const session = createScanSession(\n {\n start: (model) => this.startScan(model),\n stop: nativeStopScan,\n subscribe: (onResults) =>\n this.onBluetoothStatus((status) => {\n if (Array.isArray(status.searchResults)) onResults(searchResultsForModel(status, scanOptions.model))\n }),\n getResults: async () => searchResultsForModel(await this.getBluetoothStatus(), scanOptions.model),\n // Older native binaries simply omit diagnostics until the host is rebuilt.\n getDiagnostic:\n typeof this.getScanDiagnostic === \"function\" ? () => this.getScanDiagnostic!(scanOptions.model) : undefined,\n },\n {...scanOptions, timeoutMs},\n )\n activeScanCancellations.add(session.cancel)\n try {\n return await session.result\n } finally {\n activeScanCancellations.delete(session.cancel)\n }\n}\n\nconst nativeRequestPhoto = NativeBluetoothSdkModule.requestPhoto.bind(NativeBluetoothSdkModule)\nNativeBluetoothSdkModule.requestPhoto = function (params: PhotoRequestParams) {\n return nativeRequestPhoto(photoRequestParamsForNative(params) as unknown as PhotoRequestParams)\n}\n\nconst nativeWarmUpCamera = NativeBluetoothSdkModule.warmUpCamera.bind(NativeBluetoothSdkModule)\nNativeBluetoothSdkModule.warmUpCamera = function (params: WarmUpCameraParams) {\n return nativeWarmUpCamera(warmUpCameraParamsForNative(params) as unknown as WarmUpCameraParams)\n}\n\nexport default NativeBluetoothSdkModule\nexport const BluetoothSdk = NativeBluetoothSdkModule as BluetoothSdkInternalModule\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Generated from /changelogs. Do not edit directly. */
|
|
2
2
|
export declare const GENERATED_RELEASE_CHANGELOGS: readonly [{
|
|
3
3
|
readonly version: "3.2.0";
|
|
4
|
-
readonly markdown: "This release is under active development. User-facing changes will be documented as they land
|
|
4
|
+
readonly markdown: "This release is under active development. User-facing changes will be documented as they land.\n\n- Breaking Bluetooth SDK change: `forgetWifiNetwork(ssid)` now returns `WifiForgetResult` instead of `WifiStatusChangeEvent`. Migrate status-only consumers to the semantic `outcome`; the requested network remains `ssid`, while optional post-command connectivity is reported by `connected`, `currentSsid`, and `localIp`.";
|
|
5
5
|
}, {
|
|
6
6
|
readonly version: "3.1.0";
|
|
7
7
|
readonly markdown: "Software updates are more reliable, with clearer progress and recovery when the glasses restart.\n\n- MentraOS, Mentra Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic.";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export const GENERATED_RELEASE_CHANGELOGS = Object.freeze([
|
|
3
3
|
{
|
|
4
4
|
"version": "3.2.0",
|
|
5
|
-
"markdown": "This release is under active development. User-facing changes will be documented as they land
|
|
5
|
+
"markdown": "This release is under active development. User-facing changes will be documented as they land.\n\n- Breaking Bluetooth SDK change: `forgetWifiNetwork(ssid)` now returns `WifiForgetResult` instead of `WifiStatusChangeEvent`. Migrate status-only consumers to the semantic `outcome`; the requested network remains `ssid`, while optional post-command connectivity is reported by `connected`, `currentSsid`, and `localIp`."
|
|
6
6
|
},
|
|
7
7
|
{
|
|
8
8
|
"version": "3.1.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelogCatalog.js","sourceRoot":"","sources":["../../src/generated/changelogCatalog.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,CACzD;IACE;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"changelogCatalog.js","sourceRoot":"","sources":["../../src/generated/changelogCatalog.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,CACzD;IACE;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,maAAma;KAChb;IACD;QACE,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,+cAA+c;KAC5d;CACO,CACT,CAAA","sourcesContent":["/** Generated from /changelogs. Do not edit directly. */\nexport const GENERATED_RELEASE_CHANGELOGS = Object.freeze(\n[\n {\n \"version\": \"3.2.0\",\n \"markdown\": \"This release is under active development. User-facing changes will be documented as they land.\\n\\n- Breaking Bluetooth SDK change: `forgetWifiNetwork(ssid)` now returns `WifiForgetResult` instead of `WifiStatusChangeEvent`. Migrate status-only consumers to the semantic `outcome`; the requested network remains `ssid`, while optional post-command connectivity is reported by `connected`, `currentSsid`, and `localIp`.\"\n },\n {\n \"version\": \"3.1.0\",\n \"markdown\": \"Software updates are more reliable, with clearer progress and recovery when the glasses restart.\\n\\n- MentraOS, Mentra Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic.\"\n }\n] as const,\n)\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export const BLUETOOTH_SDK_RELEASE_METADATA = Object.freeze({
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"familyBaseVersion": "3.2.0",
|
|
4
|
-
"releaseIdentity": "3.2.0-dev.
|
|
5
|
-
"releaseSetId": "mentra-3.2.0-dev.
|
|
6
|
-
"sourceCommit": "
|
|
7
|
-
"otaManifestUrl": "https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.2.0/mentra-live-ota-3.2.0-dev.
|
|
8
|
-
"otaManifestSha256": "
|
|
4
|
+
"releaseIdentity": "3.2.0-dev.203",
|
|
5
|
+
"releaseSetId": "mentra-3.2.0-dev.203",
|
|
6
|
+
"sourceCommit": "7eb4deefff27d498c2b4562d628607f399aa1f40",
|
|
7
|
+
"otaManifestUrl": "https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.2.0/mentra-live-ota-3.2.0-dev.203.json",
|
|
8
|
+
"otaManifestSha256": "0ae026238c8e70970be4e181cc1ae73dd905418292edebddb610012f4f0a9b6f"
|
|
9
9
|
});
|
|
10
10
|
//# sourceMappingURL=releaseMetadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,8BAA8B,GAA0C,MAAM,CAAC,MAAM,CAAC;IACjG,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,eAAe;IAClC,cAAc,EAAE,sBAAsB;IACtC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,wHAAwH;IAC1I,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface BluetoothSdkReleaseMetadata {\n schemaVersion: 1\n familyBaseVersion: string | null\n releaseIdentity: string | null\n releaseSetId: string | null\n sourceCommit: string | null\n otaManifestUrl: string | null\n otaManifestSha256: string | null\n}\n\nexport const BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.2.0\",\n \"releaseIdentity\": \"3.2.0-dev.
|
|
1
|
+
{"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,8BAA8B,GAA0C,MAAM,CAAC,MAAM,CAAC;IACjG,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,eAAe;IAClC,cAAc,EAAE,sBAAsB;IACtC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,wHAAwH;IAC1I,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface BluetoothSdkReleaseMetadata {\n schemaVersion: 1\n familyBaseVersion: string | null\n releaseIdentity: string | null\n releaseSetId: string | null\n sourceCommit: string | null\n otaManifestUrl: string | null\n otaManifestSha256: string | null\n}\n\nexport const BLUETOOTH_SDK_RELEASE_METADATA: Readonly<BluetoothSdkReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.2.0\",\n \"releaseIdentity\": \"3.2.0-dev.203\",\n \"releaseSetId\": \"mentra-3.2.0-dev.203\",\n \"sourceCommit\": \"7eb4deefff27d498c2b4562d628607f399aa1f40\",\n \"otaManifestUrl\": \"https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.2.0/mentra-live-ota-3.2.0-dev.203.json\",\n \"otaManifestSha256\": \"0ae026238c8e70970be4e181cc1ae73dd905418292edebddb610012f4f0a9b6f\"\n})\n"]}
|
package/build/index.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import type { BluetoothSdkPublicModule } from "./BluetoothSdk.types";
|
|
|
2
2
|
export declare const BluetoothSdk: BluetoothSdkPublicModule;
|
|
3
3
|
export default BluetoothSdk;
|
|
4
4
|
export { CAMERA_FOV_DEFAULT, CAMERA_FOV_MAX, CAMERA_FOV_MIN, DeviceModels, isBusyGlassesConnectionStatus, isConnectedGlassesConnectionStatus, isConnectedWifiStatus, isEnabledHotspotStatus, isReadyGlassesConnectionStatus, } from "./BluetoothSdk.types";
|
|
5
|
-
export type { AccelEvent, Ar99OtaStatusEvent, AudioConnectedEvent, AudioDisconnectedEvent, AudioPairingNeededEvent, BatteryStatusEvent, BluetoothSdkEvent, BluetoothSdkEventListener, BluetoothSdkEventMap, BluetoothSdkEventName, BluetoothSdkPublicModule as BluetoothSdkModule, BluetoothSdkSubscription, ButtonPhotoSize, PhotoCaptureDefaults, ButtonPressEvent, CameraFovPreset, CameraFovRequest, CameraFovResult, CameraRoiPosition, CompatibleGlassesSearchStopEvent, ConnectOptions, ConnectedGlassesConnectionStatus, ConnectedWifiStatus, Device, DeviceModel, EnabledHotspotStatus, GalleryStatusEvent, GlassesConnectionStatus, GlassesMediaVolumeGetResult, GlassesMediaVolumeSetResult, GlassesNotReadyEvent, HeadUpEvent, HotspotErrorEvent, HotspotStatus, HotspotStatusChangeEvent, GlassesSessionChangedEvent, KeepAliveAckEvent, LocalTranscriptionEvent, LogEvent, MicLc3Event, MicHealthEvent, MicMode, MicPcmEvent, MicPreference, OtaStartAckEvent, OtaProgress, OtaProgressStatus, OtaStage, OtaStatus, OtaStatusEvent, OtaQueryResult, OtaUpdateInfo, ReleaseChangelog, MtkUpdateCompleteEvent, PairFailureEvent, PairingInfoEvent, EnteringPairingModeEvent, OwnerReplacedEvent, PhotoCaptureMetadata, PhotoResolvedConfig, PhotoCompression, PhotoFpsRange, PhotoMeteredPreview, PhotoMode, PublicBluetoothStatus, PublicGlassesStatus, PhotoTransferMethod, PhotoResponseEvent, PhotoRequestedCaptureConfig, PhotoRequestParams, PhotoSize, PhotoStatusEvent, PhotoStatusState, PhotoSuccessResponseEvent, RgbLedAction, RgbLedColor, RgbLedControlResponseEvent, RgbLedControlSuccessResponseEvent, ScanModelOptions, ScanDiagnostic, ScanOptions, ScanResultsCallback, SpeakingStatusEvent, SettingsAckEvent, SettingsAckSetting, SettingsAckSuccessEvent, SettingsAckSuccessStatus, SettingsAckStatus, StreamAudioConfig, StreamResolvedConfig, StreamStartRequest, StreamStatusEvent, StreamStatusLifecycleState, StreamStatusReconnectState, StreamStatusState, StreamVideoConfig, SwipeVolumeStatusEvent, SwitchStatusEvent, TouchEvent, VideoRecordingDefaults, VideoRecordingStartedStatusEvent, VideoRecordingStatusEvent, VideoRecordingStatusState, VideoRecordingStoppedStatusEvent, VideoRecordingSuccessStatusEvent, VersionInfoEvent, VersionInfoResult, WifiScanResultEvent, VoiceActivityDetectionStatusEvent, WifiSearchResult, WifiStatus, WifiStatusChangeEvent, } from "./BluetoothSdk.types";
|
|
5
|
+
export type { AccelEvent, Ar99OtaStatusEvent, AudioConnectedEvent, AudioDisconnectedEvent, AudioPairingNeededEvent, BatteryStatusEvent, BluetoothSdkEvent, BluetoothSdkEventListener, BluetoothSdkEventMap, BluetoothSdkEventName, BluetoothSdkPublicModule as BluetoothSdkModule, BluetoothSdkSubscription, ButtonPhotoSize, PhotoCaptureDefaults, ButtonPressEvent, CameraFovPreset, CameraFovRequest, CameraFovResult, CameraRoiPosition, CompatibleGlassesSearchStopEvent, ConnectOptions, ConnectedGlassesConnectionStatus, ConnectedWifiStatus, Device, DeviceModel, EnabledHotspotStatus, GalleryStatusEvent, GlassesConnectionStatus, GlassesMediaVolumeGetResult, GlassesMediaVolumeSetResult, GlassesNotReadyEvent, HeadUpEvent, HotspotErrorEvent, HotspotStatus, HotspotStatusChangeEvent, GlassesSessionChangedEvent, KeepAliveAckEvent, LocalTranscriptionEvent, LogEvent, MicLc3Event, MicHealthEvent, MicMode, MicPcmEvent, MicPreference, OtaStartAckEvent, OtaProgress, OtaProgressStatus, OtaStage, OtaStatus, OtaStatusEvent, OtaQueryResult, OtaUpdateInfo, ReleaseChangelog, MtkUpdateCompleteEvent, PairFailureEvent, PairingInfoEvent, EnteringPairingModeEvent, OwnerReplacedEvent, PhotoCaptureMetadata, PhotoResolvedConfig, PhotoCompression, PhotoFpsRange, PhotoMeteredPreview, PhotoMode, PublicBluetoothStatus, PublicGlassesStatus, PhotoTransferMethod, PhotoResponseEvent, PhotoRequestedCaptureConfig, PhotoRequestParams, PhotoSize, PhotoStatusEvent, PhotoStatusState, PhotoSuccessResponseEvent, RgbLedAction, RgbLedColor, RgbLedControlResponseEvent, RgbLedControlSuccessResponseEvent, ScanModelOptions, ScanDiagnostic, ScanOptions, ScanResultsCallback, SpeakingStatusEvent, SettingsAckEvent, SettingsAckSetting, SettingsAckSuccessEvent, SettingsAckSuccessStatus, SettingsAckStatus, StreamAudioConfig, StreamResolvedConfig, StreamStartRequest, StreamStatusEvent, StreamStatusLifecycleState, StreamStatusReconnectState, StreamStatusState, StreamVideoConfig, SwipeVolumeStatusEvent, SwitchStatusEvent, TouchEvent, VideoRecordingDefaults, VideoRecordingStartedStatusEvent, VideoRecordingStatusEvent, VideoRecordingStatusState, VideoRecordingStoppedStatusEvent, VideoRecordingSuccessStatusEvent, VersionInfoEvent, VersionInfoResult, SavedWifiNetworksEvent, SavedWifiNetworksOutcome, SavedWifiNetworksResult, WifiForgetOutcome, WifiForgetResult, WifiForgetResultEvent, LegacyWifiForgetResultEvent, ModernWifiForgetResultEvent, WifiScanResultEvent, VoiceActivityDetectionStatusEvent, WifiSearchResult, WifiStatus, WifiStatusChangeEvent, } from "./BluetoothSdk.types";
|
|
6
6
|
export type { NativeNotificationConfig, NativeNotificationStatus, NativeNotificationDelivery } from "./BluetoothSdk.types";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,wBAAwB,EAIzB,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,wBAAwB,EAIzB,MAAM,sBAAsB,CAAA;AAkF7B,eAAO,MAAM,YAAY,EAAE,wBAmGzB,CAAA;AAEF,eAAe,YAAY,CAAA;AAE3B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,6BAA6B,EAC7B,kCAAkC,EAClC,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,sBAAsB,CAAA;AAE7B,YAAY,EACV,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,IAAI,kBAAkB,EAC9C,wBAAwB,EACxB,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,gCAAgC,EAChC,cAAc,EACd,gCAAgC,EAChC,mBAAmB,EACnB,MAAM,EACN,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,EACpB,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,wBAAwB,EACxB,0BAA0B,EAC1B,iBAAiB,EACjB,uBAAuB,EACvB,QAAQ,EACR,WAAW,EACX,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 +17,8 @@ const PUBLIC_EVENT_NAMES = new Set([
|
|
|
17
17
|
"local_transcription",
|
|
18
18
|
"wifi_status_change",
|
|
19
19
|
"wifi_scan_result",
|
|
20
|
+
"wifi_forget_result",
|
|
21
|
+
"saved_wifi_networks",
|
|
20
22
|
"hotspot_status_change",
|
|
21
23
|
"hotspot_error",
|
|
22
24
|
"photo_response",
|
|
@@ -100,6 +102,7 @@ export const BluetoothSdk = Object.freeze({
|
|
|
100
102
|
setScreenDisabled: bindPublicMethod("setScreenDisabled"),
|
|
101
103
|
ping: bindPublicMethod("ping"),
|
|
102
104
|
requestWifiScan: bindPublicMethod("requestWifiScan"),
|
|
105
|
+
getSavedWifiNetworks: bindPublicMethod("getSavedWifiNetworks"),
|
|
103
106
|
sendWifiCredentials: bindPublicMethod("sendWifiCredentials"),
|
|
104
107
|
forgetWifiNetwork: bindPublicMethod("forgetWifiNetwork"),
|
|
105
108
|
setHotspotState: bindPublicMethod("setHotspotState"),
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,MAAM,+BAA+B,CAAA;AASrE,OAAO,EAAC,oBAAoB,EAAC,MAAM,cAAc,CAAA;AAEjD,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAwB;IACxD,4BAA4B;IAC5B,8BAA8B;IAC9B,KAAK;IACL,mBAAmB;IACnB,wBAAwB;IACxB,mBAAmB;IACnB,cAAc;IACd,aAAa;IACb,aAAa;IACb,SAAS;IACT,iCAAiC;IACjC,iBAAiB;IACjB,gBAAgB;IAChB,qBAAqB;IACrB,oBAAoB;IACpB,kBAAkB;IAClB,uBAAuB;IACvB,eAAe;IACf,gBAAgB;IAChB,cAAc;IACd,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,aAAa;IACb,gBAAgB;IAChB,gCAAgC;IAChC,qBAAqB;IACrB,eAAe;IACf,0BAA0B;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IAC1D,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC;IACpD,sBAAsB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC;IAClE,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;IACtD,aAAa,EAAE,gBAAgB,CAAC,eAAe,CAAC;IAChD,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC;IACpD,mBAAmB,EAAE,gBAAgB,CAAC,qBAAqB,CAAC;IAC5D,sBAAsB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC;IAClE,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;IACtD,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;CACvD,CAAC,CAAA;AAEF,eAAe,YAAY,CAAA;AAE3B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,6BAA6B,EAC7B,kCAAkC,EAClC,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,sBAAsB,CAAA","sourcesContent":["import PrivateBluetoothSdkModule from \"./_private/BluetoothSdkModule\"\nimport type {\n BluetoothSdkEventListener,\n BluetoothSdkEventName,\n BluetoothSdkPublicModule,\n PublicBluetoothStatus,\n PublicGlassesStatus,\n VideoRecordingDefaults,\n} from \"./BluetoothSdk.types\"\nimport {getReleaseChangelogs} from \"./changelogs\"\n\nconst PUBLIC_EVENT_NAMES = new Set<BluetoothSdkEventName>([\n \"native_notification_status\",\n \"native_notification_delivery\",\n \"log\",\n \"device_discovered\",\n \"default_device_changed\",\n \"glasses_not_ready\",\n \"button_press\",\n \"touch_event\",\n \"accel_event\",\n \"head_up\",\n \"voice_activity_detection_status\",\n \"speaking_status\",\n \"battery_status\",\n \"local_transcription\",\n \"wifi_status_change\",\n \"wifi_scan_result\",\n \"hotspot_status_change\",\n \"hotspot_error\",\n \"photo_response\",\n \"photo_status\",\n \"camera_status\",\n \"video_recording_status\",\n \"media_success\",\n \"media_error\",\n \"gallery_status\",\n \"compatible_glasses_search_stop\",\n \"swipe_volume_status\",\n \"switch_status\",\n \"rgb_led_control_response\",\n \"settings_ack\",\n \"pair_failure\",\n \"pairing_info\",\n \"entering_pairing_mode\",\n \"owner_replaced\",\n \"audio_pairing_needed\",\n \"audio_connected\",\n \"audio_disconnected\",\n \"mic_pcm\",\n \"mic_lc3\",\n \"mic_health\",\n \"stream_status\",\n \"mtk_update_complete\",\n \"glasses_session_changed\",\n \"ota_start_ack\",\n \"ota_status\",\n \"ar99_ota_status\",\n \"version_info\",\n \"extraction_progress\",\n])\n\nconst addListener: BluetoothSdkPublicModule[\"addListener\"] = (eventName, listener) => {\n if (!PUBLIC_EVENT_NAMES.has(eventName)) {\n throw new Error(`Unsupported BluetoothSdk event \"${eventName}\". Use @mentra/bluetooth-sdk/react for status state.`)\n }\n return PrivateBluetoothSdkModule.addListener(eventName, listener as BluetoothSdkEventListener<BluetoothSdkEventName>)\n}\n\nconst startOtaUpdate: BluetoothSdkPublicModule[\"startOtaUpdate\"] = (otaVersionUrl) => {\n return PrivateBluetoothSdkModule.startOtaUpdate(otaVersionUrl)\n}\n\nconst queryOtaStatus: BluetoothSdkPublicModule[\"queryOtaStatus\"] = () => {\n return PrivateBluetoothSdkModule.sendOtaQueryStatus()\n}\n\nconst bindPublicMethod = <K extends keyof BluetoothSdkPublicModule>(name: K): BluetoothSdkPublicModule[K] => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>)[name]\n if (typeof method === \"function\") {\n return method.bind(PrivateBluetoothSdkModule) as BluetoothSdkPublicModule[K]\n }\n\n return (async () => {\n throw new Error(`BluetoothSdk.${String(name)} is not available in this native build. Rebuild the app.`)\n }) as unknown as BluetoothSdkPublicModule[K]\n}\n\nexport const BluetoothSdk: BluetoothSdkPublicModule = Object.freeze({\n configureNativeNotifications: bindPublicMethod(\"configureNativeNotifications\"),\n getNativeNotificationStatus: bindPublicMethod(\"getNativeNotificationStatus\"),\n addListener,\n getGlassesStatus: bindPublicMethod(\"getGlassesStatus\"),\n getBluetoothStatus: bindPublicMethod(\"getBluetoothStatus\"),\n subscribeGlassesStatus: (listener: (changed: Partial<PublicGlassesStatus>) => void) =>\n PrivateBluetoothSdkModule.onGlassesStatus(listener),\n subscribeBluetoothStatus: (listener: (changed: Partial<PublicBluetoothStatus>) => void) =>\n PrivateBluetoothSdkModule.onBluetoothStatus(listener),\n getDefaultDevice: bindPublicMethod(\"getDefaultDevice\"),\n setDefaultDevice: bindPublicMethod(\"setDefaultDevice\"),\n clearDefaultDevice: bindPublicMethod(\"clearDefaultDevice\"),\n startScan: bindPublicMethod(\"startScan\"),\n stopScan: bindPublicMethod(\"stopScan\"),\n scan: bindPublicMethod(\"scan\") as BluetoothSdkPublicModule[\"scan\"],\n connect: bindPublicMethod(\"connect\"),\n connectDefault: bindPublicMethod(\"connectDefault\"),\n cancelConnectionAttempt: bindPublicMethod(\"cancelConnectionAttempt\"),\n disconnect: bindPublicMethod(\"disconnect\"),\n forget: bindPublicMethod(\"forget\"),\n displayText: bindPublicMethod(\"displayText\"),\n clearDisplay: bindPublicMethod(\"clearDisplay\"),\n setDashboardContent: bindPublicMethod(\"setDashboardContent\"),\n showDashboard: bindPublicMethod(\"showDashboard\"),\n setDashboardPosition: bindPublicMethod(\"setDashboardPosition\"),\n setHeadUpAngle: bindPublicMethod(\"setHeadUpAngle\"),\n setImuEnabled: bindPublicMethod(\"setImuEnabled\"),\n setScreenDisabled: bindPublicMethod(\"setScreenDisabled\"),\n ping: bindPublicMethod(\"ping\"),\n requestWifiScan: bindPublicMethod(\"requestWifiScan\"),\n sendWifiCredentials: bindPublicMethod(\"sendWifiCredentials\"),\n forgetWifiNetwork: bindPublicMethod(\"forgetWifiNetwork\"),\n setHotspotState: bindPublicMethod(\"setHotspotState\"),\n setSystemTime: bindPublicMethod(\"setSystemTime\"),\n setWifiAdbState: bindPublicMethod(\"setWifiAdbState\"),\n setGalleryModeEnabled: bindPublicMethod(\"setGalleryModeEnabled\"),\n setVoiceActivityDetectionEnabled: bindPublicMethod(\"setVoiceActivityDetectionEnabled\"),\n setLoudnessGateEnabled: bindPublicMethod(\"setLoudnessGateEnabled\"),\n /**\n * @deprecated Sticky action-button photo presets are deprecated. Prefer per-request\n * `requestPhoto(...)` options (e.g. `mode: \"text\"` for text sensor size/crop, or explicit per-shot\n * fields). Still functional until removed in a future release.\n */\n setPhotoCaptureDefaults: bindPublicMethod(\"setPhotoCaptureDefaults\"),\n setVideoRecordingDefaults: ({width, height, fps}: VideoRecordingDefaults) => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>).setVideoRecordingDefaults\n if (typeof method !== \"function\") {\n return Promise.reject(\n new Error(\"BluetoothSdk.setVideoRecordingDefaults is not available in this native build. Rebuild the app.\"),\n )\n }\n return PrivateBluetoothSdkModule.setVideoRecordingDefaults(width, height, fps)\n },\n setMaxVideoRecordingDuration: bindPublicMethod(\"setMaxVideoRecordingDuration\"),\n setCameraFov: bindPublicMethod(\"setCameraFov\"),\n setLegacyCameraFov: bindPublicMethod(\"setLegacyCameraFov\"),\n setCameraFovOverride: bindPublicMethod(\"setCameraFovOverride\"),\n releaseCameraFovOverride: bindPublicMethod(\"releaseCameraFovOverride\"),\n setCameraTuningConfig: bindPublicMethod(\"setCameraTuningConfig\"),\n queryGalleryStatus: bindPublicMethod(\"queryGalleryStatus\"),\n requestPhoto: bindPublicMethod(\"requestPhoto\"),\n warmUpCamera: bindPublicMethod(\"warmUpCamera\"),\n stopCameraWarmUp: bindPublicMethod(\"stopCameraWarmUp\"),\n startVideoRecording: bindPublicMethod(\"startVideoRecording\"),\n stopVideoRecording: bindPublicMethod(\"stopVideoRecording\"),\n queryVideoRecordingStatus: bindPublicMethod(\"queryVideoRecordingStatus\"),\n startStream: bindPublicMethod(\"startStream\"),\n stopStream: bindPublicMethod(\"stopStream\"),\n setMicState: bindPublicMethod(\"setMicState\"),\n setPreferredMic: bindPublicMethod(\"setPreferredMic\"),\n setOwnAppAudioPlaying: bindPublicMethod(\"setOwnAppAudioPlaying\"),\n getGlassesMediaVolume: bindPublicMethod(\"getGlassesMediaVolume\"),\n setGlassesMediaVolume: bindPublicMethod(\"setGlassesMediaVolume\"),\n rgbLedControl: bindPublicMethod(\"rgbLedControl\"),\n requestVersionInfo: bindPublicMethod(\"requestVersionInfo\"),\n setOtaVersionUrl: bindPublicMethod(\"setOtaVersionUrl\"),\n getOtaVersionUrl: bindPublicMethod(\"getOtaVersionUrl\"),\n checkForOtaUpdate: bindPublicMethod(\"checkForOtaUpdate\"),\n getReleaseChangelogs,\n startOtaUpdate,\n queryOtaStatus,\n startAr99OtaFromFile: bindPublicMethod(\"startAr99OtaFromFile\"),\n cancelAr99Ota: bindPublicMethod(\"cancelAr99Ota\"),\n sendAr99FactoryReset: bindPublicMethod(\"sendAr99FactoryReset\"),\n buildAr99OtaSignature: bindPublicMethod(\"buildAr99OtaSignature\"),\n setSttModelDetails: bindPublicMethod(\"setSttModelDetails\"),\n getSttModelPath: bindPublicMethod(\"getSttModelPath\"),\n checkSttModelAvailable: bindPublicMethod(\"checkSttModelAvailable\"),\n validateSttModel: bindPublicMethod(\"validateSttModel\"),\n extractTarBz2: bindPublicMethod(\"extractTarBz2\"),\n restartTranscriber: bindPublicMethod(\"restartTranscriber\"),\n setTtsModelDetails: bindPublicMethod(\"setTtsModelDetails\"),\n getTtsModelPath: bindPublicMethod(\"getTtsModelPath\"),\n getTtsModelLanguage: bindPublicMethod(\"getTtsModelLanguage\"),\n checkTtsModelAvailable: bindPublicMethod(\"checkTtsModelAvailable\"),\n validateTtsModel: bindPublicMethod(\"validateTtsModel\"),\n generateTtsAudio: bindPublicMethod(\"generateTtsAudio\"),\n})\n\nexport default BluetoothSdk\n\nexport {\n CAMERA_FOV_DEFAULT,\n CAMERA_FOV_MAX,\n CAMERA_FOV_MIN,\n DeviceModels,\n isBusyGlassesConnectionStatus,\n isConnectedGlassesConnectionStatus,\n isConnectedWifiStatus,\n isEnabledHotspotStatus,\n isReadyGlassesConnectionStatus,\n} from \"./BluetoothSdk.types\"\n\nexport type {\n AccelEvent,\n Ar99OtaStatusEvent,\n AudioConnectedEvent,\n AudioDisconnectedEvent,\n AudioPairingNeededEvent,\n BatteryStatusEvent,\n BluetoothSdkEvent,\n BluetoothSdkEventListener,\n BluetoothSdkEventMap,\n BluetoothSdkEventName,\n BluetoothSdkPublicModule as BluetoothSdkModule,\n BluetoothSdkSubscription,\n ButtonPhotoSize,\n PhotoCaptureDefaults,\n ButtonPressEvent,\n CameraFovPreset,\n CameraFovRequest,\n CameraFovResult,\n CameraRoiPosition,\n CompatibleGlassesSearchStopEvent,\n ConnectOptions,\n ConnectedGlassesConnectionStatus,\n ConnectedWifiStatus,\n Device,\n DeviceModel,\n EnabledHotspotStatus,\n GalleryStatusEvent,\n GlassesConnectionStatus,\n GlassesMediaVolumeGetResult,\n GlassesMediaVolumeSetResult,\n GlassesNotReadyEvent,\n HeadUpEvent,\n HotspotErrorEvent,\n HotspotStatus,\n HotspotStatusChangeEvent,\n GlassesSessionChangedEvent,\n KeepAliveAckEvent,\n LocalTranscriptionEvent,\n LogEvent,\n MicLc3Event,\n MicHealthEvent,\n MicMode,\n MicPcmEvent,\n MicPreference,\n OtaStartAckEvent,\n OtaProgress,\n OtaProgressStatus,\n OtaStage,\n OtaStatus,\n OtaStatusEvent,\n OtaQueryResult,\n OtaUpdateInfo,\n ReleaseChangelog,\n MtkUpdateCompleteEvent,\n PairFailureEvent,\n PairingInfoEvent,\n EnteringPairingModeEvent,\n OwnerReplacedEvent,\n PhotoCaptureMetadata,\n PhotoResolvedConfig,\n PhotoCompression,\n PhotoFpsRange,\n PhotoMeteredPreview,\n PhotoMode,\n PublicBluetoothStatus,\n PublicGlassesStatus,\n PhotoTransferMethod,\n PhotoResponseEvent,\n PhotoRequestedCaptureConfig,\n PhotoRequestParams,\n PhotoSize,\n PhotoStatusEvent,\n PhotoStatusState,\n PhotoSuccessResponseEvent,\n RgbLedAction,\n RgbLedColor,\n RgbLedControlResponseEvent,\n RgbLedControlSuccessResponseEvent,\n ScanModelOptions,\n ScanDiagnostic,\n ScanOptions,\n ScanResultsCallback,\n SpeakingStatusEvent,\n SettingsAckEvent,\n SettingsAckSetting,\n SettingsAckSuccessEvent,\n SettingsAckSuccessStatus,\n SettingsAckStatus,\n StreamAudioConfig,\n StreamResolvedConfig,\n StreamStartRequest,\n StreamStatusEvent,\n StreamStatusLifecycleState,\n StreamStatusReconnectState,\n StreamStatusState,\n StreamVideoConfig,\n SwipeVolumeStatusEvent,\n SwitchStatusEvent,\n TouchEvent,\n VideoRecordingDefaults,\n VideoRecordingStartedStatusEvent,\n VideoRecordingStatusEvent,\n VideoRecordingStatusState,\n VideoRecordingStoppedStatusEvent,\n VideoRecordingSuccessStatusEvent,\n VersionInfoEvent,\n VersionInfoResult,\n WifiScanResultEvent,\n VoiceActivityDetectionStatusEvent,\n WifiSearchResult,\n WifiStatus,\n WifiStatusChangeEvent,\n} from \"./BluetoothSdk.types\"\n\nexport type {NativeNotificationConfig, NativeNotificationStatus, NativeNotificationDelivery} from \"./BluetoothSdk.types\"\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,MAAM,+BAA+B,CAAA;AASrE,OAAO,EAAC,oBAAoB,EAAC,MAAM,cAAc,CAAA;AAEjD,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAwB;IACxD,4BAA4B;IAC5B,8BAA8B;IAC9B,KAAK;IACL,mBAAmB;IACnB,wBAAwB;IACxB,mBAAmB;IACnB,cAAc;IACd,aAAa;IACb,aAAa;IACb,SAAS;IACT,iCAAiC;IACjC,iBAAiB;IACjB,gBAAgB;IAChB,qBAAqB;IACrB,oBAAoB;IACpB,kBAAkB;IAClB,oBAAoB;IACpB,qBA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AAgB,CAAC,sBAAsB,CAAC;IAC9D,aAAa,EAAE,gBAAgB,CAAC,eAAe,CAAC;IAChD,oBAAoB,EAAE,gBAAgB,CAAC,sBAAsB,CAAC;IAC9D,qBAAqB,EAAE,gBAAgB,CAAC,uBAAuB,CAAC;IAChE,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC;IACpD,sBAAsB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC;IAClE,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;IACtD,aAAa,EAAE,gBAAgB,CAAC,eAAe,CAAC;IAChD,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,kBAAkB,EAAE,gBAAgB,CAAC,oBAAoB,CAAC;IAC1D,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAAC;IACpD,mBAAmB,EAAE,gBAAgB,CAAC,qBAAqB,CAAC;IAC5D,sBAAsB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC;IAClE,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;IACtD,gBAAgB,EAAE,gBAAgB,CAAC,kBAAkB,CAAC;CACvD,CAAC,CAAA;AAEF,eAAe,YAAY,CAAA;AAE3B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,6BAA6B,EAC7B,kCAAkC,EAClC,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,sBAAsB,CAAA","sourcesContent":["import PrivateBluetoothSdkModule from \"./_private/BluetoothSdkModule\"\nimport type {\n BluetoothSdkEventListener,\n BluetoothSdkEventName,\n BluetoothSdkPublicModule,\n PublicBluetoothStatus,\n PublicGlassesStatus,\n VideoRecordingDefaults,\n} from \"./BluetoothSdk.types\"\nimport {getReleaseChangelogs} from \"./changelogs\"\n\nconst PUBLIC_EVENT_NAMES = new Set<BluetoothSdkEventName>([\n \"native_notification_status\",\n \"native_notification_delivery\",\n \"log\",\n \"device_discovered\",\n \"default_device_changed\",\n \"glasses_not_ready\",\n \"button_press\",\n \"touch_event\",\n \"accel_event\",\n \"head_up\",\n \"voice_activity_detection_status\",\n \"speaking_status\",\n \"battery_status\",\n \"local_transcription\",\n \"wifi_status_change\",\n \"wifi_scan_result\",\n \"wifi_forget_result\",\n \"saved_wifi_networks\",\n \"hotspot_status_change\",\n \"hotspot_error\",\n \"photo_response\",\n \"photo_status\",\n \"camera_status\",\n \"video_recording_status\",\n \"media_success\",\n \"media_error\",\n \"gallery_status\",\n \"compatible_glasses_search_stop\",\n \"swipe_volume_status\",\n \"switch_status\",\n \"rgb_led_control_response\",\n \"settings_ack\",\n \"pair_failure\",\n \"pairing_info\",\n \"entering_pairing_mode\",\n \"owner_replaced\",\n \"audio_pairing_needed\",\n \"audio_connected\",\n \"audio_disconnected\",\n \"mic_pcm\",\n \"mic_lc3\",\n \"mic_health\",\n \"stream_status\",\n \"mtk_update_complete\",\n \"glasses_session_changed\",\n \"ota_start_ack\",\n \"ota_status\",\n \"ar99_ota_status\",\n \"version_info\",\n \"extraction_progress\",\n])\n\nconst addListener: BluetoothSdkPublicModule[\"addListener\"] = (eventName, listener) => {\n if (!PUBLIC_EVENT_NAMES.has(eventName)) {\n throw new Error(`Unsupported BluetoothSdk event \"${eventName}\". Use @mentra/bluetooth-sdk/react for status state.`)\n }\n return PrivateBluetoothSdkModule.addListener(eventName, listener as BluetoothSdkEventListener<BluetoothSdkEventName>)\n}\n\nconst startOtaUpdate: BluetoothSdkPublicModule[\"startOtaUpdate\"] = (otaVersionUrl) => {\n return PrivateBluetoothSdkModule.startOtaUpdate(otaVersionUrl)\n}\n\nconst queryOtaStatus: BluetoothSdkPublicModule[\"queryOtaStatus\"] = () => {\n return PrivateBluetoothSdkModule.sendOtaQueryStatus()\n}\n\nconst bindPublicMethod = <K extends keyof BluetoothSdkPublicModule>(name: K): BluetoothSdkPublicModule[K] => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>)[name]\n if (typeof method === \"function\") {\n return method.bind(PrivateBluetoothSdkModule) as BluetoothSdkPublicModule[K]\n }\n\n return (async () => {\n throw new Error(`BluetoothSdk.${String(name)} is not available in this native build. Rebuild the app.`)\n }) as unknown as BluetoothSdkPublicModule[K]\n}\n\nexport const BluetoothSdk: BluetoothSdkPublicModule = Object.freeze({\n configureNativeNotifications: bindPublicMethod(\"configureNativeNotifications\"),\n getNativeNotificationStatus: bindPublicMethod(\"getNativeNotificationStatus\"),\n addListener,\n getGlassesStatus: bindPublicMethod(\"getGlassesStatus\"),\n getBluetoothStatus: bindPublicMethod(\"getBluetoothStatus\"),\n subscribeGlassesStatus: (listener: (changed: Partial<PublicGlassesStatus>) => void) =>\n PrivateBluetoothSdkModule.onGlassesStatus(listener),\n subscribeBluetoothStatus: (listener: (changed: Partial<PublicBluetoothStatus>) => void) =>\n PrivateBluetoothSdkModule.onBluetoothStatus(listener),\n getDefaultDevice: bindPublicMethod(\"getDefaultDevice\"),\n setDefaultDevice: bindPublicMethod(\"setDefaultDevice\"),\n clearDefaultDevice: bindPublicMethod(\"clearDefaultDevice\"),\n startScan: bindPublicMethod(\"startScan\"),\n stopScan: bindPublicMethod(\"stopScan\"),\n scan: bindPublicMethod(\"scan\") as BluetoothSdkPublicModule[\"scan\"],\n connect: bindPublicMethod(\"connect\"),\n connectDefault: bindPublicMethod(\"connectDefault\"),\n cancelConnectionAttempt: bindPublicMethod(\"cancelConnectionAttempt\"),\n disconnect: bindPublicMethod(\"disconnect\"),\n forget: bindPublicMethod(\"forget\"),\n displayText: bindPublicMethod(\"displayText\"),\n clearDisplay: bindPublicMethod(\"clearDisplay\"),\n setDashboardContent: bindPublicMethod(\"setDashboardContent\"),\n showDashboard: bindPublicMethod(\"showDashboard\"),\n setDashboardPosition: bindPublicMethod(\"setDashboardPosition\"),\n setHeadUpAngle: bindPublicMethod(\"setHeadUpAngle\"),\n setImuEnabled: bindPublicMethod(\"setImuEnabled\"),\n setScreenDisabled: bindPublicMethod(\"setScreenDisabled\"),\n ping: bindPublicMethod(\"ping\"),\n requestWifiScan: bindPublicMethod(\"requestWifiScan\"),\n getSavedWifiNetworks: bindPublicMethod(\"getSavedWifiNetworks\"),\n sendWifiCredentials: bindPublicMethod(\"sendWifiCredentials\"),\n forgetWifiNetwork: bindPublicMethod(\"forgetWifiNetwork\"),\n setHotspotState: bindPublicMethod(\"setHotspotState\"),\n setSystemTime: bindPublicMethod(\"setSystemTime\"),\n setWifiAdbState: bindPublicMethod(\"setWifiAdbState\"),\n setGalleryModeEnabled: bindPublicMethod(\"setGalleryModeEnabled\"),\n setVoiceActivityDetectionEnabled: bindPublicMethod(\"setVoiceActivityDetectionEnabled\"),\n setLoudnessGateEnabled: bindPublicMethod(\"setLoudnessGateEnabled\"),\n /**\n * @deprecated Sticky action-button photo presets are deprecated. Prefer per-request\n * `requestPhoto(...)` options (e.g. `mode: \"text\"` for text sensor size/crop, or explicit per-shot\n * fields). Still functional until removed in a future release.\n */\n setPhotoCaptureDefaults: bindPublicMethod(\"setPhotoCaptureDefaults\"),\n setVideoRecordingDefaults: ({width, height, fps}: VideoRecordingDefaults) => {\n const method = (PrivateBluetoothSdkModule as unknown as Record<string, unknown>).setVideoRecordingDefaults\n if (typeof method !== \"function\") {\n return Promise.reject(\n new Error(\"BluetoothSdk.setVideoRecordingDefaults is not available in this native build. Rebuild the app.\"),\n )\n }\n return PrivateBluetoothSdkModule.setVideoRecordingDefaults(width, height, fps)\n },\n setMaxVideoRecordingDuration: bindPublicMethod(\"setMaxVideoRecordingDuration\"),\n setCameraFov: bindPublicMethod(\"setCameraFov\"),\n setLegacyCameraFov: bindPublicMethod(\"setLegacyCameraFov\"),\n setCameraFovOverride: bindPublicMethod(\"setCameraFovOverride\"),\n releaseCameraFovOverride: bindPublicMethod(\"releaseCameraFovOverride\"),\n setCameraTuningConfig: bindPublicMethod(\"setCameraTuningConfig\"),\n queryGalleryStatus: bindPublicMethod(\"queryGalleryStatus\"),\n requestPhoto: bindPublicMethod(\"requestPhoto\"),\n warmUpCamera: bindPublicMethod(\"warmUpCamera\"),\n stopCameraWarmUp: bindPublicMethod(\"stopCameraWarmUp\"),\n startVideoRecording: bindPublicMethod(\"startVideoRecording\"),\n stopVideoRecording: bindPublicMethod(\"stopVideoRecording\"),\n queryVideoRecordingStatus: bindPublicMethod(\"queryVideoRecordingStatus\"),\n startStream: bindPublicMethod(\"startStream\"),\n stopStream: bindPublicMethod(\"stopStream\"),\n setMicState: bindPublicMethod(\"setMicState\"),\n setPreferredMic: bindPublicMethod(\"setPreferredMic\"),\n setOwnAppAudioPlaying: bindPublicMethod(\"setOwnAppAudioPlaying\"),\n getGlassesMediaVolume: bindPublicMethod(\"getGlassesMediaVolume\"),\n setGlassesMediaVolume: bindPublicMethod(\"setGlassesMediaVolume\"),\n rgbLedControl: bindPublicMethod(\"rgbLedControl\"),\n requestVersionInfo: bindPublicMethod(\"requestVersionInfo\"),\n setOtaVersionUrl: bindPublicMethod(\"setOtaVersionUrl\"),\n getOtaVersionUrl: bindPublicMethod(\"getOtaVersionUrl\"),\n checkForOtaUpdate: bindPublicMethod(\"checkForOtaUpdate\"),\n getReleaseChangelogs,\n startOtaUpdate,\n queryOtaStatus,\n startAr99OtaFromFile: bindPublicMethod(\"startAr99OtaFromFile\"),\n cancelAr99Ota: bindPublicMethod(\"cancelAr99Ota\"),\n sendAr99FactoryReset: bindPublicMethod(\"sendAr99FactoryReset\"),\n buildAr99OtaSignature: bindPublicMethod(\"buildAr99OtaSignature\"),\n setSttModelDetails: bindPublicMethod(\"setSttModelDetails\"),\n getSttModelPath: bindPublicMethod(\"getSttModelPath\"),\n checkSttModelAvailable: bindPublicMethod(\"checkSttModelAvailable\"),\n validateSttModel: bindPublicMethod(\"validateSttModel\"),\n extractTarBz2: bindPublicMethod(\"extractTarBz2\"),\n restartTranscriber: bindPublicMethod(\"restartTranscriber\"),\n setTtsModelDetails: bindPublicMethod(\"setTtsModelDetails\"),\n getTtsModelPath: bindPublicMethod(\"getTtsModelPath\"),\n getTtsModelLanguage: bindPublicMethod(\"getTtsModelLanguage\"),\n checkTtsModelAvailable: bindPublicMethod(\"checkTtsModelAvailable\"),\n validateTtsModel: bindPublicMethod(\"validateTtsModel\"),\n generateTtsAudio: bindPublicMethod(\"generateTtsAudio\"),\n})\n\nexport default BluetoothSdk\n\nexport {\n CAMERA_FOV_DEFAULT,\n CAMERA_FOV_MAX,\n CAMERA_FOV_MIN,\n DeviceModels,\n isBusyGlassesConnectionStatus,\n isConnectedGlassesConnectionStatus,\n isConnectedWifiStatus,\n isEnabledHotspotStatus,\n isReadyGlassesConnectionStatus,\n} from \"./BluetoothSdk.types\"\n\nexport type {\n AccelEvent,\n Ar99OtaStatusEvent,\n AudioConnectedEvent,\n AudioDisconnectedEvent,\n AudioPairingNeededEvent,\n BatteryStatusEvent,\n BluetoothSdkEvent,\n BluetoothSdkEventListener,\n BluetoothSdkEventMap,\n BluetoothSdkEventName,\n BluetoothSdkPublicModule as BluetoothSdkModule,\n BluetoothSdkSubscription,\n ButtonPhotoSize,\n PhotoCaptureDefaults,\n ButtonPressEvent,\n CameraFovPreset,\n CameraFovRequest,\n CameraFovResult,\n CameraRoiPosition,\n CompatibleGlassesSearchStopEvent,\n ConnectOptions,\n ConnectedGlassesConnectionStatus,\n ConnectedWifiStatus,\n Device,\n DeviceModel,\n EnabledHotspotStatus,\n GalleryStatusEvent,\n GlassesConnectionStatus,\n GlassesMediaVolumeGetResult,\n GlassesMediaVolumeSetResult,\n GlassesNotReadyEvent,\n HeadUpEvent,\n HotspotErrorEvent,\n HotspotStatus,\n HotspotStatusChangeEvent,\n GlassesSessionChangedEvent,\n KeepAliveAckEvent,\n LocalTranscriptionEvent,\n LogEvent,\n MicLc3Event,\n MicHealthEvent,\n MicMode,\n MicPcmEvent,\n MicPreference,\n OtaStartAckEvent,\n OtaProgress,\n OtaProgressStatus,\n OtaStage,\n OtaStatus,\n OtaStatusEvent,\n OtaQueryResult,\n OtaUpdateInfo,\n ReleaseChangelog,\n MtkUpdateCompleteEvent,\n PairFailureEvent,\n PairingInfoEvent,\n EnteringPairingModeEvent,\n OwnerReplacedEvent,\n PhotoCaptureMetadata,\n PhotoResolvedConfig,\n PhotoCompression,\n PhotoFpsRange,\n PhotoMeteredPreview,\n PhotoMode,\n PublicBluetoothStatus,\n PublicGlassesStatus,\n PhotoTransferMethod,\n PhotoResponseEvent,\n PhotoRequestedCaptureConfig,\n PhotoRequestParams,\n PhotoSize,\n PhotoStatusEvent,\n PhotoStatusState,\n PhotoSuccessResponseEvent,\n RgbLedAction,\n RgbLedColor,\n RgbLedControlResponseEvent,\n RgbLedControlSuccessResponseEvent,\n ScanModelOptions,\n ScanDiagnostic,\n ScanOptions,\n ScanResultsCallback,\n SpeakingStatusEvent,\n SettingsAckEvent,\n SettingsAckSetting,\n SettingsAckSuccessEvent,\n SettingsAckSuccessStatus,\n SettingsAckStatus,\n StreamAudioConfig,\n StreamResolvedConfig,\n StreamStartRequest,\n StreamStatusEvent,\n StreamStatusLifecycleState,\n StreamStatusReconnectState,\n StreamStatusState,\n StreamVideoConfig,\n SwipeVolumeStatusEvent,\n SwitchStatusEvent,\n TouchEvent,\n VideoRecordingDefaults,\n VideoRecordingStartedStatusEvent,\n VideoRecordingStatusEvent,\n VideoRecordingStatusState,\n VideoRecordingStoppedStatusEvent,\n VideoRecordingSuccessStatusEvent,\n VersionInfoEvent,\n VersionInfoResult,\n SavedWifiNetworksEvent,\n SavedWifiNetworksOutcome,\n SavedWifiNetworksResult,\n WifiForgetOutcome,\n WifiForgetResult,\n WifiForgetResultEvent,\n LegacyWifiForgetResultEvent,\n ModernWifiForgetResultEvent,\n WifiScanResultEvent,\n VoiceActivityDetectionStatusEvent,\n WifiSearchResult,\n WifiStatus,\n WifiStatusChangeEvent,\n} from \"./BluetoothSdk.types\"\n\nexport type {NativeNotificationConfig, NativeNotificationStatus, NativeNotificationDelivery} from \"./BluetoothSdk.types\"\n"]}
|
|
@@ -28,6 +28,8 @@ public class BluetoothSdkModule: Module, MentraBluetoothSDKDelegate {
|
|
|
28
28
|
"battery_status",
|
|
29
29
|
"wifi_status_change",
|
|
30
30
|
"wifi_scan_result",
|
|
31
|
+
"wifi_forget_result",
|
|
32
|
+
"saved_wifi_networks",
|
|
31
33
|
"hotspot_status_change",
|
|
32
34
|
"hotspot_error",
|
|
33
35
|
"photo_response",
|
|
@@ -327,6 +329,11 @@ public class BluetoothSdkModule: Module, MentraBluetoothSDKDelegate {
|
|
|
327
329
|
return try await sdk.requestWifiScan().map(\.dictionary)
|
|
328
330
|
}
|
|
329
331
|
|
|
332
|
+
AsyncFunction("getSavedWifiNetworks") {
|
|
333
|
+
let sdk = await MainActor.run { self.bluetoothSdk() }
|
|
334
|
+
return try await sdk.getSavedWifiNetworks().values
|
|
335
|
+
}
|
|
336
|
+
|
|
330
337
|
AsyncFunction("sendWifiCredentials") { (ssid: String, password: String) in
|
|
331
338
|
let sdk = await MainActor.run { self.bluetoothSdk() }
|
|
332
339
|
return try await sdk.sendWifiCredentials(ssid: ssid, password: password).values
|
|
@@ -549,12 +556,12 @@ public class BluetoothSdkModule: Module, MentraBluetoothSDKDelegate {
|
|
|
549
556
|
try await MainActor.run { try sdk.sendAr99FactoryReset() }
|
|
550
557
|
}
|
|
551
558
|
|
|
552
|
-
|
|
553
559
|
Function("buildAr99OtaSignature") { (secret: String, appName: String, currentVersion: String, serialNumber: String, nonce: String) in
|
|
554
560
|
let raw = secret + appName + "juxinOTA" + currentVersion + serialNumber.trimmingCharacters(in: .whitespacesAndNewlines) + nonce
|
|
555
561
|
let digest = Insecure.MD5.hash(data: Data(raw.utf8))
|
|
556
562
|
return digest.map { String(format: "%02x", $0) }.joined()
|
|
557
563
|
}
|
|
564
|
+
|
|
558
565
|
// MARK: - Version Info Commands
|
|
559
566
|
|
|
560
567
|
AsyncFunction("requestVersionInfo") {
|
|
@@ -971,4 +978,3 @@ private extension ConnectOptions {
|
|
|
971
978
|
)
|
|
972
979
|
}
|
|
973
980
|
}
|
|
974
|
-
|
|
@@ -11,7 +11,7 @@ enum BluetoothSdkDefaults {
|
|
|
11
11
|
static let voiceActivityDetectionEnabled = false
|
|
12
12
|
static let loudnessGateEnabled = false
|
|
13
13
|
private static let infoSdkVersionKey = "MentraBluetoothSdkVersion"
|
|
14
|
-
private static let swiftPackageSdkVersion = "3.2.0-dev.
|
|
14
|
+
private static let swiftPackageSdkVersion = "3.2.0-dev.203"
|
|
15
15
|
private static let swiftPackageSdkVersionPlaceholder = "__MENTRA" + "_BLUETOOTH_SDK_VERSION__"
|
|
16
16
|
|
|
17
17
|
private static func normalizedSdkVersion(_ value: String?) -> String? {
|
package/ios/Source/Bridge.swift
CHANGED
|
@@ -370,6 +370,8 @@ class Bridge {
|
|
|
370
370
|
var body: [String: Any] = [
|
|
371
371
|
"type": "version_info",
|
|
372
372
|
VersionInfoResponseAccumulator.responseChunkKey: responseChunk,
|
|
373
|
+
"versionInfoType": stringValue(values, "versionInfoType", "version_info_type") ?? "",
|
|
374
|
+
"sid": stringValue(values, "sid") ?? "",
|
|
373
375
|
"androidVersion": stringValue(values, "androidVersion", "android_version") ?? "",
|
|
374
376
|
"firmwareVersion": stringValue(values, "firmwareVersion", "firmware_version") ?? "",
|
|
375
377
|
"besFirmwareVersion": stringValue(values, "besFirmwareVersion", "bes_fw_version") ?? "",
|
|
@@ -404,6 +406,16 @@ class Bridge {
|
|
|
404
406
|
if let packageName = stringValue(values, "packageName", "package_name"), !packageName.isEmpty {
|
|
405
407
|
body["packageName"] = packageName
|
|
406
408
|
}
|
|
409
|
+
if let version = values["wifiForgetResultVersion"]
|
|
410
|
+
?? values["wifi_forget_result_version"]
|
|
411
|
+
{
|
|
412
|
+
body["wifiForgetResultVersion"] = version
|
|
413
|
+
}
|
|
414
|
+
if let version = values["savedWifiNetworksVersion"]
|
|
415
|
+
?? values["saved_wifi_networks_version"]
|
|
416
|
+
{
|
|
417
|
+
body["savedWifiNetworksVersion"] = version
|
|
418
|
+
}
|
|
407
419
|
Bridge.sendTypedMessage("version_info", body: body)
|
|
408
420
|
}
|
|
409
421
|
|
|
@@ -488,6 +500,57 @@ class Bridge {
|
|
|
488
500
|
Bridge.sendTypedMessage("wifi_status_change", body: body)
|
|
489
501
|
}
|
|
490
502
|
|
|
503
|
+
static func sendWifiForgetResult(
|
|
504
|
+
requestId: String,
|
|
505
|
+
sid: String,
|
|
506
|
+
ssid: String,
|
|
507
|
+
protocolVersion: Int,
|
|
508
|
+
outcome: String,
|
|
509
|
+
legacyDispatched: Bool?,
|
|
510
|
+
connected: Bool?,
|
|
511
|
+
currentSsid: String,
|
|
512
|
+
localIp: String,
|
|
513
|
+
error: String?
|
|
514
|
+
) {
|
|
515
|
+
guard let body = normalizeWifiForgetResultEvent(
|
|
516
|
+
requestId: requestId,
|
|
517
|
+
sid: sid,
|
|
518
|
+
ssid: ssid,
|
|
519
|
+
protocolVersion: protocolVersion,
|
|
520
|
+
outcome: outcome,
|
|
521
|
+
legacyDispatched: legacyDispatched,
|
|
522
|
+
connected: connected,
|
|
523
|
+
currentSsid: currentSsid,
|
|
524
|
+
localIp: localIp,
|
|
525
|
+
error: error
|
|
526
|
+
) else {
|
|
527
|
+
log("Dropping malformed wifi_forget_result without modern or legacy fields")
|
|
528
|
+
return
|
|
529
|
+
}
|
|
530
|
+
Bridge.sendTypedMessage("wifi_forget_result", body: body)
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
static func sendSavedWifiNetworks(
|
|
534
|
+
requestId: String,
|
|
535
|
+
sid: String,
|
|
536
|
+
protocolVersion: Int,
|
|
537
|
+
outcome: String,
|
|
538
|
+
networks: [String],
|
|
539
|
+
error: String?
|
|
540
|
+
) {
|
|
541
|
+
var body: [String: Any] = [
|
|
542
|
+
"requestId": requestId,
|
|
543
|
+
"sid": sid,
|
|
544
|
+
"protocolVersion": protocolVersion,
|
|
545
|
+
"outcome": outcome,
|
|
546
|
+
"networks": networks,
|
|
547
|
+
]
|
|
548
|
+
if let error {
|
|
549
|
+
body["error"] = error
|
|
550
|
+
}
|
|
551
|
+
Bridge.sendTypedMessage("saved_wifi_networks", body: body)
|
|
552
|
+
}
|
|
553
|
+
|
|
491
554
|
/// Claim the WiFi scan-results store for a newly requested scan. Called by the
|
|
492
555
|
/// SDK when it generates the scanId, BEFORE the scan command goes out: store
|
|
493
556
|
/// ownership is decided at request time, not by whichever chunk arrives first,
|
|
@@ -1510,6 +1510,10 @@ struct ViewState {
|
|
|
1510
1510
|
sgc?.requestWifiScan(scanId: scanId)
|
|
1511
1511
|
}
|
|
1512
1512
|
|
|
1513
|
+
@discardableResult func requestSavedWifiNetworks(requestId: String, sid: String) -> Bool {
|
|
1514
|
+
sgc?.requestSavedWifiNetworks(requestId: requestId, sid: sid) ?? false
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1513
1517
|
func sendIncidentId(_ incidentId: String, apiBaseUrl: String? = nil) {
|
|
1514
1518
|
Bridge.log("MAN: Sending incidentId to glasses for log upload: \(incidentId)")
|
|
1515
1519
|
sgc?.sendIncidentId(incidentId, apiBaseUrl: apiBaseUrl)
|
|
@@ -1520,9 +1524,8 @@ struct ViewState {
|
|
|
1520
1524
|
sgc?.sendWifiCredentials(ssid, password)
|
|
1521
1525
|
}
|
|
1522
1526
|
|
|
1523
|
-
func forgetWifiNetwork(_ ssid: String) {
|
|
1524
|
-
|
|
1525
|
-
sgc?.forgetWifiNetwork(ssid)
|
|
1527
|
+
@discardableResult func forgetWifiNetwork(_ ssid: String, requestId: String? = nil, sid: String? = nil) -> Bool {
|
|
1528
|
+
sgc?.forgetWifiNetwork(ssid, requestId: requestId, sid: sid) ?? false
|
|
1526
1529
|
}
|
|
1527
1530
|
|
|
1528
1531
|
func setHotspotState(_ enabled: Bool) {
|
|
@@ -2,6 +2,6 @@ import Foundation
|
|
|
2
2
|
|
|
3
3
|
/// Generated from /changelogs. Do not edit directly.
|
|
4
4
|
let generatedReleaseChangelogs: [ReleaseChangelog] = [
|
|
5
|
-
ReleaseChangelog(version: "3.2.0", markdown: "This release is under active development. User-facing changes will be documented as they land
|
|
5
|
+
ReleaseChangelog(version: "3.2.0", markdown: "This release is under active development. User-facing changes will be documented as they land.\n\n- Breaking Bluetooth SDK change: `forgetWifiNetwork(ssid)` now returns `WifiForgetResult` instead of `WifiStatusChangeEvent`. Migrate status-only consumers to the semantic `outcome`; the requested network remains `ssid`, while optional post-command connectivity is reported by `connected`, `currentSsid`, and `localIp`."),
|
|
6
6
|
ReleaseChangelog(version: "3.1.0", markdown: "Software updates are more reliable, with clearer progress and recovery when the glasses restart.\n\n- MentraOS, Mentra Engine, the Bluetooth SDK, and the glasses client now share one coordinated release version.\n- Mentra Live updates can continue across APK, system, and firmware restarts without asking the user to start the same update again.\n- Bluetooth photo capture and transfer diagnostics are more precise and less disruptive to normal glasses traffic."),
|
|
7
7
|
]
|
|
@@ -3,9 +3,9 @@ import Foundation
|
|
|
3
3
|
/// Generated by release CI. Do not edit in a release checkout.
|
|
4
4
|
enum GeneratedReleaseMetadata {
|
|
5
5
|
static let familyBaseVersion = "3.2.0"
|
|
6
|
-
static let releaseIdentity = "3.2.0-dev.
|
|
7
|
-
static let releaseSetId = "mentra-3.2.0-dev.
|
|
8
|
-
static let sourceCommit = "
|
|
9
|
-
static let otaManifestUrl = "https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.2.0/mentra-live-ota-3.2.0-dev.
|
|
10
|
-
static let otaManifestSha256 = "
|
|
6
|
+
static let releaseIdentity = "3.2.0-dev.203"
|
|
7
|
+
static let releaseSetId = "mentra-3.2.0-dev.203"
|
|
8
|
+
static let sourceCommit = "7eb4deefff27d498c2b4562d628607f399aa1f40"
|
|
9
|
+
static let otaManifestUrl = "https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.2.0/mentra-live-ota-3.2.0-dev.203.json"
|
|
10
|
+
static let otaManifestSha256 = "0ae026238c8e70970be4e181cc1ae73dd905418292edebddb610012f4f0a9b6f"
|
|
11
11
|
}
|