# Develop applications using the QSH client APIs

The `SessionClient` sample application shows the usage of QSH client API to develop applications. By default, this sample application is built in the `/usr/bin` directory on the device. For a complete code sample, see the
`<workspace>/build-qcom-wayland/workspace/sources/sensinghub/sensing-hub/examples/SessionClient/SessionClient.cpp`
file.

The following figure shows the call flow for streaming the accelerometer
sensor and the usage of the QSH client APIs.

<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="801" height="683" viewbox="0 0 801 683" aria-label="Figure : Call flow to stream a specified sensor">
  <defs>
    <style>.svg-1 .cls-1 { letter-spacing: 0em }
.svg-1 .cls-2,.svg-1 .cls-3,.svg-1 .cls-4,.svg-1 .cls-5,.svg-1 .cls-6 { stroke-miterlimit: 10 }
.svg-1 .cls-2,.svg-1 .cls-3,.svg-1 .cls-6 { stroke: #000 }
.svg-1 .cls-2,.svg-1 .cls-5,.svg-1 .cls-6 { fill: none }
.svg-1 .cls-7 { font-size: 16px }
.svg-1 .cls-7,.svg-1 .cls-8 { font-family: Roboto-Bold, Roboto; font-weight: 700 }
.svg-1 .cls-9 { letter-spacing: -.01em }
.svg-1 .cls-10 { letter-spacing: .05em }
.svg-1 .cls-11 { font-size: 18.58px }
.svg-1 .cls-11,.svg-1 .cls-12 { font-family: Roboto-Regular, Roboto }
.svg-1 .cls-13 { letter-spacing: 0em }
.svg-1 .cls-14 { letter-spacing: .06em }
.svg-1 .cls-8,.svg-1 .cls-12 { font-size: 15px }
.svg-1 .cls-15 { letter-spacing: .07em }
.svg-1 .cls-16 { letter-spacing: .02em }
.svg-1 .cls-3 { fill: #fff; stroke-width: 2px }
.svg-1 .cls-17 { letter-spacing: 0em }
.svg-1 .cls-4 { stroke: #d2d7e1 }
.svg-1 .cls-4,.svg-1 .cls-18 { fill: #fafafa }
.svg-1 .cls-5 { stroke: #7c8aa3; stroke-width: 1.5px }
.svg-1 .cls-6 { stroke-dasharray: 4.98 4.98 }
.svg-1 .cls-19 { letter-spacing: .05em }
.svg-1 .cls-20 { letter-spacing: .06em }
.svg-1 .cls-21 { letter-spacing: 0em }
.svg-1 .cls-22 { letter-spacing: 0em }</style>
  </defs>
  <rect class="cls-4" x="8.19" y="8.85" width="784.62" height="666.82" rx="2.09" ry="2.09"></rect>
  <g>
    <text class="cls-8" transform="translate(87.12 190.08)"><tspan class="cls-20" x="0" y="0">[</tspan><tspan class="cls-19" x="5.07" y="0">r</tspan><tspan class="cls-14" x="11.3" y="0">e</tspan><tspan class="cls-10" x="20.31" y="0">f</tspan><tspan class="cls-20" x="26.41" y="0">er QSH Inte</tspan><tspan class="cls-15" x="113.48" y="0">r</tspan><tspan class="cls-20" x="120" y="0">face]</tspan></text>
    <rect class="cls-5" x="23.69" y="171.34" width="753.96" height="92.36" rx="1.1" ry="1.1"></rect>
    <text class="cls-7" transform="translate(33.86 190.68)"><tspan x="0" y="0">loop</tspan></text>
    <polyline class="cls-5" points="76.2 171.34 76.2 190.8 67.81 201.12 23.36 201.12"></polyline>
    <text class="cls-8" transform="translate(87.12 306.9)"><tspan class="cls-20" x="0" y="0">[</tspan><tspan class="cls-19" x="5.07" y="0">r</tspan><tspan class="cls-14" x="11.3" y="0">e</tspan><tspan class="cls-10" x="20.31" y="0">f</tspan><tspan class="cls-20" x="26.41" y="0">er QSH Inte</tspan><tspan class="cls-15" x="113.48" y="0">r</tspan><tspan class="cls-20" x="120" y="0">face]</tspan></text>
    <rect class="cls-5" x="23.69" y="288.16" width="753.96" height="92.36" rx="1.1" ry="1.1"></rect>
    <text class="cls-7" transform="translate(33.86 307.5)"><tspan x="0" y="0">loop</tspan></text>
    <polyline class="cls-5" points="76.2 288.16 76.2 307.62 67.81 317.94 23.36 317.94"></polyline>
    <text class="cls-8" transform="translate(87.12 423.85)"><tspan class="cls-20" x="0" y="0">[</tspan><tspan class="cls-19" x="5.07" y="0">r</tspan><tspan class="cls-14" x="11.3" y="0">e</tspan><tspan class="cls-10" x="20.31" y="0">f</tspan><tspan class="cls-20" x="26.41" y="0">er QSH Inte</tspan><tspan class="cls-15" x="113.48" y="0">r</tspan><tspan class="cls-20" x="120" y="0">face]</tspan></text>
    <rect class="cls-5" x="23.69" y="405.11" width="753.96" height="92.36" rx="1.1" ry="1.1"></rect>
    <text class="cls-7" transform="translate(33.86 424.46)"><tspan x="0" y="0">loop</tspan></text>
    <polyline class="cls-5" points="76.2 405.11 76.2 424.57 67.81 434.89 23.36 434.89"></polyline>
    <rect class="cls-3" x="186.78" y="23.21" width="144.4" height="49.54" rx="4.13" ry="4.13"></rect>
    <rect class="cls-3" x="548.67" y="23.21" width="228.42" height="49.54" rx="5.19" ry="5.19"></rect>
    <line class="cls-2" x1="258.98" y1="72.74" x2="258.98" y2="621.78"></line>
    <line class="cls-2" x1="662.88" y1="72.74" x2="662.88" y2="621.78"></line>
    <text class="cls-11" transform="translate(212.37 52.8)"><tspan x="0" y="0">Application</tspan></text>
    <text class="cls-11" transform="translate(570.59 52.8)"><tspan x="0" y="0">libSensingHubSession</tspan></text>
    <rect class="cls-3" x="186.78" y="611.77" width="144.4" height="49.54" rx="4.13" ry="4.13"></rect>
    <rect class="cls-3" x="548.67" y="611.77" width="228.42" height="49.54" rx="5.19" ry="5.19"></rect>
    <text class="cls-11" transform="translate(212.37 641.36)"><tspan x="0" y="0">Application</tspan></text>
    <text class="cls-11" transform="translate(570.59 641.36)"><tspan x="0" y="0">libSensingHubSession</tspan></text>
    <g>
      <line class="cls-2" x1="258.98" y1="116.47" x2="657.14" y2="116.47"></line>
      <polygon points="655.98 120.46 662.88 116.47 655.98 112.48 655.98 120.46"></polygon>
    </g>
    <g>
      <line class="cls-2" x1="258.98" y1="200.31" x2="657.14" y2="200.31"></line>
      <polygon points="655.98 204.3 662.88 200.31 655.98 196.32 655.98 204.3"></polygon>
    </g>
    <g>
      <line class="cls-2" x1="258.98" y1="314.97" x2="657.14" y2="314.97"></line>
      <polygon points="655.98 318.95 662.88 314.97 655.98 310.98 655.98 318.95"></polygon>
    </g>
    <g>
      <line class="cls-2" x1="258.98" y1="431.92" x2="657.14" y2="431.92"></line>
      <polygon points="655.98 435.91 662.88 431.92 655.98 427.93 655.98 435.91"></polygon>
    </g>
    <g>
      <line class="cls-2" x1="264.72" y1="151.21" x2="267.22" y2="151.21"></line>
      <line class="cls-6" x1="272.2" y1="151.21" x2="657.89" y2="151.21"></line>
      <line class="cls-2" x1="660.38" y1="151.21" x2="662.88" y2="151.21"></line>
      <polygon points="265.89 155.2 258.98 151.21 265.89 147.22 265.89 155.2"></polygon>
    </g>
    <g>
      <line class="cls-2" x1="264.72" y1="239.06" x2="267.22" y2="239.06"></line>
      <line class="cls-6" x1="272.2" y1="239.06" x2="657.89" y2="239.06"></line>
      <line class="cls-2" x1="660.38" y1="239.06" x2="662.88" y2="239.06"></line>
      <polygon points="265.89 243.04 258.98 239.06 265.89 235.07 265.89 243.04"></polygon>
    </g>
    <g>
      <line class="cls-2" x1="264.72" y1="353.71" x2="267.22" y2="353.71"></line>
      <line class="cls-6" x1="272.2" y1="353.71" x2="657.89" y2="353.71"></line>
      <line class="cls-2" x1="660.38" y1="353.71" x2="662.88" y2="353.71"></line>
      <polygon points="265.89 357.7 258.98 353.71 265.89 349.72 265.89 357.7"></polygon>
    </g>
    <g>
      <line class="cls-2" x1="264.72" y1="470.67" x2="267.22" y2="470.67"></line>
      <line class="cls-6" x1="272.2" y1="470.67" x2="657.89" y2="470.67"></line>
      <line class="cls-2" x1="660.38" y1="470.67" x2="662.88" y2="470.67"></line>
      <polygon points="265.89 474.66 258.98 470.67 265.89 466.68 265.89 474.66"></polygon>
    </g>
    <g>
      <path class="cls-2" d="M258.98,536.3h66.78c11.02,0,19.95,8.93,19.95,19.95s-8.93,19.95-19.95,19.95h-59.6"></path>
      <polygon points="267.62 571.22 258.98 576.21 267.62 581.2 267.62 571.22"></polygon>
    </g>
    <rect class="cls-18" x="419.52" y="106.9" width="82.83" height="19.14"></rect>
    <rect class="cls-18" x="422.38" y="141.64" width="77.1" height="19.14"></rect>
    <rect class="cls-18" x="370.57" y="190.74" width="180.73" height="19.14"></rect>
    <rect class="cls-18" x="436.35" y="229.48" width="49.17" height="19.14"></rect>
    <rect class="cls-18" x="355.68" y="305.39" width="210.51" height="19.14"></rect>
    <rect class="cls-18" x="422.01" y="344.14" width="77.84" height="19.14"></rect>
    <rect class="cls-18" x="365.9" y="422.35" width="190.06" height="19.14"></rect>
    <rect class="cls-18" x="413.68" y="461.09" width="94.51" height="19.14"></rect>
    <text class="cls-12" transform="translate(423.91 120.69)"><tspan x="0" y="0">getSession</tspan></text>
    <text class="cls-12" transform="translate(429.85 155.43)"><tspan x="0" y="0">Isession*</tspan></text>
    <text class="cls-12" transform="translate(378.63 204.53)"><tspan x="0" y="0">get SUID using ISession*</tspan></text>
    <text class="cls-12" transform="translate(362.18 319.19)"><tspan x="0" y="0">get </tspan><tspan class="cls-17" x="24.98" y="0">A</tspan><tspan x="34.64" y="0">ttributes using ISession*</tspan></text>
    <text class="cls-12" transform="translate(370.61 436.14)"><tspan x="0" y="0">Sta</tspan><tspan class="cls-16" x="21.96" y="0">r</tspan><tspan x="27.4" y="0">t St</tspan><tspan class="cls-21" x="49.81" y="0">r</tspan><tspan class="cls-22" x="54.75" y="0">eaming using SUID</tspan></text>
    <text class="cls-12" transform="translate(444.66 243.28)"><tspan x="0" y="0">SUID</tspan></text>
    <text class="cls-12" transform="translate(428.21 357.93)"><tspan class="cls-13" x="0" y="0">A</tspan><tspan x="9.66" y="0">ttributes</tspan></text>
    <text class="cls-12" transform="translate(419.96 474.89)"><tspan x="0" y="0">sensor</tspan><tspan class="cls-9" x="45.32" y="0">E</tspan><tspan class="cls-1" x="53.66" y="0">v</tspan><tspan class="cls-22" x="60.83" y="0">ent</tspan></text>
    <text class="cls-12" transform="translate(144.24 539.7)"><tspan x="0" y="0">delete ISession*</tspan></text>
  </g>
</svg>

**Figure: Call flow to stream a specified sensor**

In this example, the client application can use different sensor sessions for the SUID query,
attribute query, and streaming activity. It can also use the same session for all the activities; however, synchronization must be handled
appropriately.

The client application can send various requests to the aDSP as follows:

1. The SUID query, retrieves SUIDs for the specified sensor:

    1. Create an interface for SUID by calling the `getSession()` API with the new `sessionFactory()` class. Requesting the SUID is the first and important request to get SUID of the requested data type for any use case.

/* Create a new ISession for UID discovery */
         sessionFactory* factory = new sessionFactory();
         if(nullptr == factory){
           printf("failed to create factory instance");
           return false;
         }
         ISession* suidSession = factory->getSession();
         if(nullptr == suidSession){
           printf("failed to create uid session");
           return false;
         }
        Copy to clipboard

    2. Open a created session interface by calling the `open()` API.

/* Open the suidSession */
          int ret = suidSession->open();
          if(-1 == ret){
            printf("failed to open ISession for uid query");
            return false;
          }
        Copy to clipboard

    3. Set callbacks by calling the `setCallBacks()` API and handling
the response, event, or error for the SUID activity.

/* Set callbacks for the session for 'uid' */
          ret = suidSession->setCallBacks(uid, suidResp, nullptr, suidEvent);
          if(-1 == ret)
             printf("all callbacks are null, no need to register it");
        Copy to clipboard

    4. Create and send a Pb-encoded request message for SUID of a specified
data type by calling the `sendRequest()` API.

/*
           * Create SUID request message
           * (Please refer sns_client.proto and sns_suid.proto for more details)
           * */
          string pb_req_encoded = "";
          sns_suid_req pb_suid_req;
          pb_suid_req.set_data_type(sensorName);
          pb_suid_req.set_register_updates(true);
        sns_client_request_msg pb_req_msg;
        pb_req_msg.set_msg_id(SNS_SUID_MSGID_SNS_SUID_REQ);
        ..
        string pb_req_msg_encoded;
          pb_req_msg.SerializeToString(&pb_req_msg_encoded);
          /* send proto encoded message to sensing-hub using the opened session */
          unique_lock<mutex> respLock(respMutex);
          ret = suidSession->sendRequest(uid, pb_req_msg_encoded);
          if(0 != ret){
            printf("Error in sending uid discovery request");
            return false;
          }
        Copy to clipboard

    5. Close the session by calling the `close()` API and delete it
after the SUID events for the requested data type are received.

/* Close and delete the session once SUIDs are received */
          suidSession->close();
          delete suidSession;
          delete factory;
        Copy to clipboard
2. The attribute request, retrieves attributes for the specified sensor:

    1. Create an interface session for an attribute by calling
`getSession()` with the new `sessionFactory()` class.
Requesting the attributes is important to get the capabilities of
the requested data type for any use case.

/* Create a new ISession for attribute query */
          sessionFactory* factory = new sessionFactory();
          if(nullptr == factory){
            printf("failed to create factory instance");
            return false;
          }
        
           ISession* attributeSession = factory->getSession();
          if(nullptr == attributeSession){
            printf("failed to create attribute session");
            return false;
          }
        Copy to clipboard

    2. Open a created session interface by calling the `open()` API.

/* open the attributeSession session */
          int ret = attributeSession->open();
          if(-1 == ret){
            printf("failed to open ISession for attribute query");
            return false;
        Copy to clipboard

    3. Set callbacks by calling `setCallBacks()` and handling the
response, event, or error for the attribute activity.

for (const suid& uid : suidList) {
            /* set callbacks for the session for 'uid' */
            int ret = attributeSession->setCallBacks(uid, attributeResp, nullptr, attributeEvent);
            if(-1 == ret)
                 printf("all callbacks are null, no need to register it");
        Copy to clipboard

    4. Create and send a Pb-encoded configuration request for an
attribute of a specified data type by calling the `sendRequest()`
API.

/* create pb-encoded config request message to be sent for attribute query */
            sns_client_request_msg pb_req_msg;
            pb_req_msg.set_msg_id(SNS_STD_MSGID_SNS_STD_ATTR_REQ);
            pb_req_msg.mutable_request()->clear_payload();
            pb_req_msg.mutable_suid()->set_suid_high(uid.high);
        ..
        ..
        /* send proto encoded message to sensing-hub using the opened session */
            unique_lock<mutex> respLock(respMutex);
            ret = attributeSession->sendRequest(uid, pb_req_msg_encoded);
        Copy to clipboard

    5. Close the session by calling the `close()` API after the
attribute events for the requested data type is received.

/* close and delete the session once all attributes are received */
          attributeSession->close();
          delete attributeSession;
          delete factory;
        Copy to clipboard
3. The sensor streaming, streams the sensor and receives the data events:

    1. Create an interface session for streaming the sensor by calling
`getSession()` with the new `sessionFactory()` class.
Here, requesting sensor data is the final stage of a requested
data type for any use case.

sessionFactory()class.
        
        /* create a new ISession for streaming activity */
          sessionFactory* factory = new sessionFactory();
          if(nullptr == factory){
            printf("failed to create factory instance");
            return false;
          }
          ISession* streamingSession = factory->getSession();
          if(nullptr == streamingSession){
            printf("failed to create streaming session");
            return false;
          }
        Copy to clipboard

    2. Open a created session interface by calling the `open()` API.

/* open the streamingSession session */
        int ret = streamingSession->open();
        if(-1 == ret){
          printf("failed to open ISession for attribute query");
          return false;
        Copy to clipboard

    3. Set callbacks by calling `setCallBacks()` and handling the
response, event, or error for streaming the activity.

for (const suid& uid : suidList){
            /* set callbacks for the session for 'uid' */
            int ret = streamingSession->setCallBacks(uid, dataResp, dataError, dataEvent);
            if(-1 == ret)
              printf("all callbacks are null, no need to register it");
        Copy to clipboard

    4. Create and send a Pb-encoded configuration request for streaming
the sensor of a specified data type by calling the `sendRequest()`
API, which eventually allows the requested sensor.

/* create pb-encoded config request message to be sent for streaming request */
            string pb_req_encoded = "";
            sns_std_sensor_config pb_stream_cfg;
            pb_stream_cfg.set_sample_rate(sampleRate);
            pb_stream_cfg.SerializeToString(&pb_req_encoded);
            sns_client_request_msg pb_req_msg;
            pb_req_msg.mutable_request()->mutable_batching()->set_batch_period(batchPeriod);
            pb_req_msg.set_msg_id(SNS_STD_SENSOR_MSGID_SNS_STD_SENSOR_CONFIG);
        ..
        ..
        /* send proto encoded message to sensing-hub using the opened session */
            unique_lock<mutex> respLock(respMutex);
            ret = streamingSession->sendRequest(uid, pb_req_msg_encoded);
        Copy to clipboard

    5. Handle samples in the event callbacks and wait for the specified
duration of the test.

void handle_event_cb(const uint8_t *data, size_t size, uint64_t time_stamp){
        if(true == deletion_started){
        printf("\nEvent coming when deletion of qmi connection started");
        return;
        }
        sns_client_event_msg pb_event_msg;
        /* Parse the pb encoded event */
        pb_event_msg.ParseFromArray(data, size);
        /* Iterate over all events in the message */
        for (int i = 0; i < pb_event_msg.events_size(); i++) {
        auto& pb_event = pb_event_msg.events(i);
        Copy to clipboard
4. The stop sensor streaming client, stops streaming by sending a request to disable:

    1. Call the `sendRequest()` API.

pb_req_msg.set_msg_id(SNS_CLIENT_MSGID_SNS_CLIENT_DISABLE_REQ);
            pb_req_msg.mutable_suid()->set_suid_high(uid.high);
            pb_req_msg.mutable_suid()->set_suid_low(uid.low);
        ..
        ..
        /* send disable request to sensing-hub */
            int ret = streamingSession->sendRequest(uid, pb_req_msg_encoded);
        Copy to clipboard

    2. Close the session by calling the `close()` API after the
streaming events for the requested data type is received.

/* close and delete the streamingSession */
          streamingSession->close();
          delete streamingSession;
          delete factory;
        Copy to clipboard

The following snippet shows the `SessionClient` sample application
output. It allows an accelerometer sensor with 10 Hz sample rate and a
2-second batch period for 10 sec and prints the received sensor events.

[root@qcm6490](mailto:root&#37;&#52;&#48;qcm6490):~# SessionClient
Streaming configuration is as follows :

> 
> 
> Sensor name : accel     Sample rate : 10 Hz     Batch period : 2 sec    Test duration : 10 sec

SUID discovery response received.
Received SUIDs for accel, number of SUIDs received = 1

SUID received - suid\_low=6360260105974108950 suid\_high=7037810611998542250
Sensor suid list created

requesting attributes for - suid\_low=6360260105974108950 suid\_high=7037810611998542250

Attribute query response received.
Attributes for - suid\_low=6360260105974108950 suid\_high=7037810611998542250 are:
attribute count 0        and values are: attr\_id: 16     sint: 0
attribute count 1        and values are: attr\_id: 9      sint: 50sint: 240sint: 240
attribute count 2        and values are: attr\_id: 12     std: LPM std: NORMAL std: HIGH\_PERF
attribute count 3        and values are: attr\_id: 5      std: sns\_accel.proto
attribute count 4        and values are: attr\_id: 0      std: icm4x6xx
attribute count 5        and values are: attr\_id: 1      std: TDK-Invensense
attribute count 6        and values are: attr\_id: 26     boolean 1
attribute count 7        and values are: attr\_id: 17     boolean 0
attribute count 8        and values are: attr\_id: 10     sint: 6
attribute count 9        and values are: attr\_id: 15     sint: 16
attribute count 10       and values are: attr\_id: 21     boolean 1
attribute count 11       and values are: attr\_id: 22     sint: 3sint: 2sint: 1
attribute count 12       and values are: attr\_id: 2      std: accel
attribute count 13       and values are: attr\_id: 4      sint: 82179
attribute count 14       and values are: attr\_id: 13     boolean 1
attribute count 15       and values are: attr\_id: 14     boolean 0
attribute count 16       and values are: attr\_id: 18     sint: 0
attribute count 17       and values are: attr\_id: 20     flt: 0.000000  flt: 0.000000   flt: 0.000000   flt: 0.000000   flt: 0.000000   flt: 0.000000flt: 0.000000    flt: 0.000000   flt: 0.000000   flt: 0.000000   flt: 0.000000   flt: 0.000000
attribute count 18       and values are: attr\_id: 19     sint: 0
attribute count 19       and values are: attr\_id: 11
attribute count 20       and values are: attr\_id: 7      flt: 0.000019  flt: 0.000037   flt: 0.000075   flt: 0.000150   flt: 0.000299
attribute count 21       and values are: attr\_id: 24
attribute count 22       and values are: attr\_id: 23     flt: 0.000299
attribute count 23       and values are: attr\_id: 6      flt: 12.500000 flt: 25.000000  flt: 50.000000  flt: 100.000000 flt: 200.000000 flt: 500.000000
attribute count 24       and values are: attr\_id: 25     flt: 1000.000000       flt: 2000.000000
attribute count 25       and values are: attr\_id: 8      sint: 80
attribute count 26       and values are: attr\_id: 3      boolean 1

Attributes for all SUIDs received

Streaming started
sending request for - suid\_low=6360260105974108950 suid\_high=7037810611998542250
Data request response received.
Received re-configuration event
Cal event packet received
Received Samples:       [0.347159],     [-0.181959],    [9.450213],
Received Samples:       [0.102951],     [-0.183156],    [9.545981],
Received Samples:       [0.096965],     [-0.189142],    [9.550770],
Received Samples:       [0.092177],     [-0.192733],    [9.541193],
Received Samples:       [0.090980],     [-0.183156],    [9.555558],
Received Samples:       [0.093374],     [-0.185551],    [9.555558],
Received Samples:       [0.108936],     [-0.184354],    [9.541193],
Received Samples:       [0.098162],     [-0.185551],    [9.565135],
Received Samples:       [0.095768],     [-0.185551],    [9.550770],
Received Samples:       [0.100556],     [-0.193930],    [9.550770],
Received Samples:       [0.092177],     [-0.186748],    [9.550770],
Received Samples:       [0.094571],     [-0.199916],    [9.541193],
Received Samples:       [0.105345],     [-0.199916],    [9.550770],
Received Samples:       [0.098162],     [-0.185551],    [9.550770],

For troubleshooting common issues, see [Troubleshoot sensors](https://docs.qualcomm.com/doc/80-70022-7/topic/debug.html#debug).

For more information, see
[QSH direct channel API workflow](https://docs.qualcomm.com/bundle/resource/topics/80-70022-7A/develop_and_integrate.html#qsh_direct_channel_api_workflow).

# Configure sensors

To configure registry, island memory, multisensor (dual) sensors, and serial bus configuration, see
[Configure sensors](https://docs.qualcomm.com/bundle/resource/topics/80-70022-7A/configuration_customization.html).

# Develop and integrate sensor drivers

To develop and integrate custom sensor drivers, see
[Develop and integrate sensor drivers](https://docs.qualcomm.com/bundle/resource/topics/80-70022-7A/develop_and_integrate.html#develop-and-integrate-sensor-drivers).

# Develop and integrate custom sensor algorithms

To develop and integrate a QSH-compliant sensor algorithm, see
[Develop and integrate custom sensor algorithms](https://docs.qualcomm.com/bundle/resource/topics/80-70022-7A/develop_and_integrate.html#developing_custom_algorithm_and_integrating_with_qsh).

Next steps

- [Calibrate sensors](https://docs.qualcomm.com/doc/80-70022-7/topic/calibrate.html#calibrate)

Last Published: Oct 08, 2025

[Previous Topic
Develop sensors](https://docs.qualcomm.com/bundle/publicresource/80-70022-7/topics/develop_sensors.md) [Next Topic
Calibrate sensors](https://docs.qualcomm.com/bundle/publicresource/80-70022-7/topics/calibrate.md)