Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Sensors Technology Guide

Base version:

Brew MP 1.0
Brew® Mobile Platform includes a generic interface for communicating with sensor driver implementations as a protocol operating over a port connection in serial mode. One or more applications can use this BREW- and native AMSS-compatible API to perform the following operations:
  • Register and de-register client applications
  • Allow one or more client applications to configure the physical sensors to certain requirements; some configurable attributes include sampling rate, data representation, g-range selection, etc.
  • Allow one or more client applications to read data generated by the physical sensors
  • Allow one or more client applications to set up trigger conditions such that sensors data are sent to the application only when certain conditions are met

Sensors

In Brew MP version 1.0, the protocol definition supports the following types of sensor:
  • Accelerometer
  • Temperature sensor
  • Pressure sensor
  • Compass
  • Pedometer (virtual sensor)
  • Gyroscope

Protocol

Sensors rely on a protocol for messages (data) exchanged between the sensor applications and the underlying layers. These simple command/response messages take the form of ASCII strings transmitted as part of the IPort1 interface, which developers can implement to access sensor data. A utility interface, ISensorUtil, allows the construction of request messages and parsing of response messages.

The protocol and interfaces provide for one-shot and auto-generated (repeated) data from sensors. They also support conditional data generation, in which the app will receive data from the sensor only when specified conditions are met.

A separate document, Sensors Messaging Protocol (80-VF213-1), describes the syntax and semantics of the messages exchanged between applications and sensor hardware.

Driver

AMSS-level code in the chipset communicates with the sensor hardware through a device driver. AMSS contains default drivers for common sensor types, and OEMs who require support for additional sensors must write their own driver.

The Sensors Driver Application Note (80-VM688-1) contains information about the sensors driver software structure and its interface with the sensors software.