Comprehensive SDKs for controlling HeyCyan smart glasses via Bluetooth Low Energy (BLE).
- iOS: Full SDK available with demo application (see
ios/directory) - Android: Full SDK available with demo application (see
android/directory)
This repository provides SDKs for developers to integrate HeyCyan smart glasses functionality into their applications. The glasses support photo capture, video recording, audio recording, and AI-powered image generation.
- Bluetooth LE Scanning: Discover nearby HeyCyan glasses
- Connection Management: Connect/disconnect and manage device state
- Device Information: Retrieve hardware/firmware versions and MAC address
- Photo Capture: Remote shutter control for taking photos
- Video Recording: Start/stop video recording with status tracking
- Audio Recording: Start/stop audio recording with status tracking
- AI Image Generation: Trigger AI-powered image creation and receive generated images
- Battery Status: Real-time battery level and charging state
- Media Counts: Track number of photos, videos, and audio files on device
- Time Synchronization: Set device time to match iOS device
- iOS 11.0+
- Xcode 12.0+
- Swift 5.0+ or Objective-C
- Physical iOS device (Bluetooth not supported in simulator)
- Clone or download this repository
- Open
QCSDKDemo.xcodeprojin Xcode - Build and run on a physical iOS device
- Import the SDK
#import <QCSDK/QCSDK.h>- Initialize SDK Manager
[QCSDKManager shareInstance].delegate = self;- Scan for Devices
[[QCCentralManager shared] scan];- Connect to Device
[[QCCentralManager shared] connect:peripheral];- Control Device
// Take a photo
[QCSDKCmdCreator setDeviceMode:QCOperatorDeviceModePhoto
success:^{ NSLog(@"Photo taken"); }
fail:^(NSInteger mode) { NSLog(@"Failed"); }];
// Get battery status
[QCSDKCmdCreator getDeviceBattery:^(NSInteger battery, BOOL charging) {
NSLog(@"Battery: %ld%%, Charging: %@", battery, charging ? @"YES" : @"NO");
} fail:^{ NSLog(@"Failed to get battery"); }];- Singleton instance for SDK management
- Handles device data updates via delegate callbacks
Key methods:
getDeviceVersionInfo- Get hardware/firmware versionsgetDeviceMacAddress- Get device MAC addresssetupDeviceDateTime- Sync device timegetDeviceBattery- Get battery level and charging statusgetDeviceMedia- Get media file countssetDeviceMode- Control device operations (photo/video/audio)
QCOperatorDeviceModePhoto- Take photoQCOperatorDeviceModeVideo- Start video recordingQCOperatorDeviceModeVideoStop- Stop video recordingQCOperatorDeviceModeAudio- Start audio recordingQCOperatorDeviceModeAudioStop- Stop audio recordingQCOperatorDeviceModeAIPhoto- Generate AI image
The included demo application demonstrates all SDK features:
- Search Screen: Scan and list available devices
- Feature Screen: Control connected device with options for:
- Version information retrieval
- Time synchronization
- Battery status monitoring
- Media count tracking
- Photo/video/audio capture
- AI image generation
Add to your app's Info.plist:
<key>NSBluetoothAlwaysUsageDescription</key>
<string>This app needs Bluetooth to connect to HeyCyan glasses</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>This app needs Bluetooth to communicate with HeyCyan glasses</string>This SDK encapsulates the proprietary BLE communication protocol for HeyCyan glasses. Without this SDK, developers would need to reverse-engineer the following:
- Primary Service UUID:
7905FFF0-B5CE-4E99-A40F-4B1E122D00D0 - Secondary Service UUID:
6e40fff0-b5a3-f393-e0a9-e50e24dcca9e - QCSDKSERVERUUID1: Internal service identifier
- QCSDKSERVERUUID2: Internal service identifier
- Command Characteristic: Write characteristic for device commands
- Notification Characteristic: For receiving device responses and status updates
- Data Transfer Characteristic: For large data transfers (AI images)
Each command follows a specific byte format:
- Header: Command identifier bytes
- Payload: Command-specific data
- Checksum: Validation bytes
- Acknowledgment: Required response format
- Take Photo:
QCOperatorDeviceModePhotocommand with specific byte encoding - Battery Status: Request/response with battery level (0-100) and charging flag
- AI Image Transfer:
QCOperatorDeviceModeAIPhototriggers multi-packet protocol - Version Info: Returns hardware version, firmware version, WiFi hardware/firmware versions
- Media Counts: Returns photo count, video count, audio count as integers
- Video Control:
QCOperatorDeviceModeVideo/QCOperatorDeviceModeVideoStop - Audio Control:
QCOperatorDeviceModeAudio/QCOperatorDeviceModeAudioStop
- Initial pairing sequence
- Session establishment protocol
- Keep-alive requirements
- Disconnection handling
- Battery Level: NSInteger (0-100) with BOOL charging flag
- Media Counts: NSInteger values for photo, video, audio counts
- Timestamp Format: Uses iOS device time via
setupDeviceDateTime - Image Data: NSData chunks received via
didReceiveAIChatImageDatadelegate - MAC Address: String format returned by
getDeviceMacAddress - Version Strings: Multiple version fields (hardware, firmware, WiFi versions)
- Connection States:
QCStateUnbind,QCStateConnecting,QCStateConnected,QCStateDisconnecting,QCStateDisconnected - Bluetooth States: Via
QCBluetoothStateenum - Recording States: Tracked via
recordingVideoandrecordingAudioflags - Mode Restrictions: Cannot record video and audio simultaneously
- Delegate Callbacks:
QCSDKManagerDelegatefor battery, media updates, AI image data - Error Handling: Fail blocks return current device mode on mode switch failures
Without this SDK, implementing device communication would require:
- BLE packet sniffing during device operations
- Reverse-engineering command structures through trial and error
- Implementing proper error handling for undocumented states
- Managing complex multi-packet data transfers
- Handling device-specific quirks and timing requirements
- Cannot find devices: Ensure Bluetooth is enabled and glasses are in pairing mode
- Connection fails: Check if glasses are already connected to another device
- Commands fail: Ensure device is connected and not in use by another operation
This SDK is proprietary software. Contact HeyCyan for licensing information.
main- Current development branch with improvements and modificationsmanufacturer-original- Preserved original SDK from manufacturer (unmodified baseline)
For more detailed technical information, see our GitHub issues:
- Issue #1: Convert Objective-C SDK to Swift Library - Comprehensive guide for creating a modern Swift wrapper with async/await, Combine, and SwiftUI support
- Issue #2: Complete Device I/O Documentation - Exhaustive documentation of every input/output operation with exact code examples and expected responses
For technical support or questions about the SDK, please contact the HeyCyan development team.