- Scan for a supported glasses model.
- Connect to a discovered
Deviceor an app-restored default device. - Read typed lifecycle state through the public surface for your platform.
- Subscribe to typed hardware events.
- Send display, camera, stream, audio, Wi-Fi, hotspot, LED, and settings commands where supported by the connected model.
Packages And Imports
| Platform | Install package | Import |
|---|---|---|
| Android | com.mentra:bluetooth-sdk | import com.mentra.bluetoothsdk.* |
| iOS | MentraBluetoothSDK CocoaPod | import MentraBluetoothSDK |
| React Native / Expo | @mentra/bluetooth-sdk | import BluetoothSdk, {DeviceModels} from '@mentra/bluetooth-sdk' |
| React Native hooks | @mentra/bluetooth-sdk | import {useMentraBluetooth} from '@mentra/bluetooth-sdk/react' |
Lifecycle
- React Native
- Android
- iOS
Connection
- React Native
- Android
- iOS
Device returned by SDK scan callbacks. If your app wants connectDefault() to work after restart, persist a small default-device record in app storage and restore it with setDefaultDevice() before calling connectDefault().
Use scan() for user-facing device pickers. The progressive result callback is for UI: render the nearby-device list every time it changes during scanning. The returned final result is for control flow: after the timeout/completion, choose a device from the last list and connect. In multi-device environments, do not auto-connect to the first nearby glasses; present an explicit picker.
Device Identity
Device.id is the stable app-facing key for a scan result, within the limits of the platform identifier available to the SDK. Use it as a list key, selected-device key, and persisted default-device key.
Do not parse id for model, name, or address information. Use the typed fields instead:
| Field | Meaning |
|---|---|
model | Supported glasses family, such as Mentra Live or G2. |
name | Bluetooth/display name reported during scan. |
address / identifier | Platform device handle when available. Android commonly provides a Bluetooth address. iOS commonly provides a CoreBluetooth identifier. React Native exposes this value as address. |
rssi | Optional signal strength from scan results. It may be undefined at first discovery and appear in a later scan update when the platform reports RSSI metadata. |
model:name key.
Do not require rssi for picker rows. Use SDK-provided stable discovery order by default, and treat RSSI as supplemental signal-strength metadata when it is present.
Status
- React Native
- Android
- iOS
mentra.glasses.connection as a discriminated union:mentra.glasses.connection.state for link-layer progress. fullyBooted only exists when state === 'connected'. The hook exposes the React app state as glasses, sdk, and scan.| Field | Meaning |
|---|---|
glasses | Connected-glasses runtime state. Includes connection/readiness, connected device identity, battery, firmware, Wi-Fi, hotspot, and signal metadata when connected. |
sdk | Phone-side SDK runtime state. Includes default device, gallery mode, microphone route, mic ranking, Wi-Fi scan results, scan activity, system mic availability, other Bluetooth audio status, and recent SDK log lines. |
scan | User-facing scan state. Includes whether a scan is active, whether controller scanning is active, and the stable-order discovered Device[] list. |
glasses.connected / mentra.glasses.connected before reading connected-only fields. Native Android uses GlassesRuntimeState.Connected; native iOS uses GlassesRuntimeState.connected(...); React Native exposes mentra.glasses with the same grouped concepts in React-friendly objects.
React Native Public Surface
These are the supported React Native app developer entrypoints:| Area | Methods |
|---|---|
| Status and subscriptions | useMentraBluetooth, useBluetoothScan, and useBluetoothEvent for React components; addListener is available as the lower-level non-React subscription API |
| Default device | getDefaultDevice, setDefaultDevice, clearDefaultDevice |
| Connection | scan, startScan, stopScan, connect, connectDefault, cancelConnectionAttempt, disconnect, forget |
| Display | displayText, clearDisplay, showDashboard, setDashboardPosition, setHeadUpAngle, setScreenDisabled |
| Wi-Fi and hotspot | requestWifiScan, sendWifiCredentials, forgetWifiNetwork, setHotspotState |
| Camera and gallery | requestPhoto, queryGalleryStatus, setGalleryMode, setButtonPhotoSettings, setButtonVideoRecordingSettings, setButtonCameraLed, setButtonMaxRecordingTime, setCameraFov, startVideoRecording, stopVideoRecording |
| Streaming | startStream, keepStreamAlive, stopStream |
| Audio | setMicState, setPreferredMic, setOwnAppAudioPlaying, getGlassesMediaVolume, setGlassesMediaVolume |
| LED and version | rgbLedControl, requestVersionInfo |
DeviceModels, isConnectedGlassesConnectionStatus, isReadyGlassesConnectionStatus, isBusyGlassesConnectionStatus, isConnectedWifiStatus, and isEnabledHotspotStatus. The React subpath exports useMentraBluetooth, useBluetoothScan, and useBluetoothEvent.
For React Native status UI, use useMentraBluetooth() from @mentra/bluetooth-sdk/react. It returns mentra.glasses, mentra.sdk, and mentra.scan for connection, battery, Wi-Fi, hotspot, scan, and SDK runtime state.
Important defaults:
scan(model, options)reports progressive results throughoptions.onResults, resolves with the final matchingDevice[], and times out after 15 seconds unlessoptions.timeoutMsis set.connectandconnectDefaultdefaultsaveAsDefaultandcancelExistingConnectionAttempttotrue.displayText(text, x, y, size)defaults tox = 0,y = 0, andsize = 24.setMicState(enabled)defaults to glasses microphone on, VAD bypass on, transcript events off, and LC3 events off. VAD means Voice Activity Detection; passbypassVad=falseonly when you want speech-detected microphone events instead of continuous PCM.requestPhoto(..., authToken, ...)omits theAuthorizationheader whenauthTokenisnullor empty.startStreamoptionalvideoandaudioconfigs are omitted unless supplied, so the connected glasses use their model defaults.- Photo capture, video recording, and streaming always enable the camera light as a privacy indicator.
Common Commands
| Area | Commands |
|---|---|
| Display | displayText, clearDisplay, showDashboard |
| Connection | scan, startScan, stopScan, connect, connectDefault, disconnect, forget |
| Wi-Fi and hotspot | requestWifiScan, sendWifiCredentials, forgetWifiNetwork, setHotspotState |
| Camera | requestPhoto, button photo settings, button video settings, camera field of view |
| Streaming | startStream, keepStreamAlive, stopStream |
| Audio | setMicState, audio callbacks, local transcription, media volume |
| Settings | Brightness, dashboard position, head-up angle, screen disabled, gallery mode |
| LEDs | rgbLedControl on supported glasses |
| System | requestVersionInfo |
Events
React Native components should useuseBluetoothEvent() for hardware events. The hook keeps the callback typed and removes the native subscription when the component unmounts. Native apps receive the same event categories through listener/delegate methods:
- React Native
- Android
- iOS
BluetoothSdk.addListener(...) is the low-level subscription API. Keep the returned subscription and call remove() when the listener is no longer needed.
The React Native event surface is typed through BluetoothSdkEventMap. These are the public event names accepted by useBluetoothEvent() and BluetoothSdk.addListener():
| Event name | Payload type | When it fires |
|---|---|---|
log | LogEvent | SDK diagnostic log line. |
device_discovered | Device | A supported glasses device is discovered during scan. |
default_device_changed | {device?: Device} | The SDK default device changes. |
glasses_not_ready | GlassesNotReadyEvent | A command needs ready glasses but the connected device is not ready. |
button_press | ButtonPressEvent | Glasses button press. |
touch_event | TouchEvent | Glasses touch or swipe gesture. |
head_up | HeadUpEvent | Head-up state changes. |
vad_status | VadStatusEvent | Voice Activity Detection state changes. |
battery_status | BatteryStatusEvent | Battery update from glasses. |
local_transcription | LocalTranscriptionEvent | SDK local transcription text update. |
wifi_status_change | WifiStatusChangeEvent | Glasses Wi-Fi connection state changes. |
hotspot_status_change | HotspotStatusChangeEvent | Glasses hotspot state changes. |
hotspot_error | HotspotErrorEvent | Hotspot operation fails. |
photo_response | PhotoResponseEvent | Photo request succeeds or fails. |
gallery_status | GalleryStatusEvent | Gallery content/camera-busy status changes. |
compatible_glasses_search_stop | CompatibleGlassesSearchStopEvent | Compatible-glasses search stops for a model. |
swipe_volume_status | SwipeVolumeStatusEvent | Swipe-volume setting changes. |
switch_status | SwitchStatusEvent | Glasses switch status changes. |
rgb_led_control_response | RgbLedControlResponseEvent | RGB LED command succeeds or fails. |
pair_failure | PairFailureEvent | Bluetooth pairing fails. |
audio_pairing_needed | AudioPairingNeededEvent | The phone needs Bluetooth audio pairing for the device. |
audio_connected | AudioConnectedEvent | Bluetooth audio connects. |
audio_disconnected | AudioDisconnectedEvent | Bluetooth audio disconnects. |
mic_pcm | MicPcmEvent | PCM microphone frame arrives. |
mic_lc3 | MicLc3Event | LC3 microphone frame arrives. |
stream_status | StreamStatusEvent | Camera stream lifecycle, reconnect, or error state changes. |
keep_alive_ack | KeepAliveAckEvent | Glasses acknowledge a stream keep-alive request. |
useBluetoothEvent('photo_response', ...) receives a PhotoResponseEvent, while useBluetoothEvent('mic_pcm', ...) receives a MicPcmEvent. MicPcmEvent includes sampleRate, bitsPerSample, channels, encoding, and vadGated; MicLc3Event includes sampleRate, channels, encoding, frameDurationMs, frameSizeBytes, bitrate, packetizedFromGlasses, and vadGated.
Public React Native event payload fields use camelCase. For example, touch events expose deviceModel and gestureName, successful photo responses expose uploadUrl, hotspot errors expose errorMessage, and gallery status exposes hasContent and cameraBusy.
Android and iOS expose typed callbacks/delegate methods instead of the React Native string event API. Android uses MentraBluetoothSdkListener methods such as onStateChanged, onGlassesChanged, onSdkStateChanged, onScanChanged, onDeviceDiscovered, onButtonPress, onPhotoResponse, onMicPcm, and onStreamStatus. iOS uses MentraBluetoothSDKDelegate methods such as mentraBluetoothSDK(_:didUpdate:), mentraBluetoothSDK(_:didUpdateGlasses:), mentraBluetoothSDK(_:didUpdateSdkState:), mentraBluetoothSDK(_:didUpdateScan:), mentraBluetoothSDK(_:didDiscover:), mentraBluetoothSDK(_:didReceive:), mentraBluetoothSDK(_:didReceiveMicPcm:), and mentraBluetoothSDK(_:didReceiveMicLc3:). Microphone audio callbacks use MicPcmEvent and MicLc3Event objects with the same metadata as React Native.
| Event area | Examples |
|---|---|
| Input | Button press, touch, swipe, head-up |
| Device state | Battery, case, Wi-Fi, hotspot, connection, RSSI |
| Camera | Photo request result, gallery state, camera settings |
| Streaming | Stream initializing, active, stopped, error |
| Audio | Microphone PCM, LC3, local transcription, audio route state |
| Diagnostics | SDK log events |
Version Fields
CallrequestVersionInfo() after connection when your app wants the glasses to refresh version metadata. Updated values arrive through the normal glasses-status callback and are also available in the next status snapshot.
| Field | Meaning |
|---|---|
firmwareVersion | Generic glasses firmware version when the connected model reports one. |
deviceFirmwareVersion | Device firmware version for models that report device info as a structured payload. |
leftFirmwareVersion / rightFirmwareVersion | Per-side firmware versions for glasses that report left/right firmware separately. |
besFirmwareVersion | Mentra Live BES firmware version. |
mtkFirmwareVersion | Mentra Live MTK/system OTA firmware version. |
appVersion | Glasses-side companion app version. On Mentra Live this is the ASG client APK version, not firmware. |
androidVersion | Android OS version on Android-based glasses. This is not firmware. |

