omi-firmware-patterns
Firmware C C++ BLE services audio codecs Opus PCM Mu-law nRF ESP32 Zephyr Arduino embedded systems
Install
mkdir -p .claude/skills/omi-firmware-patterns && curl -L -o skill.zip "https://mcp.directory/api/skills/download/1085" && unzip -o skill.zip -d .claude/skills/omi-firmware-patterns && rm skill.zipInstalls to .claude/skills/omi-firmware-patterns
About this skill
Omi Firmware Patterns Skill
This skill provides guidance for working with Omi firmware, including BLE services, audio codecs, and device communication.
When to Use
Use this skill when:
- Working on firmware code in
omi/oromiGlass/ - Implementing BLE services
- Working with audio codecs (Opus, PCM, Mu-law)
- Debugging device communication issues
Key Patterns
BLE Services
Audio Streaming Service
UUID: 19B10000-E8F2-537E-4F6C-D104768A1214
Characteristics:
- Audio Data:
19B10001-E8F2-537E-4F6C-D104768A1214 - Codec Type:
19B10002-E8F2-537E-4F6C-D104768A1214
Standard Services
- Battery Service:
0x180F(standard) - Device Information Service:
0x180A(standard)
Audio Packet Format
Header (3 bytes):
- Bytes 0-1: Packet number (little-endian, 0-65535)
- Byte 2: Index (position within packet)
Payload:
- 160 audio samples per packet
- Format depends on codec type
Fragmentation: If packet exceeds BLE MTU - 3 bytes, split across multiple notifications
Codec Types
0: PCM 16-bit, 16 kHz, mono1: PCM 16-bit, 8 kHz, mono10: Mu-law, 16 kHz, 8-bit mono11: Mu-law, 8 kHz, 8-bit mono20: Opus, 16 kHz, 16-bit mono (default since v1.0.3)
Zephyr RTOS (Omi Device)
BLE Service Definition
BT_GATT_SERVICE_DEFINE(audio_svc,
BT_GATT_PRIMARY_SERVICE(BT_UUID_AUDIO_SERVICE),
BT_GATT_CHARACTERISTIC(BT_UUID_AUDIO_DATA,
BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY,
BT_GATT_PERM_READ,
read_audio_data, NULL, NULL),
);
Audio Packet Sending
void send_audio_packet(audio_packet_t *packet) {
uint8_t buffer[3 + sizeof(packet->audio_data)];
// Header
buffer[0] = packet->packet_number & 0xFF;
buffer[1] = (packet->packet_number >> 8) & 0xFF;
buffer[2] = packet->index;
// Audio data
memcpy(&buffer[3], packet->audio_data, sizeof(packet->audio_data));
// Send via BLE notification
bt_gatt_notify(conn, &audio_char, buffer, sizeof(buffer));
}
ESP32-S3 (Omi Glass)
Arduino Framework
BLEService *pService = pServer->createService(SERVICE_UUID);
BLECharacteristic *pChar = pService->createCharacteristic(
AUDIO_DATA_UUID,
BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_NOTIFY
);
Common Tasks
Adding a New BLE Characteristic
- Define UUID
- Add to service definition
- Implement read/write/notify callbacks
- Handle data format correctly
Implementing Audio Codec
- Initialize codec encoder
- Encode audio samples
- Format as packet with header
- Send via BLE notification
Debugging BLE Issues
- Check service/characteristic UUIDs
- Verify packet format (header + payload)
- Check MTU size and fragmentation
- Verify codec type negotiation
Related Documentation
The docs/ folder is the single source of truth for all user-facing documentation, deployed at docs.omi.me.
- BLE Protocol:
docs/doc/developer/Protocol.mdx- View online - Firmware Compilation:
docs/doc/developer/firmware/Compile_firmware.mdx- View online - Hardware Docs:
docs/doc/hardware/- View online - Firmware Architecture:
.cursor/rules/firmware-architecture.mdc
Related Cursor Resources
Rules
.cursor/rules/firmware-architecture.mdc- Firmware system architecture.cursor/rules/firmware-ble-service.mdc- BLE service implementation.cursor/rules/firmware-audio-codecs.mdc- Audio codec implementation.cursor/rules/flutter-ble-protocol.mdc- Flutter BLE integration
Subagents
.cursor/agents/firmware-engineer/- Uses this skill for firmware development.cursor/agents/flutter-developer/- Uses this skill for BLE integration
Commands
/flutter-setup- Uses this skill for firmware setup
More by BasedHardware
View all skills by BasedHardware →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
pdf-to-markdown
aliceisjustplaying
Convert entire PDF documents to clean, structured Markdown for full context loading. Use this skill when the user wants to extract ALL text from a PDF into context (not grep/search), when discussing or analyzing PDF content in full, when the user mentions "load the whole PDF", "bring the PDF into context", "read the entire PDF", or when partial extraction/grepping would miss important context. This is the preferred method for PDF text extraction over page-by-page or grep approaches.
Related MCP Servers
Browse all serversSupercharge browser tasks with Browser MCP—AI-driven, local browser automation for powerful, private testing. Inspired b
Find official MCP servers for Google Maps. Explore resources to build, integrate, and extend apps with Google directions
Explore official Google BigQuery MCP servers. Find resources and examples to build context-aware apps in Google's ecosys
Explore MCP servers for Google Compute Engine. Integrate model context protocol solutions to streamline GCE app developm
Explore Google Kubernetes Engine (GKE) MCP servers. Access resources and examples for context-aware app development in G
Catalog of official Microsoft MCP server implementations. Access Azure, Microsoft 365, Dynamics 365, Power Platform, and
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.