[go: up one dir, main page]

Skip to content

even-realities/EvenDemoApp

Repository files navigation

Even AI Demo

The general process of the Even AI function is as follows: After the app and glasses are connected via dual Bluetooth, long press the left-side TouchBar on the glasses to enter the Even AI activation state. At this point, the app will receive the [0xF5, 0x17] command from the glasses. The app then needs to send a command [0x0E, 0x01] to the glasses to activate the right-side microphone for recording. Once the microphone is successfully activated, the app will receive a real-time audio stream in LC3 format. Keep pressing until speaking is finished, the maximum supported recording duration is 30 seconds. After the recording is finished, the app needs to convert the audio stream into text, which is then sent to the large model for a response. After the app successfully obtains the response from the large model, it can send the result to the glasses according to the Bluetooth protocol. By default, the result is transmitted automatically, page by page. During transmission, a single tap on the TouchBar will switch to manual mode, with the left-side TouchBar used for page-up and the right-side TouchBar for page-down. A double-tap on the TouchBar will directly exit the Even AI function.

G1’s Dual Bluetooth communication is unique, each arm corresponds to a separate BLE connection. During communication, unless the protocol specifies sending data to only one side (e.g., microphone activation to the right), the app should:

  • First send data to the left side.
  • Then send data to the right side after receiving a successful acknowledgment from the left. Also, consider the glasses' display width limitation: during the Even AI function, the maximum width is 488 pixels, with eac

Protocol

Start Even AI

Command Information

  • Command: 0xF5
    • subcmd (Sub-command): 0~255
    • param (Parameters): Specific parameters associated with each sub-command.

Sub-command Descriptions

  • subcmd: 0 (exit to dashboard manually).
    • Description: Stop all advanced features and return to the dashboard.
  • subcmd: 1 (page up/down control in manual mode).
    • Description: page-up(left ble) / page-down (right ble)
  • subcmd: 23 (start Even AI).
    • Description: Notify phone to activate Even AI.
  • subcmd: 24 (stop Even AI recording).
    • Description: Even AI recording ended.

Open Glasses Mic

Command Information

  • Command: 0x0E
  • enable:
    • 0 (Disable) / 1 (Enable)

Description

  • enable:
    • 0: Disable the MIC (turn off sound pickup).
    • 1: Enable the MIC (turn on sound pickup).

Response from Glasses

  • Command: 0x0E
  • rsp_status (Response Status):
    • 0xC9: Success
    • 0xCA: Failure
  • enable:
    • 0: MIC disabled.
    • 1: MIC enabled.

Example

  • Command sent to device: 0x0E, with enable = 1 to enable the MIC.
  • Device response:
    • If successful: 0x0E with rsp_status = 0xC9 and enable = 1.
    • If failed: 0x0E with rsp_status = 0xCA and enable = 1.

Receive Glasses Mic data

Command Information

  • Command: 0xF1
  • seq (Sequence Number): 0~255
  • data (Audio Data): Actual MIC audio data being transmitted.

Field Descriptions

  • seq (Sequence Number):
    • Range: 0~255
    • Description: This is the sequence number of the current data packet. It helps to ensure the order of the audio data being received.
  • data (Audio Data):
    • Description: The actual audio data captured by the MIC, transmitted in chunks according to the sequence.

Example

  • Command: 0xF1, with seq = 10 and data = [Audio Data]
  • Description: This command transmits a chunk of audio data from the glasses' MIC, with a sequence number of 10 to maintain packet order.

Send AI Result

Command Information

  • Command: 0x4E
  • seq (Sequence Number): 0~255
  • total_package_num (Total Package Count): 1~255
  • current_package_num (Current Package Number): 0~255
  • newscreen (Screen Status)

Field Descriptions

  • seq (Sequence Number):

    • Range: 0~255
    • Description: Indicates the sequence of the current package.
  • total_package_num (Total Package Count):

    • Range: 1~255
    • Description: The total number of packages being sent in this transmission.
  • current_package_num (Current Package Number):

    • Range: 0~255
    • Description: The current package number within the total, starting from 0.
  • newscreen (Screen Status):

    • Composed of lower 4 bits and upper 4 bits to represent screen status and Even AI mode.
    Lower 4 Bits (Screen Action):
    • 0x01: Display new content
    Upper 4 Bits (Even AI Status):
    • 0x30: Even AI displaying(automatic mode default)
    • 0x40: Even AI display complete (Used when the last page of automatic mode)
    • 0x50: Even AI manual mode
    • 0x60: Even AI network error
    Example:
    • New content + Even AI displaying state is represented as 0x31.
  • new_char_pos0 and new_char_pos1:

    • new_char_pos0: Higher 8 bits of the new character position.
    • new_char_pos1: Lower 8 bits of the new character position.
  • current_page_num (Current Page Number):

    • Range: 0~255
    • Description: Represents the current page number.
  • max_page_num (Maximum Page Number):

    • Range: 1~255
    • Description: The total number of pages.
  • data (Data):

    • Description: The actual data being transmitted in this package.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published