Download mobile/modules/bluetooth-sdk/src/ota-server/MentraOtaServerModule.ts from Anirudh1950/MentraOS: direct link, hf CLI and curl.
- Browser
- Download file 1.13 kB
-
https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/modules/bluetooth-sdk/src/ota-server/MentraOtaServerModule.ts
- Command line
-
hf download hf://Anirudh1950/MentraOS/mobile/modules/bluetooth-sdk/src/ota-server/MentraOtaServerModule.ts
-
curl -L -o MentraOtaServerModule.ts https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/modules/bluetooth-sdk/src/ota-server/MentraOtaServerModule.ts
1.13 kB
| import {NativeModule, requireNativeModule} from "expo" | |
| import type {MentraOtaServerModuleEvents, OtaServerResult} from "./MentraOtaServer.types" | |
| declare class MentraOtaServerModule extends NativeModule<MentraOtaServerModuleEvents> { | |
| /** | |
| * Serve `manifestJson` at /version.json and `artifactPaths` (sha256 -> local file path) | |
| * at /artifacts/<sha256>. Pass `host` when the caller knows the authoritative local | |
| * address (e.g. from the scoped hotspot network); omit to fall back to interface | |
| * scanning. Returns the URLs to hand to the glasses via ota_start. | |
| */ | |
| startOtaServer( | |
| manifestJson: string, | |
| artifactPaths: Record<string, string>, | |
| host?: string | null, | |
| ): Promise<OtaServerResult> | |
| stopOtaServer(): Promise<void> | |
| /** Wait for iPhone Wi-Fi (`en0`) to acquire an address on the glasses gateway subnet. */ | |
| waitForWifiAddress(gateway: string, timeoutMs: number): Promise<string> | |
| downloadArtifact(source: string, destination: string): Promise<{statusCode: number; bytesWritten: number}> | |
| } | |
| export default requireNativeModule<MentraOtaServerModule>("MentraOtaServer") | |