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.

CCS/SIMPLELINK-CC26X2-SDK: How to specify that Extended Inquire Response data is required

Part Number: SIMPLELINK-CC26X2-SDK

Tool/software: Code Composer Studio

Hello

Im trying out the simple_central example in simplelink_cc26x2_sdk_2_30_00_34

The aim is to read bluetooth EIR raw data from an advertiser. So basically i just need the simple_central in observer mode.

I can discover the advertiser, and i made a copy of the data received from GapScan_getAdvReport(i, &advRpt);

Here is the srtuct:

/// Event for advertising report
typedef struct {
  /**
   * Bits 0 to 4 indicate connectable, scannable, directed, scan response, and
   * legacy respectively
   */
  uint8_t  evtType;
  /// Public, random, public ID, random ID, or anonymous
  GAP_Addr_Types_t addrType;
  /// Address of the advertising device
  uint8_t  addr[B_ADDR_LEN];
  /// PHY of the primary advertising channel
  GapScan_ScannedPhy_t primPhy;
  /// PHY of the secondary advertising channel
  GapScan_ScannedPhy_t secPhy;
  /// SID (0x00-0x0f) of the advertising PDU. 0xFF means no ADI field in the PDU
  uint8_t  advSid;
  /// -127 dBm <= TX power <= 126 dBm
  int8_t   txPower;
  /// -127 dBm <= RSSI <= 20 dBm
  int8_t   rssi;
  /// Type of TargetA address in the directed advertising PDU
  GAP_Addr_Types_t directAddrType;
  /// TargetA address
  uint8_t  directAddr[B_ADDR_LEN];
  /// Periodic advertising interval. 0 means no periodic advertising.
  uint16_t periodicAdvInt;
  /// Length of the data
  uint16_t dataLen;
  /// Pointer to advertising or scan response data
  uint8_t  *pData;
} GapScan_Evt_AdvRpt_t;

it seems that i get all the data in that struct after the "discover devices" process in serial terminal. However, i actually need Extended Inquire Response data. Is there a built-in mechanism in the simple_central code to specify to the advertiser that i need EIR?

All the useful data comes with EIR.

  • Hello. I think you are confused here...CC26X2-SDK does not include support for Bluetooth Classic; it is Bluetooth Low Energy only.

    What device are you using?
  • Hello.

    I have to say that i am new to the bluetooth communication. So i easily might be off track here. So i will describe my task:

    I need to capture data from a bluetooth core 4.1 advertiser produced by Ruuvi Innovations Ltd (0x0499). I am using nRF mobile app to scan and read the data. The data looks something like this:

    I can scan the device with the simple_central example code. The data i am able to collect looks like this:

    The confusing part is - how do i get the "Raw data" packet, that the nRF reader collects? I need to collect the same information with the TI software.

    I suspect that the central device has to send a specific inquiry to get such a (EIR) response from the advertiser.

  • Here is the sensor that i am tryingto read:
    ruuvi.com/.../
  • Hi. I understand now what you are trying to do. However, I'm not sure what the data structure is from your screenshot. Can you show the snippet of code where AlfredRPT is coming from?
  • it comes from

    static void SimpleCentral_processAppMsg(scEvt_t *pMsg) -> case SC_EVT_SCAN_DISABLED ->GapScan_getAdvReport():

    Its just a global struct (GapScan_Evt_AdvRpt_t AlfredRPT;) so that i can monitor it in a better way in the debug window.

    It can also be collected before the "switch (pMsg->hdr.event)" line and also in "case SC_EVT_ADV_REPORT" etc.

    I changed the PDU type filter so that the sensor would be discoverable in the first place:

    In the beginning, it was my assumption that the advertiser report is what i need. However, when looking at the report structure, i saw that it has none of the important information for me (except for the address maybe):

    So, it then assumed that i need the EIR data, but i am not sure how to get it.

    Instead of GapScan_getAdvReport(), i probably need to do someting else.

  • Sorry I haven't had time to look into this. I'll try to set this up by the end of the week.
  • Hi. I think I see what is happening here. The advertising data is not actually found from the GapScan_getAdvReport() API. This comes individually with each SC_EVT_ADV_REPORT

    See the flow chart in dev.ti.com/.../gap.html and also specifically the Advertising Report Recording section:
    "In addition to the advertising report, the advertising report recording feature can be used to record only a certain part of the Advertising Report information without the data payload"
  • Hello.
    I have enabled all fields in the SC_ADV_RPT_FIELDS.
    As i wrote earlier: "when looking at the report structure, i saw that it has none of the important information for me (except for the address maybe)"

    I actually need the payload data, but cant seem to find it as it appears that it is not even defined in the structure. What do you mean by "comes individually with each SC_EVT_ADV_REPORT" ?

    I also did an experiment to print out every message in void SimpleCentral_scanCb(uint32_t evt, void* pMsg, uintptr_t arg)

    i just added the following to the beginning:

      if(pMsg){
          Display_printf(dispHandle, SC_ROW_ALFRED1 + rowCnt, 0, "Scan CB msg: %s", Util_convertPKT2Str(pMsg));
          rowCnt++;
          if(rowCnt>10){
            rowCnt=0;
          }
      }

    i see the regular adv reports, but there is nothing that looks like useful payload (nothing similar to what the nRF mobile app shows as raw data)

     

  • The payload is part of the individual advertisement report event that is returned when the advertisement is received by the stack; you can not find it by using GapScan_getAdvReport().

    For example, in the simple_central project, you will receive the GAP_EVT_ADV_REPORT in SimpleCentral_scanCb(). This will then get processed in the SC_EVT_ADV_REPORT case under SimpleCentral_processAppMsg() where the advertising data is found from pAdvRpt->pData