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.

LAUNCHXL-CC2640R2: How to make simple_observer scan endless

Part Number: LAUNCHXL-CC2640R2

 Hi there,

I tried to make simple_observer scan endless but seems it still needs restart scan process manually.

Here is what I have done:

First solution:

1. modify below:

// Maximum number of scan responses
#define DEFAULT_MAX_SCAN_RES                  0

// Scan duration in ms
#define DEFAULT_SCAN_DURATION                 0

2. I can not get GAP_DEVICE_INFO_EVENT event.

I expected to get this message to parse beacon information.

The second solution, so I only get 8 GAP_DEVICE_INFO_EVENT  message then I must restart the scan process manually.

It's not scanning forever.

// Maximum number of scan responses
#define DEFAULT_MAX_SCAN_RES                  8

// Scan duration in ms
#define DEFAULT_SCAN_DURATION                 0

Any suggestions to make scan forever no need restart? and get GAP_DEVICE_INFO_EVENT

PS, I have referenced "Scanning Task 3 - Scan Indefinitely" document, seems no help.

B.R.

Leo

  • Hi Leo,

    Please see the Simplelink Academy module on Scanning and Advertising ( ).

    If you set DEFAULT_MAX_SCAN_RES to 0 you won't get any scan results, since you don't have a buffer to store scan results in.This define is used to set the size of the scan results buffer:

    // Scan result list
    static gapDevRec_t devList[DEFAULT_MAX_SCAN_RES];

  • Hi Marie,

    Thank you for your sharing.

    As you said, I will leave DEFAULT_MAX_SCAN_RES as 8, and I modified code like this in SimpleBLEObserver_init()

        uint8 scanRes = 0x0;//DEFAULT_MAX_SCAN_RES;
        GAPObserverRole_SetParameter(GAPOBSERVERROLE_MAX_SCAN_RES, sizeof(uint8_t),
                                     &scanRes );

    And I still can not get GAP_DEVICE_INFO_EVENT message from the stack.

    Actually, I don't need to store scan results in buffer "static gapDevRec_t devList[DEFAULT_MAX_SCAN_RES]".

    So I am just wondering if there is a method to start a scan and get GAP_DEVICE_INFO_EVENT, and won't stop.

    However, now I restart scan after getting DEFAULT_MAX_SCAN_RES of GAP_DEVICE_INFO_EVENT events.

    B.R.

    Leo

  • Hi Leo,

    If you look at the GAP Observer role (observer.c) you will see that the GAPOBSERVERROLE_MAX_SCAN_RES value is passed to the GAP layer (GAP_DeviceInit()). It's not possible to pass a value here that will give you an indefinite number of scanned devices.

    As you say, the way to go is to restart the scan after the number of scan results has been reached.
  • Use
    // Scan duration in ms
    #define DEFAULT_SCAN_DURATION 0

    and add

    GAP_SetParamValue(TGAP_FILTER_ADV_REPORTS, FALSE );

  • Hi Marie,

    I am afraid I have to update a new issue here. Would you please help me to address it?

    Like your last post, If we want an indefinite scan we have to "restart the scan after the number of scan results has been reached".

    So my code is like this:

    1. set scan process to find 0xff results, and do not filter advertisements from the same device

    #define DEFAULT_SCAN_DURATION                 0
    #define DEFAULT_MAX_SCAN_RES                  (0xff)

    GAP_SetParamValue(TGAP_FILTER_ADV_REPORTS, FALSE);

    2. start scan process after GAP initialized 

    3. then I display scanned packet number as GAP_DEVICE_INFO_EVENT event received.

    If packet number reached  DEFAULT_MAX_SCAN_RES(0xff), I will cancel the current scan process.

        case GAP_DEVICE_INFO_EVENT:
          {
            scanning_packets++;
            Display_print1(dispHandle, 2, 0, "scanning_packets 0x%x", scanning_packets);
    
            if (scanning_packets == 0xff) {
              GAPObserverRole_CancelDiscovery();
              scanning_packets = 0;
            }
          }
          break;

    4. then I will recv a GAP_DEVICE_DISCOVERY_EVENT, I will start another round scan process

        case GAP_DEVICE_DISCOVERY_EVENT:
          Display_print0(dispHandle, 0, 0, "restart scan");
    
          GAPObserverRole_StartDiscovery(DEFAULT_DISCOVERY_MODE,
                                         DEFAULT_DISCOVERY_ACTIVE_SCAN,
                                         DEFAULT_DISCOVERY_WHITE_LIST);

    The problem is:

    After I get a few rounds of DEFAULT_MAX_SCAN_RES results, the scan process will stop at step #3(when stopped, scanning_packets will be some random value less than DEFAULT_MAX_SCAN_RES).

    And I also find that seems it's relevant to CCS optimization level: it won't stop at optimization off but stop at optimization level 4.

    Now I am confused about this, really.

    Would you please help me with this issue kindly? Can I attach my project(portable) so you can run it on launchpad?

    B.R.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/538/slave.7z

  • Hi Alex,
    Thank you for your post.
    I do follow your advice to disable TGAP_FILTER_ADV_REPORTS feature, and that helps.
    Now I have find a new problem with scan process, would you please check my post kindly?
    B.R.
  • And I found that:
    When set DEFAULT_MAX_SCAN_RES as 0xff, scan process will hang up in dozens of seconds(there will be no more GAP_DEVICE_INFO_EVENT from stack).
    When set DEFAULT_MAX_SCAN_RES as 0x32, scan process will not hang up in half an hour(mybe it won't hang up anymore).
    After I flashed the board with DEFAULT_MAX_SCAN_RES 0x32 with CCS, then I flashed DEFAULT_MAX_SCAN_RES 0xff, it won't hang up either;

    When I erase the whole flash then flash with DEFAULT_MAX_SCAN_RES 0xff, it will hang up again.

    I am confused about how the stack works with scan process. It has something with flash memory settings?
  • Hi Leo,

    Maybe your issue could be caused by a memory leak/corruption?

    Can you check the ICall heap several times while running the application to see if the heap is growing? (See: dev.ti.com/.../ble-index.html )
  • Thank you, Marie,

    Seems the heap is growing while scanning process.

    I attach the raw log file here hope it helps to address this issue

    B.R.

    I2C Initialized!
    
    LedPlatformInit Initialized!
    
    BLE Observer
    0xA434F125979C
    Initialized
    Discovering...
    heapmgrBlkMax : 0x1b, heapmgrBlkCnt : 0x19, heapmgrBlkFree : 0x5, heapmgrMemUB : 0x17a8
    heapmgrMemAlo : 0x1734, heapmgrMemMax : 0x175c, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x20, heapmgrBlkCnt : 0x20, heapmgrBlkFree : 0x7, heapmgrMemUB : 0x1848
    heapmgrMemAlo : 0x17c4, heapmgrMemMax : 0x17ec, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x2a, heapmgrBlkCnt : 0x2a, heapmgrBlkFree : 0x8, heapmgrMemUB : 0x1928
    heapmgrMemAlo : 0x18d0, heapmgrMemMax : 0x18f8, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x30, heapmgrBlkCnt : 0x30, heapmgrBlkFree : 0x9, heapmgrMemUB : 0x19d4
    heapmgrMemAlo : 0x1a8c, heapmgrMemMax : 0x1ab4, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x3c, heapmgrBlkCnt : 0x3c, heapmgrBlkFree : 0x8, heapmgrMemUB : 0x1b4c
    heapmgrMemAlo : 0x1ab0, heapmgrMemMax : 0x1b38, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x3e, heapmgrBlkCnt : 0x3e, heapmgrBlkFree : 0x9, heapmgrMemUB : 0x1b90
    heapmgrMemAlo : 0x1bdc, heapmgrMemMax : 0x1c04, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x49, heapmgrBlkCnt : 0x49, heapmgrBlkFree : 0xb, heapmgrMemUB : 0x1cc4
    heapmgrMemAlo : 0x1c10, heapmgrMemMax : 0x1c88, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x49, heapmgrBlkCnt : 0x49, heapmgrBlkFree : 0xe, heapmgrMemUB : 0x1cc4
    heapmgrMemAlo : 0x1bb0, heapmgrMemMax : 0x1c88, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x49, heapmgrBlkCnt : 0x49, heapmgrBlkFree : 0x11, heapmgrMemUB : 0x1cc4
    heapmgrMemAlo : 0x1b50, heapmgrMemMax : 0x1c88, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x49, heapmgrBlkCnt : 0x49, heapmgrBlkFree : 0x14, heapmgrMemUB : 0x1cc4
    heapmgrMemAlo : 0x1b50, heapmgrMemMax : 0x1c88, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x49, heapmgrBlkCnt : 0x48, heapmgrBlkFree : 0x13, heapmgrMemUB : 0x1cc4
    heapmgrMemAlo : 0x1b50, heapmgrMemMax : 0x1c88, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x4c, heapmgrBlkCnt : 0x4c, heapmgrBlkFree : 0xc, heapmgrMemUB : 0x1d08
    heapmgrMemAlo : 0x1c40, heapmgrMemMax : 0x1cc8, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x4e, heapmgrBlkCnt : 0x4e, heapmgrBlkFree : 0xd, heapmgrMemUB : 0x1d4c
    heapmgrMemAlo : 0x1cc4, heapmgrMemMax : 0x1cec, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x50, heapmgrBlkCnt : 0x50, heapmgrBlkFree : 0xf, heapmgrMemUB : 0x1d4c
    heapmgrMemAlo : 0x1c64, heapmgrMemMax : 0x1cec, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x50, heapmgrBlkCnt : 0x50, heapmgrBlkFree : 0x12, heapmgrMemUB : 0x1d4c
    heapmgrMemAlo : 0x1ce8, heapmgrMemMax : 0x1d10, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x51, heapmgrBlkCnt : 0x51, heapmgrBlkFree : 0xf, heapmgrMemUB : 0x1d90
    heapmgrMemAlo : 0x1c88, heapmgrMemMax : 0x1d10, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x51, heapmgrBlkCnt : 0x51, heapmgrBlkFree : 0x12, heapmgrMemUB : 0x1d90
    heapmgrMemAlo : 0x1c28, heapmgrMemMax : 0x1d10, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x52, heapmgrBlkCnt : 0x52, heapmgrBlkFree : 0x13, heapmgrMemUB : 0x1d90
    heapmgrMemAlo : 0x1ce8, heapmgrMemMax : 0x1d10, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x53, heapmgrBlkCnt : 0x53, heapmgrBlkFree : 0x11, heapmgrMemUB : 0x1d90
    heapmgrMemAlo : 0x1c88, heapmgrMemMax : 0x1d10, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x55, heapmgrBlkCnt : 0x55, heapmgrBlkFree : 0x12, heapmgrMemUB : 0x1dd4
    heapmgrMemAlo : 0x1cac, heapmgrMemMax : 0x1d34, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x55, heapmgrBlkCnt : 0x55, heapmgrBlkFree : 0x15, heapmgrMemUB : 0x1dd4
    heapmgrMemAlo : 0x1c58, heapmgrMemMax : 0x1d34, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x55, heapmgrBlkCnt : 0x55, heapmgrBlkFree : 0x14, heapmgrMemUB : 0x1dd4
    heapmgrMemAlo : 0x1c7c, heapmgrMemMax : 0x1d34, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x55, heapmgrBlkCnt : 0x55, heapmgrBlkFree : 0x17, heapmgrMemUB : 0x1dd4
    heapmgrMemAlo : 0x1c1c, heapmgrMemMax : 0x1d34, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x55, heapmgrBlkCnt : 0x52, heapmgrBlkFree : 0x13, heapmgrMemUB : 0x1dd4
    heapmgrMemAlo : 0x1cc4, heapmgrMemMax : 0x1d34, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x5b, heapmgrBlkCnt : 0x5b, heapmgrBlkFree : 0x13, heapmgrMemUB : 0x1e5c
    heapmgrMemAlo : 0x1d4c, heapmgrMemMax : 0x1dd4, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x5b, heapmgrBlkCnt : 0x5b, heapmgrBlkFree : 0x13, heapmgrMemUB : 0x1e5c
    heapmgrMemAlo : 0x1e0c, heapmgrMemMax : 0x1e34, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x5e, heapmgrBlkCnt : 0x5e, heapmgrBlkFree : 0x13, heapmgrMemUB : 0x1ea0
    heapmgrMemAlo : 0x1e30, heapmgrMemMax : 0x1e58, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x60, heapmgrBlkCnt : 0x60, heapmgrBlkFree : 0x14, heapmgrMemUB : 0x1ee4
    heapmgrMemAlo : 0x1f38, heapmgrMemMax : 0x1f60, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x68, heapmgrBlkCnt : 0x68, heapmgrBlkFree : 0x14, heapmgrMemUB : 0x1fb0
    heapmgrMemAlo : 0x1ed8, heapmgrMemMax : 0x1f60, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x6b, heapmgrBlkCnt : 0x6b, heapmgrBlkFree : 0x16, heapmgrMemUB : 0x1ff4
    heapmgrMemAlo : 0x1efc, heapmgrMemMax : 0x1f84, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x6d, heapmgrBlkCnt : 0x6d, heapmgrBlkFree : 0x15, heapmgrMemUB : 0x2070
    heapmgrMemAlo : 0x2034, heapmgrMemMax : 0x205c, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x6f, heapmgrBlkCnt : 0x6f, heapmgrBlkFree : 0x13, heapmgrMemUB : 0x20b4
    heapmgrMemAlo : 0x1fd4, heapmgrMemMax : 0x205c, heapmgrMemFail : 0x0
    heapmgrBlkMax : 0x72, heapmgrBlkCnt : 0x72, heapmgrBlkFree : 0x16, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x2058, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x4
    heapmgrBlkMax : 0x72, heapmgrBlkCnt : 0x72, heapmgrBlkFree : 0x15, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x2008, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x4
    heapmgrBlkMax : 0x72, heapmgrBlkCnt : 0x72, heapmgrBlkFree : 0x18, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x2008, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x4
    heapmgrBlkMax : 0x72, heapmgrBlkCnt : 0x70, heapmgrBlkFree : 0x16, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x2008, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x4
    heapmgrBlkMax : 0x72, heapmgrBlkCnt : 0x70, heapmgrBlkFree : 0x16, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x202c, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x5
    heapmgrBlkMax : 0x72, heapmgrBlkCnt : 0x71, heapmgrBlkFree : 0x16, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x202c, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x6
    heapmgrBlkMax : 0x72, heapmgrBlkCnt : 0x71, heapmgrBlkFree : 0x16, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1fcc, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x8
    heapmgrBlkMax : 0x72, heapmgrBlkCnt : 0x71, heapmgrBlkFree : 0x19, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1ff0, heapmgrMemMax : 0x209c, heapmgrMemFail : 0xa
    heapmgrBlkMax : 0x72, heapmgrBlkCnt : 0x72, heapmgrBlkFree : 0x19, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f90, heapmgrMemMax : 0x209c, heapmgrMemFail : 0xb
    heapmgrBlkMax : 0x72, heapmgrBlkCnt : 0x72, heapmgrBlkFree : 0x18, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1fb4, heapmgrMemMax : 0x209c, heapmgrMemFail : 0xb
    heapmgrBlkMax : 0x72, heapmgrBlkCnt : 0x72, heapmgrBlkFree : 0x1b, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1fd4, heapmgrMemMax : 0x209c, heapmgrMemFail : 0xb
    heapmgrBlkMax : 0x72, heapmgrBlkCnt : 0x72, heapmgrBlkFree : 0x1a, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f74, heapmgrMemMax : 0x209c, heapmgrMemFail : 0xb
    heapmgrBlkMax : 0x73, heapmgrBlkCnt : 0x73, heapmgrBlkFree : 0x1a, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1ff8, heapmgrMemMax : 0x209c, heapmgrMemFail : 0xc
    heapmgrBlkMax : 0x73, heapmgrBlkCnt : 0x73, heapmgrBlkFree : 0x1a, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f98, heapmgrMemMax : 0x209c, heapmgrMemFail : 0xc
    heapmgrBlkMax : 0x73, heapmgrBlkCnt : 0x73, heapmgrBlkFree : 0x1d, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1ff8, heapmgrMemMax : 0x209c, heapmgrMemFail : 0xc
    heapmgrBlkMax : 0x73, heapmgrBlkCnt : 0x73, heapmgrBlkFree : 0x1a, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1ff8, heapmgrMemMax : 0x209c, heapmgrMemFail : 0xd
    heapmgrBlkMax : 0x73, heapmgrBlkCnt : 0x72, heapmgrBlkFree : 0x19, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f98, heapmgrMemMax : 0x209c, heapmgrMemFail : 0xf
    heapmgrBlkMax : 0x73, heapmgrBlkCnt : 0x72, heapmgrBlkFree : 0x1b, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1fd0, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x11
    heapmgrBlkMax : 0x74, heapmgrBlkCnt : 0x74, heapmgrBlkFree : 0x1c, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f70, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x11
    heapmgrBlkMax : 0x74, heapmgrBlkCnt : 0x74, heapmgrBlkFree : 0x1c, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f64, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x11
    heapmgrBlkMax : 0x74, heapmgrBlkCnt : 0x73, heapmgrBlkFree : 0x1b, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f64, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x11
    heapmgrBlkMax : 0x74, heapmgrBlkCnt : 0x73, heapmgrBlkFree : 0x1d, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f28, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x12
    heapmgrBlkMax : 0x74, heapmgrBlkCnt : 0x73, heapmgrBlkFree : 0x1d, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f28, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x13
    heapmgrBlkMax : 0x74, heapmgrBlkCnt : 0x73, heapmgrBlkFree : 0x20, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1ecc, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x13
    heapmgrBlkMax : 0x74, heapmgrBlkCnt : 0x72, heapmgrBlkFree : 0x1f, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f50, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x14
    heapmgrBlkMax : 0x76, heapmgrBlkCnt : 0x76, heapmgrBlkFree : 0x1e, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f68, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x15
    heapmgrBlkMax : 0x76, heapmgrBlkCnt : 0x76, heapmgrBlkFree : 0x21, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f68, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x15
    heapmgrBlkMax : 0x76, heapmgrBlkCnt : 0x75, heapmgrBlkFree : 0x1f, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f8c, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x16
    heapmgrBlkMax : 0x76, heapmgrBlkCnt : 0x74, heapmgrBlkFree : 0x1e, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1fb0, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x16
    heapmgrBlkMax : 0x76, heapmgrBlkCnt : 0x74, heapmgrBlkFree : 0x1d, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1fc0, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x1a
    heapmgrBlkMax : 0x76, heapmgrBlkCnt : 0x75, heapmgrBlkFree : 0x1d, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f80, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x1b
    heapmgrBlkMax : 0x76, heapmgrBlkCnt : 0x75, heapmgrBlkFree : 0x20, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f44, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x1d
    heapmgrBlkMax : 0x76, heapmgrBlkCnt : 0x76, heapmgrBlkFree : 0x23, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1ee4, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x1d
    heapmgrBlkMax : 0x77, heapmgrBlkCnt : 0x77, heapmgrBlkFree : 0x24, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1ed8, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x1d
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x78, heapmgrBlkFree : 0x24, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f5c, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x1d
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x77, heapmgrBlkFree : 0x23, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f08, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x1e
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x77, heapmgrBlkFree : 0x25, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f2c, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x21
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x76, heapmgrBlkFree : 0x24, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f30, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x27
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x77, heapmgrBlkFree : 0x24, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f30, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x27
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x76, heapmgrBlkFree : 0x23, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f58, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x28
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x77, heapmgrBlkFree : 0x22, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f04, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x28
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x77, heapmgrBlkFree : 0x24, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1ec8, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x29
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x77, heapmgrBlkFree : 0x24, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1f28, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x29
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x77, heapmgrBlkFree : 0x24, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1ec8, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x2b
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x77, heapmgrBlkFree : 0x24, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1efc, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x2e
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x77, heapmgrBlkFree : 0x26, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1e9c, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x2e
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x77, heapmgrBlkFree : 0x28, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1e70, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x2f
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x77, heapmgrBlkFree : 0x2b, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1e94, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x30
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x77, heapmgrBlkFree : 0x2a, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1e34, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x31
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x77, heapmgrBlkFree : 0x2d, heapmgrMemUB : 0x20f8
    heapmgrMemAlo : 0x1e94, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x32
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x78, heapmgrBlkFree : 0x2a, heapmgrMemUB : 0x20fc
    heapmgrMemAlo : 0x1eb8, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x38
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x78, heapmgrBlkFree : 0x2a, heapmgrMemUB : 0x20fc
    heapmgrMemAlo : 0x1e58, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x38
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x78, heapmgrBlkFree : 0x2d, heapmgrMemUB : 0x20fc
    heapmgrMemAlo : 0x1eb8, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x39
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x78, heapmgrBlkFree : 0x2a, heapmgrMemUB : 0x20fc
    heapmgrMemAlo : 0x1e58, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x3b
    heapmgrBlkMax : 0x78, heapmgrBlkCnt : 0x78, heapmgrBlkFree : 0x2d, heapmgrMemUB : 0x20fc
    heapmgrMemAlo : 0x1e58, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x3b
    heapmgrBlkMax : 0x79, heapmgrBlkCnt : 0x78, heapmgrBlkFree : 0x2a, heapmgrMemUB : 0x20fc
    heapmgrMemAlo : 0x1e4c, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x3d
    heapmgrBlkMax : 0x79, heapmgrBlkCnt : 0x79, heapmgrBlkFree : 0x2d, heapmgrMemUB : 0x20fc
    heapmgrMemAlo : 0x1e90, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x3f
    heapmgrBlkMax : 0x79, heapmgrBlkCnt : 0x79, heapmgrBlkFree : 0x2c, heapmgrMemUB : 0x20fc
    heapmgrMemAlo : 0x1e3c, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x41
    heapmgrBlkMax : 0x7a, heapmgrBlkCnt : 0x79, heapmgrBlkFree : 0x2c, heapmgrMemUB : 0x20fc
    heapmgrMemAlo : 0x1e9c, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x41
    heapmgrBlkMax : 0x7a, heapmgrBlkCnt : 0x79, heapmgrBlkFree : 0x2c, heapmgrMemUB : 0x20fc
    heapmgrMemAlo : 0x1e9c, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x41
    heapmgrBlkMax : 0x7a, heapmgrBlkCnt : 0x79, heapmgrBlkFree : 0x2c, heapmgrMemUB : 0x20fc
    heapmgrMemAlo : 0x1e3c, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x41
    heapmgrBlkMax : 0x7a, heapmgrBlkCnt : 0x7a, heapmgrBlkFree : 0x2c, heapmgrMemUB : 0x20fc
    heapmgrMemAlo : 0x1e60, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x45
    heapmgrBlkMax : 0x7b, heapmgrBlkCnt : 0x7b, heapmgrBlkFree : 0x2d, heapmgrMemUB : 0x20fc
    heapmgrMemAlo : 0x1e54, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x46
    heapmgrBlkMax : 0x7b, heapmgrBlkCnt : 0x7a, heapmgrBlkFree : 0x2c, heapmgrMemUB : 0x20fc
    heapmgrMemAlo : 0x1e60, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x47
    heapmgrBlkMax : 0x7b, heapmgrBlkCnt : 0x7a, heapmgrBlkFree : 0x2c, heapmgrMemUB : 0x20fc
    heapmgrMemAlo : 0x1e60, heapmgrMemMax : 0x209c, heapmgrMemFail : 0x4a

  • Hi Leo,

    I would expect the heap to grow while the scanning is in progress, since you're gathering information on more and more devices. However, after GAP_DEVICE_DISCOVERY_EVENT I would expect it to be re-set.

    If you simply have an issue with "too small heap to handle your application" you should try to increase the heap size. You can see this app note: http://www.ti.com/lit/swra537