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.

LP-EM-CC2745R10-Q1: BLE Basic missing BLEAPPUTIL_SCAN_ENABLED / BLEAPPUTIL_SCAN_DISABLED event in peripheral + observer configuration

Part Number: LP-EM-CC2745R10-Q1

Tool/software:

Hi,

comparing BLE Basic example SDK 8.40 vs 9.10 in peripheral + observer configuration.

In SDK 8.40 I receive BLEAPPUTIL_SCAN_ENABLED event in Observer_ScanEventHandler() efter scan is started and BLEAPPUTIL_SCAN_DISABLED after each Scan Duration, but not in SDK 9.10. Is this a bug or expected?

/Brian

  • Hi Brian,

    Apologies for the delayed answer.

    Can you check app_observer.c, the event handler, which events are enabled (in your 9.10 version)? If BLEAPPUTIL_SCAN_ENABLED and BLEAPPUTIL_SCAN_DISABLED are enbled than you should receive them. Here is the code snippet fdrom SDK 8.40:

    BLEAppUtil_EventHandler_t observerScanHandler =
    {
        .handlerType    = BLEAPPUTIL_GAP_SCAN_TYPE,
        .pEventHandler  = Observer_ScanEventHandler,
        .eventMask      = BLEAPPUTIL_SCAN_ENABLED |
                          BLEAPPUTIL_SCAN_DISABLED |
                          BLEAPPUTIL_ADV_REPORT
    };

    Cheers,

    Marie H

  • Hi Marie,

    it looks the same in 9.10

    BLEAppUtil_EventHandler_t observerScanHandler =
    {
        .handlerType    = BLEAPPUTIL_GAP_SCAN_TYPE,
        .pEventHandler  = Observer_ScanEventHandler,
        .eventMask      = BLEAPPUTIL_SCAN_ENABLED |
                          BLEAPPUTIL_SCAN_DISABLED |
                          BLEAPPUTIL_ADV_REPORT
    };


    /Brian

  • Hello Brian,

    I looked into this and I was able to receive the BLEAPPUTIL_SCAN_DSIABLED event but not the BLEAPPUTIL_SCAN_ENABLED event. I will look further into this to see if it requires special setup or if this is a actual issue.

    However, in the meantime, I've checked and it seems like a device set to central will receive these events. So you could possibly set the max number of connections to 0 in syscfg and use the central project as an observer.

    Best Regards,

    Tarek

  • Hi Tarek,

    If I use the button to stop scanning in SDK 9.10 then I also receive the BLEAPPUTIL_SCAN_DSIABLED event, but compared to SDK 8.40 this is different.

    In SDK 8.40 I receive BLEAPPUTIL_SCAN_ENABLED when scan is started and then BLEAPPUTIL_SCAN_DSIABLED after scan duration, that is not the case in SDK 9.10. So something changed.

    /Brian

  • Hello Brian,

    Understood! I'm sorry you're running into this issue and I'm looking into it. I will keep you updated with what I find.

    In the meantime, as mentioned, the central example seems to be working as expected (setting central to 0 connections to emulate an observer).

    Best Regards,

    Tarek 

  • Hi Tarek,

    any updates on this issue?

    /Brian

  • Hello Brian,

    Terribly sorry for the delay on this! I've looked into it, seems like this may be an issue with one of our APIs (BLEAppUtil_ScanStart), that only impacts the observer role. I've notified R&D of this, I'll keep you updated.

    Best Regards,

    Tarek D

  • Hi Tarek,

    Thanks for the update.

    /Brian