API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

IBTEIR

Brew Release
Brew MP 1.0.2
See Also
Description

This interface allows applications to generate and parse Extended Inquiry response.
Usage

Usage example:

===== To get a list of EIR data types

BTEIRDataType EIRDataTypeSeq[10]; int EIRDataTypeSeqLenReq; IBTEIR_RetrieveDataTypes(piIBTEIR, EIRDataTypeSeq, // buffer to hold EIR data types 10, // size of buffer &EIRDataTypeSeqLenReq);
// For each element in EIRDataTypeSeq; do switch (EIRDataTypeSeq[i]) { case AEEBT_EIR_UUID16_PARTIAL_LIST: case AEEBT_EIR_UUID16_LIST: BTUUID32 uuidList[MAX_UUID_LIST_LEN]; int uuidListLenReq; // Retrieve partial/ complete list. // perform SD search later to retrieve the // entire list if required. IBTEIR_RetrieveUuidList(piIBTEIR, uuidList, MAX_UUID_LIST_LEN, &uuidListLenReq); break; case AEEBT_EIR_UUID32_PARTIAL_LIST: case AEEBT_EIR_UUID32_LIST: BTUUID32 uuidList[MAX_UUID_LIST_LEN]; // retrieve list and see if service available IBTEIR_RetrieveUuidList(piIBTEIR, uuidList, MAX_UUID_LIST_LEN, &uuidListLenReq); break; case AEEBT_EIR_UUID128_PARTIAL_LIST: case AEEBT_EIR_UUID128_LIST: BTUUID128 uuidList[MAX_UUID_LIST_LEN]; // retrieve 128 bit uuid list. IBTEIR_RetrieveUuid128List(piIBTEIR, uuidList, MAX_UUID_LIST_LEN, &uuidListLenReq); break; case AEEBT_EIR_SHORT_NAME: case AEEBT_EIR_NAME: // retrieve name IBTEIR_RetrieveName(piIBTEIR, name, nameLen, &nameLenReq); break; case AEEBT_EIR_MANUFACTURER_DATA: IBTEIR_RetrieveManufacturerData(piIBTEIR, data, dataLen, dataLenReq); break; }

===== To Set Name to the EIR data

IBTEIR_SetName(piIBTEIR, FALSE, // this is not the short name "QPhone");

===== To Set list of 16 bit uuid to the EIR data

IBTEIR_SetUuid16List(piIBTEIR, TRUE, // this is the partial list, uuidList, // 1)

===== To Set Manufacturer specific Data EIR data

IBTEIR_SetManufacturerData(piIBTEIR, buff, // buffer containing the manufacture specific data buffLen) // length of the buffer

===== To Set Manufacturer specific Data EIR data

IBTEIR_SetEirData(piIBTEIR, dataType, // one of BTEIRDataType buff, // buffer containing the manufacture specific data buffLen) // length of the buffer)