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

S132: What effect does is_var_len have in the softdevice?

The documentation simply says: 1 for variable length and 0 for fixed length.

What exactly does changing this do? Do I save space by setting it to fixed? Why does BDS set it to 1 by default.

Parents
  • Hi,

    is_var_len indicates if the user characteristic descriptor has variable length or not. When you are setting up characteristics there is a vlen field can be set to mark a characteristic as variable length. A characteristic can either be of constant length (vlen = 0), or of variable length (vlen = 1).

    E.g. for the UART characteristics, it makes sense to have vlen = 1, since you may want to transmit any size of data from e.g. 1 to 20 bytes. But, e.g. for the Temperature Type, which is a fixed length characteristic (it has 8 bits and every bit is fixed),vlen should be 0.

  • You typically have a fixed number of packets that can be sent each connection interval, and a fixed maximum size of each packet. So if you want to maximize the throughput you want to fill the whole packet with useful data. For really maximizing the throughput, you also want to have DLE and Connection Event Length Extension. You can read more about this in e.g. this blog post here: devzone.nordicsemi.com/.../

Reply Children
No Data
Related