Giter VIP home page Giter VIP logo

cesla-aews's Introduction

CESLA Firmware - Sleep Variant

Overview

This program implements the CESLA firmware with deep sleep modes on the earable device.

This firmware is meant to be used with the RSL10-SENSE-DB-GEVK evaluation board to acquire sound signals from the analog microphones and communicate with the CESLA Android mobile application.

Available operation modes and transition events between them.

Available operation modes and transition events between them.

This application can enter one of the following states:

  • Advertising mode
    Default state after power up. All stream providers are disabled in this mode. Board periodically sends advertising packets (1s interval by default) to allow other devices to connect to it.

    If no device connects in defined timeout period (default 60s) the device will enter sleep mode. Switch to sleep mode is indicated by red LED blinking once.

  • Sleep mode
    In this mode all BLE advertising activity is stopped and all sensors are disabled.

    The RSL10 wakes up periodically (default 1.5s) to check if button PB1 is pressed. If button is pressed it will enter Advertising mode signaled by short blink of green LED.

  • Connected Mode
    This mode can be entered from Advertising mode when a device connects to the board. BLE connection will be maintained based on parameters set by master device.

    In this mode stream providers can be turned on if master requests sensor related data:

    • LCA - Left channel audio provider will be enabled after a LCA stream request is received.

    • RCA - Right channel audio provider will be enabled after a LCA stream request is received.

    • DMIC - Digital mirophone audio provider will be enabled after a LCA stream request is received.

    When peer device disconnects the board will enter back into advertising mode.

Configuration

Certain parameters of the application can be configured using an RTE configuration header. This file is located in the include folder of the application and is called RTE_app_config.h. After opening this file using the CMSIS Configuration Wizard editor it will show all available configuration options.

Selecting CMSIS Configuration Wizard to open the configuration file.

Selecting CMSIS Configuration Wizard to open the configuration file.

All configurable parameters of this application as shown in CMSIS Configuration Wizard

All configurable parameters of this application as shown in CMSIS Configuration Wizard

Verification

After the program is flashed and running on RSL10-SENSE-GEVK board it will start connectable advertising over BLE. The BLE name is 'CESLA_BLE_Terminal'. The CESLA Android application or test suite can be used to receive the audio samples and show the data.

The program exposes the following audio stream providers in the application:

  • Left channel audio stream
  • Right channel audio stream
  • On-board digital microphone audio stream

Features extraction stream is not yet implemented in firmware.

cesla_base_firmware_setup

cesla_base_firmware_setup

Design

High Level Software Design

High Level Software Design

Communication

This program implements a custom service BLE GATT service profile. The GATT database and client-server interactions are described in the following images.

GATT Data Structure

GATT Data Structure

GATT Client Operations

GATT Client Operations The frame number in the above figure represents a 2-byte timestamp. The timestamp is only included when the debug bit in the SCP op-code is set. Otherwise, 10 2-byte audio samples are transmitted.

cesla-aews's People

Contributors

kehindem avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.