This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[CC2640] Establish Link leads to Error code 0x12 (Invalid profile role)

Other Parts Discussed in Thread: CC2640

Hi,

some words to the setup first:

- SmartRF06EB + CC2640 (prototype board - not TI EM)

- combination of different example applications (HostTestRelease, Multi-Role, SBP, SBC)

- BLE SDK 2.2.0.31

In the customized application everything seems to work fine till the point when "GAP_EstablishLinkReq" is sent. The callback "GAP_LINK_ESTABLISHED_EVENT" comes  with an error code 0x12 saying "Invalid Profile Role".

Before that device discovery is triggered and cancelled manually before issuing the establish link command with the appropriate device address.

Do You have any hints, what might go wrong here?

Thanks and best regards,

Roger

  • Hi Roger,

    Are you receiving the GAP_DEVICE_DISCOVERY_EVENT before you send the GAP_EstablishLinkReq?

    You mentioned that you have combined multiple projects, if you kept the multirole output functionality, can you copy your multirole log showing the sequence of events that is occuring?
  • Hi Rachel,

    thank You for reply.
    Unfortunately the output functionality was removed from the overall project, but the event sequence would look like this:

    1. GAP_DEVICE_INFO_EVENT -> find device and stop scanning
    2. GAP_DEVICE_DISCOVERY_EVENT - > check if device is on the list, toggle PIO with LED to indicate completed discovery.
    3. Call GAP_EstablishLinkReq over SPI.
    4. gapRole_processGAPMsg -> GAP_LINK_ESTABLISHED_EVENT pPkt->hdr.status = bleIncorrectMode(0x12)

    Thanks and best regards,
    Roger
  • Hi Rachel,

    do You have any further ideas/inputs on this issue?

    Many thanks and best regards,

    Roger