Page 1 of 1

BLEclient

Posted: Mon Oct 23, 2017 11:34 am
by mgsnmp
I use BLEclient to print to BLEprinter. It works well, but ...
   My application without BT stack, heap_free = 0x24000
   If I compile with BTstack, it gives heap_free = 0x12000
   After running BLEclient, connect and print, it gives heap_free = 0x9000
  
   That means push, the system takes about 100kByte ram.
   It's not too much?
  
   Setting up BT in sdkconfig is:
CONFIG_AWS_IOT_SDK =
CONFIG_BT_ENABLED = y
CONFIG_BLUEDROID_ENABLED = y
CONFIG_BTC_TASK_STACK_SIZE = 3072
CONFIG_BLUEDROID_MEM_DEBUG =
CONFIG_CLASSIC_BT_ENABLED =
CONFIG_GATTS_ENABLE =
CONFIG_GATTC_ENABLE = y
CONFIG_BLE_SMP_ENABLE =
CONFIG_BT_STACK_NO_LOG = y
CONFIG_BT_ACL_CONNECTIONS = 2
CONFIG_BTDM_CONTROLLER_RUN_CPU = 0
CONFIG_SMP_ENABLE =
CONFIG_BT_RESERVE_DRAM = 0x10000

   The last item can not be changed !!!!!

Thank you for your response.

Re: BLEclient

Posted: Mon Oct 23, 2017 2:37 pm
by kolban
I think your question is a good one. My mind didn't go to "wow 100K ... thats too much" .... but rather wen't to "How much RAM does a BLE stack normally use?". Obviously, we don't get something for nothing. If we want a BLE environment, we should expect to pay some RAM for its existence and maintenance. It has to be able to receive radio packets and buffer them for delivery to the application layer. It has to be able to take packets of data from the applications and store them till the radio becomes available, they can be transmitted and acknowledged as having been received. So some RAM cost will appear to always be required.

The question in my mind is "how much should we expect to pay for that?".

When shopping, I don't like to go into a store without knowing the approximate price of what I should expect to pay. If the clerk at the store says "That will be $100" without a benchmark, I don't know if that is fair, grossly expensive or a bargain. With that notion, what I'd be interested to hear is what the RAM cost of BLE is in other environments? For example, what is the RAM cost on an Android phone, an iOS phone, Linux, Windows and especially, alternative MCUs which have BLE such as the Nordic products (are there other BLE MCUs on the market?).

Re: BLEclient

Posted: Tue Oct 24, 2017 1:25 pm
by jumjum123
@kolban,
thats a good point. During my search, I found this http://www.argenox.com/bluetooth-low-en ... h-chipset/
Is this a base to compare memory footprint, or is it more or less a comparison of apples and oranges ?