Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ffecc8a5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Hearing Aid: Use valid COC service id"

parents ae8bfd74 50246f62
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -691,8 +691,11 @@ class HearingAidImpl : public HearingAid {
  void ConnectSocket(HearingDevice* hearingDevice) {
    tL2CAP_CFG_INFO cfg_info = tL2CAP_CFG_INFO{.mtu = 512};

    uint8_t service_id = hearingDevice->isLeft()
                             ? BTM_SEC_SERVICE_HEARING_AID_LEFT
                             : BTM_SEC_SERVICE_HEARING_AID_RIGHT;
    uint16_t gap_handle = GAP_ConnOpen(
        "", 0, false, &hearingDevice->address, hearingDevice->psm,
        "", service_id, false, &hearingDevice->address, hearingDevice->psm,
        514 /* MPS */, &cfg_info, nullptr,
        BTM_SEC_NONE /* TODO: request security ? */, L2CAP_FCR_LE_COC_MODE,
        HearingAidImpl::GapCallbackStatic, BT_TRANSPORT_LE);
+3 −1
Original line number Diff line number Diff line
@@ -1192,9 +1192,11 @@ typedef uint8_t tBTM_LINK_KEY_TYPE;
#define BTM_SEC_SERVICE_HIDD_SEC_CTRL 51
#define BTM_SEC_SERVICE_HIDD_NOSEC_CTRL 52
#define BTM_SEC_SERVICE_HIDD_INTR 53
#define BTM_SEC_SERVICE_HEARING_AID_LEFT 54
#define BTM_SEC_SERVICE_HEARING_AID_RIGHT 55

/* Update these as services are added */
#define BTM_SEC_SERVICE_FIRST_EMPTY 54
#define BTM_SEC_SERVICE_FIRST_EMPTY 56

#ifndef BTM_SEC_MAX_SERVICES
#define BTM_SEC_MAX_SERVICES 75