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.

BLE-STACK: Will Broadcaster+Observer combo role ever be supported in BLE-Stack 3.0?

Part Number: BLE-STACK
Other Parts Discussed in Thread: CC2640, CC3120, CC2650

Hi,

I wanted to revisit this issue: https://e2e.ti.com/support/wireless_connectivity/bluetooth_low_energy/f/538/t/594239

I had said that the difference in flash memory usage between "-DHOST_CONFIG=PERIPHERAL_CFG+OBSERVER_CFG" and "-DHOST_CONFIG=BROADCASTER_CFG+OBSERVER_CFG" was negligible, but now I'm finding that isn't true.

On my latest builds I am seeing  ~5kB more flash memory usage with the addition of the peripheral role.

Are there any plans to support a broadcaster+observer combination in the future? Or is there any way I can open a request to do so? It was supported and we use it with BLE-Stack 2.0 so I know it's possible.

Our memory constraints are getting pretty tight and having this feature would help tremendously as it would save us a few kB.

Thank You,
Josh

  • To elaborate more, here is the difference between OBSERVER and PERIPHERAL+OBSERVER as shown in the linker map files:

    OBSERVER:

    C:\ti\simplelink_cc2640r2_sdk_1_30_00_25\source\ti\blestack\blelib\ctrl\cc2640_ll_xxxo.a
           ll.o                                     1228    0         200    
           ll_common.o                              116     0         0      
           ll_config.o                              0       102       32     
           ll_data.o                                20      0         8      
           ll_error_end_causes.o                    2       0         0      
           ll_isr.o                                 828     0         0      
           ll_scan_end_causes.o                     540     0         40     
           ll_scheduler.o                           904     0         12     
        +--+----------------------------------------+-------+---------+---------+
           Total:                                   3638    102       292    
                                                                             
        C:\ti\simplelink_cc2640r2_sdk_1_30_00_25\source\ti\blestack\blelib\hci_tl\cc26xx_hci_tl_none.a
           hci_tl.o                                 232     24        5      
        +--+----------------------------------------+-------+---------+---------+
           Total:                                   232     24        5      
                                                                             
        C:\ti\simplelink_cc2640r2_sdk_1_30_00_25\source\ti\blestack\blelib\host\cc26xx_gap_xxxo.a
           gap_centdevmgr.o                         1448    0         16     
        +--+----------------------------------------+-------+---------+---------+
           Total:                                   1448    0         16    

    PERIPHERAL+OBSERVER:

        C:\ti\simplelink_cc2640r2_sdk_1_30_00_25\source\ti\blestack\blelib\ctrl\cc2640_ll_pxxo.a

           ll.o                                     2452    0         200    
           ll_common.o                              564     0         0      
           ll_config.o                              0       102       32     
           ll_data.o                                20      0         8      
           ll_error_end_causes.o                    2       0         0      
           ll_isr.o                                 1976    0         0      
           ll_scan_end_causes.o                     540     0         40     
           ll_scheduler.o                           1840    0         12     
        +--+----------------------------------------+-------+---------+---------+
           Total:                                   7394    102       292    
                                                                             
        C:\ti\simplelink_cc2640r2_sdk_1_30_00_25\source\ti\blestack\blelib\hci_tl\cc26xx_hci_tl_none.a
           hci_tl.o                                 232     24        5      
        +--+----------------------------------------+-------+---------+---------+
           Total:                                   232     24        5      
                                                                             
        C:\ti\simplelink_cc2640r2_sdk_1_30_00_25\source\ti\blestack\blelib\host\cc26xx_gap_pxxo.a
           gap_centdevmgr.o                         1448    0         16     
        +--+----------------------------------------+-------+---------+---------+
           Total:                                   1448    0         16     
                                                                             
        C:\ti\simplelink_cc2640r2_sdk_1_30_00_25\source\ti\blestack\blelib\host\cc26xx_profiles_pxxo.a
           gattservapp.o                            1304    0         0      
        +--+----------------------------------------+-------+---------+---------+
           Total:                                   1304    0         0

    5060 bytes is the maximum amount of savings we could expect assuming the broadcaster role added zero overhead. I'd imagine it would add realistically add about ~2kB overhead, so we'd still see about ~3kB in savings.

    Full disclosure, we're using the older 1.30.00.25 version but I don't imagine the newer versions would change much.

    Thanks,
    Josh


  • Hi Josh,

    How are you estimating the number for the addition of the Broadcaster role? I can run some tests to try to determine a more precise number.

    In the meantime, what steps have you already taken to try to reduce flash size? Is your project based on the Simple_Observer project?
  • Hi Rachel,

    I'm making the assumption that the Broadcaster role is less complex than the Peripheral role. There is no need for the GATT server (gattservapp.o == 1304 bytes), and that the link-layer code (ll.o) will be probably be less complex. So I think minus the 1304 bytes, plus some additional overhead, we could save on the order of 2kB (or at least the 1.3kB, which isn't insignificant).

    In our particular use case, we have multiple models of devices that share a common firmware, with dead code compiled out based on the model. Some models only use the Observer role (they only scan), but our other devices must be able to scan and advertise BLE messages (hence the need for Broadcaster or Peripheral role).

    We've put in a lot of effort to reduce the flash size (trust me...), and there is still more we can do, but we'll have to start getting pretty creative. In addition to TI-RTOS, the BLE-Stack, and our application code, we are also running the CC3120 SDK, so memory gets eaten up pretty quickly nowadays.

    I figured I would at least request if it's possible since it seems like pretty low-hanging fruit, and I assume it shouldn't be too difficult to do.

    Thanks,
    Josh
  • Hi Josh,

    I will put in a request to add the broadcaster + observer libraries. As JXS hinted in the other thread, the ROM between the CC2650 and the CC2640R2 is different so I'm not sure how much effort this change requires.

    You didn't provide specifics as to what steps you have already taken so I'm not sure what else to suggest. Can you attach your full memory map to the post?
  • Hi Josh,

    One more thing, have you looked into using the Micro BLE Stack? It is intended to be used in memory constrained applications where connections are not required. dev.ti.com/.../index.html

    In the SimpleLink CC2640R2 v1.30. SDK, only the broadcaster role was supported but in later releases, we added the connection monitor which supports the observer role. The effort required to port and the limitations of the micro stack might make this solution unrealistic for you but it has a much smaller footprint than the BLE-Stack.
  • Hi Rachel,

    I probably can't include our memory map because it's proprietary firmware. It probably wouldn't do much good anyway, as I said, we've already done a ton to reduce the memory footprint, and there is still some left we can do. It's just that allowing this role combination would give us another knob to turn.

    Is there a way for me to follow the request you made to add the Broadcaster+Observer role combination? A public issue tracker or anything?

    Also, I had looked into the Micro Stack at one point, I forget exactly why but I remember not being able to use it for our application. If there have been changes made I'll check it out again, thanks for the suggestion!

    Thank You,
    Josh

  • Hi Josh,

    Unfortunately, we do not have a public bug tracker but the request has been filed. You can subscribe for alerts on the download page (http://www.ti.com/tool/SIMPLELINK-CC2640R2-SDK) and then when a new SDK is released, you can check the release notes for the addition of the Broadcaster + Observer role.

    If you are interested in re-evaluating the Micro Stack, please use the latest version which is in the SimpleLink CC2640R2 SDK v1.50.00.58. Reading the Micro Stack chapter in the BLE-Stack User's Guide should give you a pretty clear answer about whether or not it will work for you. If there is something about it that doesn't work for your application, please let me know.