2 Replies Latest reply on Oct 12, 2017 4:17 AM by yssu

    Question regarding structure CYBLE_GAPC_ADV_REPORT_T

    user_478787221

      The definition of this structure is: 

       

      typedef struct

      {

      /** Advertisement event type

          - Connectable undirected advertising = 0x00

          - Connectable directed advertising = 0x01

            - Scannable undirected advertising = 0x02

            - Non connectable undirected advertising = 0x03

            - Scan Response = 0x04

          */

      CYBLE_GAPC_ADV_EVENT_T eventType; 

       

       

      /** bd address type of the device advertising.

      - CYBLE_GAP_ADDR_TYPE_PUBLIC

      - CYBLE_GAP_ADDR_TYPE_RANDOM

      - CYBLE_GAP_ADDR_TYPE_PUBLIC_RPA

      - CYBLE_GAP_ADDR_TYPE_RANDOM_RPA

          */

          uint8      peerAddrType;

       

       

      /** Public Device Address or Random Device Address for

         each device which responded to scanning. */

          uint8*     peerBdAddr;

       

       

      /** length of the data for each device that responded to scanning */

          uint8        dataLen;

       

       

      /** Pointer to advertising or scan response data */

          uint8*     data;

       

       

      /** Rssi of the responding device.

      * Range: -85 <= N <= 0

      * Units: dBm */

          int8     rssi;

       

      } CYBLE_GAPC_ADV_REPORT_T;

       

      For the data section, no distinction is made between a scan response packet or an advertising packet.  data seems to lump the two together.   Does this mean the data length can be 31 * 2 = 62?   Should I expect advertising data to be in the first 31 bytes (0 .. 30) and the Scan Response Data to be in the second 31 bytes (31 .. 61)?  How are the two discriminated in this structure?