OpenClaw → Even Realities G2 smart glasses bridge.
Expo/React Native iOS app that receives messages from OpenClaw (via Telegram webhook on clawdbot) and pushes them to Even G2 glasses over BLE using the reverse-engineered protocol. Also supports voice recording, transcription, and sending messages back to Telegram.
┌──────────────┐ Telegram ┌──────────────┐ WebSocket ┌──────────────┐ BLE ┌──────────┐
│ Harbinger │ ──────────► │ clawdbot │ ───────────► │ G2Bridge │ ──────►│ Even G2 │
│ (OpenClaw) │ │ VPS bridge │ │ iOS App │ │ Glasses │
└──────────────┘ └──────────────┘ └──────────────┘ └──────────┘
100.77.111.100 iPhone BLE
▲ │
│ Voice msg │
└────────────────────────────┘
POST /api/g2/transcribe
POST /api/g2/telegram
| Gesture | Source | Action |
|---|---|---|
| Long press | G2 touchpad / R1 Ring | Toggle display on/off (wake/sleep) |
| Double tap | G2 touchpad / R1 Ring / App button | Start audio recording |
| Double tap (while recording) | G2 touchpad / R1 Ring / App button | Stop recording → transcribe → send to Telegram |
The app uses a hybrid gesture system:
- BLE notifications — All notifications from the G2 glasses on the CHAR_NOTIFY characteristic are passed through a gesture classifier. Known patterns are mapped to actions; unknown patterns are logged for future reverse-engineering.
- On-screen buttons — The app has a large mic button that mirrors the double-tap behavior (tap to start recording, tap again to stop and send).
- Display wake toggle — A switch on the main screen sends wake/sleep packets to the G2 display.
Note: The G2 touchpad gesture BLE notification format isn't fully reverse-engineered yet. The classifier includes educated guesses based on the protocol structure. All unknown notifications are logged so we can decode new gesture patterns over time.
- BLE connection to G2 glasses (react-native-ble-plx)
- WebSocket client to receive messages from bridge server
- Teleprompter protocol for display rendering
- Audio recording (expo-av) with transcription
- Haptic feedback (expo-haptics) on gestures
- Gesture detection from BLE notifications
- Background BLE mode
- Express server with WebSocket
- Receives webhook POSTs from OpenClaw
- Pushes messages to connected iOS app clients
- Audio transcription endpoint (Whisper-ready)
- Telegram send endpoint
- Ported from i-soxi/even-g2-protocol
- CRC-16/CCITT, varint encoding, packet builder
- Auth handshake, teleprompter service, display config
- Display wake/sleep commands
cd server
npm install
node index.js # Runs on port 3847cd app
npm install
npx expo prebuild --platform ios
npx expo run:ios # Requires dev build (no Expo Go — BLE needs native modules)cd app
npx eas build --profile development --platform ios| Method | Path | Description |
|---|---|---|
POST |
/api/g2/push |
Receive message from OpenClaw webhook |
POST |
/api/g2/transcribe |
Upload audio file for Whisper transcription |
POST |
/api/g2/telegram |
Send text to Telegram channel |
GET |
/api/g2/health |
Health check (clients, uptime) |
GET |
/api/g2/latest |
Poll latest message |
GET |
/api/g2/history |
Message history |
WS |
/ws |
WebSocket for real-time push to iOS app |
| Variable | Required | Description |
|---|---|---|
PORT |
No | Server port (default: 3847) |
G2_AUTH_TOKEN |
No | Shared secret for webhook auth |
OPENAI_API_KEY |
No | OpenAI API key for Whisper transcription |
TELEGRAM_BOT_TOKEN |
No | Telegram bot token for sending messages |
TELEGRAM_CHAT_ID |
No | Telegram chat ID to send messages to |
- BLE Service UUID:
00002760-08c2-11e1-9073-0e8ac72e0000 - Write Characteristic:
...5401 - Notify Characteristic:
...5402 - Display: 25 chars × 10 lines per page, min 14 pages
- Auth: 7-packet handshake, no PIN required
- Display Wake: service
0x04-20, payload0x08 0x01 - Display Sleep: service
0x04-20, payload0x08 0x00
- Wire up Whisper API on server (uncomment in index.js, set OPENAI_API_KEY)
- Wire up Telegram bot API on server (uncomment in index.js, set tokens)
- Decode more G2 BLE gesture notification patterns from logged data
- Add R1 ring gesture support (separate BLE connection)
- Background recording support
- Push notifications for urgent messages