# Overview

Source: [https://docs.qualcomm.com/doc/80-70015-7/topic/overview.html](https://docs.qualcomm.com/doc/80-70015-7/topic/overview.html)

Note: The Qualcomm^®^
            sensing hub (QSH) is available only on [QCS5430](https://www.qualcomm.com/products/internet-of-things/industrial/industrial-automation/qcs5430) and [QCS6490](https://www.qualcomm.com/products/internet-of-things/industrial/building-enterprise/qcs6490).

The Qualcomm® system-on-chip (SoC) includes an application processor that runs the Linux
            operating system, a low-power processor (aDSP), and other processors. The low-power
            processor runs the real-time operating system (RTOS) for executing the Qualcomm sensing
            hub (QSH) use cases. The low-power processor supports the following for QSH
            operations:

- GPIOs configurable as serial bus: serial peripheral interface (SPI),
                inter-integrated circuit (I^2^C), improved I^2^C (I^3^C),
                and universal asynchronous receiver/transmitter (UART).
- Serial buses in low-power mode.
- Dedicated local memory, also known as the island in QSH.

## QSH sensors

Source: [https://docs.qualcomm.com/doc/80-70015-7/topic/overview.html](https://docs.qualcomm.com/doc/80-70015-7/topic/overview.html)

The QSH framework supports multiple sensors and provides access to both hardware-based and
      software-based sensors that supports the following functionalities and capabilities:

- Hardware-based sensors are physical sensors that gather data by directly measuring
        specific environmental properties, such as acceleration, magnetic field, pressure, humidity,
        light, and angular velocity. 
    The following table lists the hardware-based sensors that
          the QSH framework supports:

Table : Hardware-based sensors

    | Sensor name | Sensor type | Description | Proto API |
    | --- | --- | --- | --- |
    | Accelerometer | `accel` | Measures the acceleration applied to a device on all the 3 physical axes (x,<br>                  y, and z) in meter/second square (m/s^2^). | `sns_accel.proto` |
    | Gyroscope | `gyro` | Measures the rate of rotation of a device around each of the 3 physical axes<br>                  (x, y, and z) in radians/second (rad/s). | `sns_gyro.proto` |
    | Sensor temperature | `sensor_temperature` | Measures the temperature of the sensor in degreesCelsius (°C). | `sns_sensor_temperature.proto` |
    | Magnetometer | `mag` | Measures the ambient magnetic field for all the 3 physical axes (x, y, and z)<br>                  in microtesla (μT). | `sns_mag.proto` |
    | Proximity | `proximity` | Measures the proximity of an object and provides *near/far*<br>                  events. | `sns_proximity.proto` |
    | Ambient light | `ambient_light` | Measures the ambient light level illumination in lux (lx). | `sns_ambient_light.proto` |
    | Pressure | `pressure` | Measures the ambient air pressure in hectoPascal (hPa). | `sns_pressure.proto` |
    | Humidity | `humidity` | Measures the relative ambient humidity in percentage (%). | `sns_humidity.proto` |
    | Ambient temperature | `ambient_temperature` | Provides the ambient room temperature in degreesCelsius (°C). | `sns_ambient_temperature.proto` |
    | Hall | `hall` | Measures the magnetic field and provides a magnet *near/far*<br>                  indication. | `sns_hall.proto` |
    | Capacitive proximity | `sar` | Detects human object proximity using change in capacitance and reports<br>                    *near/ far* events. | `sns_sar.proto` |
- Software-based sensors, also known as virtual sensors, are the algorithms that gather data
        from one or more physical sensors and generate the intended output. The common examples are
        gravity, step counter, and game rotation vector.
    The following table lists the
          software-based sensors supported by the QSH framework:

Table : Software-based sensors

    | Sensor name | Sensor type | Proto API | Description |
    | --- | --- | --- | --- |
    | Absolute motion detector | `amd` | `sns_amd.proto` | <ul class="ul" id="Sensors_Overview_1__ul_vdm_f5w_r1c_monicapa_03-10-24-1628-43-227"><br>                    <li class="li">Reports a stationary state when the device is at absolute rest. For example,<br>                      on a desk or a table.</li><br><br>                    <li class="li">Uses the accelerometer motion detect interrupts to reduce the power.</li><br><br>                  </ul> |
    | Relative motion detector | `rmd` | `sns_rmd.proto` | Reports a stationary state when the device is not moving significantly with<br>                  respect to gravity. |
    | Significant motion detector | `sig_motion` | `sns_sig_motion.proto` | <ul class="ul" id="Sensors_Overview_1__ul_ojx_pyf_q1c_monicapa_03-04-24-1907-15-308"><br>                    <li class="li">Triggers when detecting a <em class="ph i">significant motion</em> — a motion that might<br>                      lead to a change in the user location. For example, walking, biking, or<br>                      sitting in a moving car, coach, or train. </li><br><br>                    <li class="li">The following examples do not trigger a significant motion:<ul class="ul" id="Sensors_Overview_1__ul_wxf_mzf_q1c_monicapa_03-04-24-1913-47-760"><br>                        <li class="li">The device is in the pocket and the person is not moving. </li><br><br>                        <li class="li">The device is on a table and the table shakes a bit. </li><br><br>                      </ul><br></li><br><br>                    <li class="li">Reporting mode: Single response, after the notification sensor automatically<br>                      disables itself.</li><br><br>                  </ul> |
    | Pedometer | `pedometer` | `sns_pedometer.proto` | Report the number of step counts to the client. |
    | Step detector | `step_detect` | `sns_step_detect.proto` | Detects steps and generates an event on each step. |
    | Tilt detector | `tilt` | `sns_tilt.proto` | Generates an event, each time there is a tilt. The direction of the 2-seconds<br>                  window, with average gravity changing by at least 35 degrees since the activation<br>                  or the last event generated by the sensor, defines a tilt event. |
    | Tilt to wake | `tilt_to_wake` | `sns_tilt_to_wake.proto` | Detects the substantial phone rotation gesture event when the picked device<br>                  is in a specific range of the pitch and roll angles. |
    | Gyroscope calibration | `gyro_cal` | `sns_gyro_cal.proto` | <ul class="ul" id="Sensors_Overview_1__ul_e3k_drb_51c_monicapa_03-18-24-1212-34-340"><br>                    <li class="li">A low-power dynamic calibration algorithm for gyroscopes.</li><br><br>                    <li class="li">Validated across multiple gyroscope parts from different vendors.</li><br><br>                  </ul> |
    | Magnetometer calibration | `mag_cal` | `sns_mag_cal.proto` | <ul class="ul" id="Sensors_Overview_1__ul_ewk_grb_51c_monicapa_03-18-24-1213-27-432"><br>                    <li class="li">A low-power dynamic calibration algorithm for magnetometers.</li><br><br>                    <li class="li">Validated across multiple magnetometer parts from different vendors.</li><br><br>                  </ul> |
    | Game rotation vector | `game_rv` | `sns_game_rv.proto` | <ul class="ul" id="Sensors_Overview_1__ul_vqr_xgb_s1c_monicapa_03-11-24-717-32-529"><br>                    <li class="li">Reports the orientation of the device that is relative to an unspecified<br>                      coordinate frame. </li><br><br>                    <li class="li">It obtains the orientation through integration of accelerometer and<br>                      gyroscope readings. Therefore, the Y-axis does not point north but instead to<br>                      an arbitrary reference.</li><br><br>                  </ul> |
    | Gravity/linear acceleration | `gravity` | `sns_gravity.proto` | <ul class="ul" id="Sensors_Overview_1__ul_vzm_k1j_pcc_rajearor_09-03-24-1333-23-71"><br>                    <li class="li">Provides a three-dimensional vector indicating the direction and magnitude<br>                      of gravity.</li><br><br>                    <li class="li">Typically, this sensor determines the relative orientation of the device in<br>                      space.</li><br><br>                  </ul> |
    | Persistent stationary detector | `persist_stationary_detect` | `sns_persist_stationary_detect.proto` | Reports an event when the device is stationary for at least<br>                  5 seconds. |
    | Persistent motion detector | `persist_motion_detect` | `sns_persist_motion_detect.proto` | Reports an event when the device is in motion for at least 5 seconds. |
    | Device orientation | `device_orient` | `sns_device_orient.proto` | Reports whether the device is in a portrait mode or landscape mode. |
    | Geo-mag rotation vector (RV) | `geomag_rv` | `sns_geomag_rv.proto` | Reports the orientation of the device relative to the East-North-Up<br>                  coordinates frame; obtained through the integration of accelerometer and<br>                  magnetometer readings. |
    | Rotation vector | `rotv` | `sns_rotv.proto` | <ul class="ul" id="Sensors_Overview_1__ul_ymm_p1j_pcc_rajearor_09-03-24-1334-50-616"><br>                    <li class="li">Reports the orientation of the device relative to the East-North-Up<br>                      coordinates frame.</li><br><br>                    <li class="li">Obtains orientation through the integration of accelerometer, gyroscope, and<br>                      magnetometer readings.</li><br><br>                  </ul> |
    | Device position classifier | `device_position_classi fier` | `sns_dpc.proto` | Provides the device position information. |
    | Activity recognition algorithm | `activity_recognition` | `sns_activity_recognition.proto` | Determines relative stationary, such as walk, run, bike, car, nonmotorized<br>                  vehicle, and motorized vehicle states and classifications. |
    | Distance bound | `distance_bound` | `sns_distance_bound.proto` | <ul class="ul" id="Sensors_Overview_1__ul_lnw_4n1_ybc_rajearor_07-03-24-1445-19-926"><br>                    <li class="li">Tracks the distance in meters, and reports the client when the requested<br>                      distance is covered.</li><br><br>                    <li class="li">The client can query the accumulated distance anytime before the final<br>                      distance is reached.</li><br><br>                  </ul> |

QSH provides a framework to use data from a wide range of sensors. The sensor data is useful
      in fields such as IoT, gaming, health, and fitness. A device can have more than one sensor of
      a given type. For example, a
      flip-phone has an accelerometer placed on each of the two planes.

The published attributes or capabilities distinguish each accelerometer sensor. You can
      access the availability, attributes, and capabilities of a sensor on the platform using the
      QSH client APIs. Use the same QSH client APIs to get the sensor data from the QSH
      framework.

The QSH framework APIs include QSH client APIs and sensor APIs, enabling the following
      sensor-related tasks:

- Identify the sensors available on a development kit.
- Determine sensor capabilities using attributes, such as supported sample rate, maximum
        range, manufacturer, power requirement, and resolution.
- To collect and provide data according to the configuration, enable sensors with a
        specified sample rate.

Last Published: Oct 14, 2024

[Next Topic
Getting started](https://docs.qualcomm.com/bundle/publicresource/80-70015-7/topics/get_started.md)