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.

CC1350: microBLE stack

Part Number: CC1350

Using the microBLE stack (part of the cc1350 sensor examples) - I have some questions.

1) There is a "FEATURE_SCAN_RESPONSE" - but no example using it - is there an example of this somewhere I did not see or find?

2) Is there a way (callback?) to determine if a scan request was made, or not made? Or some variables I can look at to see?

  • Hi Duane,

    There is no examples on this that I'm aware of, there is however some documentation existing on the uBLE stack inside the TI 15.4 user guide:

    dev.ti.com/.../index.html

    Some callbacks can be registered during the init calls but I don't think there is any that is directly tied to scan requests related to the beacon scan responds. You can find the declaration of the callbacks that is available for the different roles in the ugap.h header file:
    ugap_bcastInit(ugBcastCBs_t* pCBs);
    ugap_scanInit(ugoScanCBs_t* pCBs);
    ugap_monitorInit(ugmMonitorCBs_t* pCBs);

    Looking over the uble source code (located under blestack/microstack) I could not find anything that indicated that you can actually get an indication on if a scan request was received on the beacon. From what I can tell, you should be able to simply set the define and configure the scan responds using "uble_setParameter" and the "UB_PARAM_SCANRSPDATA" parameter.
  • Hmm - ugapScanInit() is for a scanner that scans other things
    I'm talking about a beacon that listens and responds to scan reqests.

    I did find this:
    dev.ti.com/.../structrfc__ble_adv_output__s.html

    Specifically the field : nRxScanReq - appears to be a counter that is done by some lower level. If this value changes then a scan request would have occured.

    that said, I can't seem to see a scan request with the sniffer, nor can I see this number increment.

    What simple tool can I use cause a scan to occur? I have tried numerous iphone applications from numerous places - and I am using both the TI Sniffer (the display looks like the USB CatC chief format) - and the Nordic Sniffer

    I understand there are 3 scanning channels, and the cheap sniffers can only see 1 channel - to work around that - I have my "locked" my beacon on Channel 37 only and set both sniffers to channel 37 only, thus things should only happen on channel 37.

    On my iphone & ipad tablet - I've tried: LightBlue, TI SimpleLink Starter, TI SimpleLink SensorTag, Eddystone, Blue Gecko, BLE Scanner, BeaconScanner, CoreBeacons, and BlueFruit - none of these seem to send a scan request to my device.

    Interestingly, the TI SimpleLink apps do not show the UUID I am broadcasting, but a few of the others apps show the UUID (ie: BlueFruit)

    My question is: What *MUST* my device broadcast as part of the packet so that the device will scan, or basically say "this device is scannable"

    The packet I am sending is (in hex) from from wireshark/nordic scanner is:

    d6be898e421b778899aabbcc0201061107b5c71f110b824cb9a7771e89b3ebe2bbcc3acc

    Which decodes as:

    d6be898e -> Access Address

    421b -> packet header (ADV_NONCONN_IND, Tx=False, Rx=False)
    QUESTION: Should this be different?

    778899aabbcc -> advertising address

    020106 -> Advertising Flags
    QUESTION: Should this be different?

    1107b5c71f110b824cb9a7771e89b3ebe2bb -> my 128 bit UUID
    Question: Do I need to include something else?
    I could alternately use a MFG specific data to do this

    cc3acc -> CRC stuff

    I'm not using a "standard format" because those formats appear to be "not intended for my purposes"
  • Hi Duane,

    In addition to the FEATURE_SCAN_RESPONSE define you would also need to set the type of the advertisement to be scannable. You could change this by using uble_setParameter as such:

    uint8_t params = UBLE_ADVTYPE_ADV_SCAN;
    uble_setParameter(UBLE_PARAM_ADVTYPE, 1, &params);

    You can also set the scan responds data this way:

    uble_setParameter(UBLE_PARAM_SCANRSPDATA, 3, "ABC");

  • BTW - to confirm this worked.