Skip to main content

Mentra Live Development Guide

This guide covers working with Mentra Live smart glasses, the primary device running ASG Client.

Device Overview

Mentra Live (K900) specifications:
  • OS: Custom Android build
  • Connectivity: WiFi 802.11 b/g/n, Bluetooth 5.0 LE
  • Camera: 1080p photo/video capability
  • ADB: WiFi only (no USB ADB support)
  • MCU: Integrated microcontroller for hardware control

Setup

Prerequisites

  1. Development Machine
    • Android Studio with Java SDK 17
    • ADB tools installed
    • Same WiFi network as glasses
  2. Mobile Device
    • MentraOS app installed
    • Bluetooth enabled
    • Same WiFi network as glasses

Initial Pairing

  1. Turn on Mentra Live - Press and hold power button
  2. Open MentraOS app on your phone
  3. Start pairing - Follow in-app instructions
  4. Connect to WiFi - Use app to configure network

ADB Connection

Mentra Live only supports ADB over WiFi. Here’s how to connect:

Finding the IP Address

  1. Open MentraOS app
  2. Go to “Glasses” screen
  3. Look for “Local IP Address”
  4. Note this IP (e.g., 192.168.1.123)

Connecting via ADB

Connection Troubleshooting

If connection fails:

Development Workflow

Building and Installing

Local Server Development

For testing with local MentraOS server:

Viewing Logs

Hardware Features

Button Commands

The MCU sends these commands for button presses:

LED Indicators

  • Blue blinking: Bluetooth advertising
  • Blue solid: Bluetooth connected
  • Red blinking: Low battery
  • Green: Charging

Camera Access

The camera is accessed through CameraNeo API:

Debugging Tips

Common Issues

  1. Can’t connect ADB
    • Ensure same WiFi network
    • Check IP is current in app
    • Restart glasses if needed
  2. App crashes on launch
    • Check logcat for errors
    • Verify permissions granted
    • Clear app data and retry
  3. Camera not working
    • Check camera permissions
    • Ensure no other app using camera
    • Restart ASG Client service

Useful Commands

Performance Optimization

Battery Life

  • Minimize WiFi scanning
  • Use efficient image compression
  • Implement proper wake locks
  • Stop services when not needed

Memory Usage

  • Monitor with: adb shell dumpsys meminfo com.mentra.asg_client
  • Release resources promptly
  • Use appropriate image sizes
  • Clear caches periodically

Thermal Management

  • Monitor device temperature
  • Throttle intensive operations
  • Add delays between captures
  • Stop streaming if overheating

Factory Reset

If needed, factory reset via:
  1. Settings UI (if accessible on device)
  2. MentraOS app → Settings → Factory Reset
  3. Hardware buttons (see device manual)

Development Best Practices

  1. Always test on device - Emulator won’t have MCU
  2. Monitor battery - Development drains faster
  3. Use stable WiFi - Connection drops interrupt ADB
  4. Handle offline - Glasses often lose connectivity
  5. Test permissions - Camera, storage, network
  6. Log extensively - Helps debug remote issues