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

How do I minimize the number of connection messages sent?

I'm looking at a BLE application using the nRF51822 where we need to send data maybe once every 10 minutes, so it seems like disconnecting in between sending messages will save a lot of battery life. However, each time a connection is made, in between advertising and the actual data transfer, there are a whole bunch of L2CAP messages being sent at about 25 ms intervals.

I haven't yet worked out exactly what they're for, but it seems like they're to do with negotiating the connection parameters and/or synchronizing between the devices. Many of them have the data type L2CAP-C, with no actual data being sent, and some of them contain link layer commands.

I assume they are unavoidable, but what can I do to minimize the number of messages being sent? Failing that, what exactly are they, and what are they for?

Thanks in advance!

Parents
  • If your Peripheral device have a bond with the Central, there will be a certain number of packets going back and forth, to re-establish the encrypted link. As you say, there is unfortunately not much you can do with this.

    Having an unencrypted link would remove those encryption packages, but instead, you'd see a complete service discovery being done, which will most often be more packages.

    Finally, the interval between them is given by the connection interval, so reducing that interval can possibly make this go faster. However, depending on the smartphone platform involved, there might be limitations on what connection parameters you are allowed to use.

Reply
  • If your Peripheral device have a bond with the Central, there will be a certain number of packets going back and forth, to re-establish the encrypted link. As you say, there is unfortunately not much you can do with this.

    Having an unencrypted link would remove those encryption packages, but instead, you'd see a complete service discovery being done, which will most often be more packages.

    Finally, the interval between them is given by the connection interval, so reducing that interval can possibly make this go faster. However, depending on the smartphone platform involved, there might be limitations on what connection parameters you are allowed to use.

Children
No Data
Related