This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Advertisement and encryption performance

I am developing an advertise only code.

  1. There is PERIPHERAL_LINK_COUNT macro in ble_app_template that is used by the softdevice to reserve RAM for peripheral link. Since, I only want to advertise, not connect to any central, can I set PERIPHERAL_LINK_COUNT to zero ? ( I tried to set it to zero, but its giving error )

  2. I want to advertise only. So, from performance point of view, which is better - advertising without using softdevice or by using softdevice ?

  3. Is it possible to encrypt whole advertisement packet using AES-CCM module ? (assuming, keys are already present on peripheral and central)

  4. If it is possible, then from performance point of view, which is better - AES-CCM encryption using timeslot API and advertise using softdevice OR use AES-CCM peripheral directly and advertise without softdevice ?

Thanks in advance.

Parents
    1. if you get an error - set it to 1, you don't really care anyway, it's just a little bit of RAM (I would expect zero to work however)

    2. using the softdevice is going to be much much much much easier, so unless you are totally resource constrained for some reason, use the softdevice.

    3. It's possible to encrypt the payload data, obviously the actual packet itself is unencrypted, that's the BTLE standard.

    4. You don't need to encrypt with the timeslot API, you can just encrypt and then set the advertising data into the packet. So I would start with softdevice and just encrypting the payload before setting it. If that doesn't perform well enough then start optimising then.

  • Does sd_ecb_block_encrypt() not do what you want?

Reply Children
No Data
Related