Skip to content
CARP Docs
Ask AISystemLightDark
On this page

eSense Sampling Package

Collect button presses and motion data from an eSense earable in a CARP Mobile Sensing study.

Copy MarkdownOpen inOpen in GitHubView as MarkdownOpen in Scira AIOpen in ChatGPTOpen in ClaudeOpen in Cursor

carp_esense_package connects a CARP Mobile Sensing (CAMS) study to an eSense earbud over Bluetooth Low Energy (BLE). It collects button presses and the raw accelerometer and gyroscope values of the earbud's inertial measurement unit (IMU) while the participant wears it.

eSense is a research earable platform from Nokia Bell Labs, Cambridge. The package connects to the left earbud of the pair, which has the six-axis IMU, a button and the BLE interface. It uses the esense_flutter plugin.

pub.devAPI referenceGitHub

Hardware availability

The eSense site states that the first generation of the eSense platform has reached its end of life and is no longer distributed.

Features

Button events

An event each time the participant presses or releases the button of the earbud.

Motion

Raw accelerometer and gyroscope values of the left earbud, at a sampling rate from 1 to 100 Hz.

Battery

A battery level that the device manager estimates from the voltage of the earbud every 2 minutes.

Measure types

The package provides two event-based measure types:

Measure typeDataAndroidiOS
dk.cachet.carp.esense.buttonButton pressed or releasedYesYes
dk.cachet.carp.esense.sensorRaw accelerometer and gyroscope values on three axesYesYes

For the fields and how to convert the raw values, see Measure types.

Requirements

ComponentRequirement
Dart SDK3.10 or later
Flutter3.38.1 or later
carp_mobile_sensing2.2.0 or later
AndroidAPI level 24 (Android 7.0) or later, on a phone with BLE
iOS15.0 or later, with CocoaPods
EarableThe left earbud of an eSense pair
TestingA physical phone, because emulators and simulators cannot connect to the earbud

See Installation for the platform setup.

How it works

flowchart LR
    Earbud["<b>eSense earbud</b><br/>left earbud with<br/>IMU and button"] -->|BLE| Phone["<b>CAMS on the phone</b><br/>ESenseDeviceManager<br/>and one probe<br/>per measure"]
    Phone --> Storage["<b>Data manager</b><br/>stores or uploads<br/>the measurements"]
  1. The study protocol names the earable only by its role: an ESenseDevice connected to the phone, with the sampling rate of the motion data.
  2. On the phone, the app binds the role to an earbud with its Bluetooth name, such as eSense-0332. ESenseDeviceManager scans for that name and connects to the earbud.
  3. When the earbud is connected, CAMS starts the eSense measures. Each button press or release and each motion packet becomes one measurement.
  4. A data manager stores or uploads the measurements, as the data endpoint of the protocol specifies.

For the binding and the connection status, see Connecting a device.

Next steps

Installation

Add the package and configure Bluetooth on Android and iOS.

Quickstart

Connect to an eSense earbud and print its button and motion events.

Connecting a device

Bind an eSense earbud, connect to it and follow its status.

Measure types

The two eSense measure types, their raw values and timestamps.

Quick links

Page · DocumentationCARP DocumentationPage · DocumentationIntroductionPage · DocumentationQuickstartPage · DocumentationTerminologyPage · DocumentationArchitecture