How to speed up connection and database discovery.

Hi,

we are developing a system based on device with nRF52840 S140 ( central and pheripheral).

We developed on both side a custom service.

System is working fine bonding with PM manager.

PM manager is working as I can see that exchange of passekey occurs only at the first connection.

Problem: as we have 4 pheripheral the connection is very slow (several seconds).

Question 1:

Reading documentation about PM it seems possible to store information about service and characteristics. 
I am not sure this information are actually stored. I am sure the information are not used as the system always repeat the database discovery?
Is it possible to cache the information at the first connection to use them in the following connections?
If yes how is it possible to do this? Any example or documentation related?

Question 2:

We know which services and characteristic will be found as we have full control of the pheripheral and we know they will never change.
Is it possible to skip service discovery passing to the SD the needed information?

Thanks

Alessandro

Parents
  • Hi Alessandro

    1. Indeed, the application has control over when it wants to do a service discovery. If you store the handles of the characteristics together with the peer address after a service discovery they should be stored. I don't think we have an example doing this unfortunately. But reading the usage page on the Database discovery module and Peer Manager should be helpful.

    2. No,  service discovery is necessary to ensure that the client interacts with the servers characteristics using the correct attributes handles. Service discovery is also important because Bluetooth LE advertising does not mandate that all services are advertised.

    Best regards,

    Simon

  • Hi Simon,

    I read something about Database discovery module (not so detailed documentation) but solution 1 and 2 bring me to the same oubt.

    You wrote:

    • service discovery is necessary to ensure that the client interacts with the servers characteristics using the correct attributes handles 

    I know in advance the server characteristic or I can store and recover them with Peer Manager, fine.
    But how I can link characteristic with handles?

    On the pheripheral (server) I have: 

    sd_ble_gatts_service_add() and sd_ble_gatts_characteristic_add()

    I have found to similar function for the client.

    So, how to establish connection after the database restore?

    Note: searching in the forum I have found this thread Can BTLE communication happen without service discovery?

    They have our similar issue: database discovery taking 1.5s also with 7.5ms of connection interval.
    I guess I have to investigate about this.
    Do you have any suggestion about it? 


    Alessandro

Reply
  • Hi Simon,

    I read something about Database discovery module (not so detailed documentation) but solution 1 and 2 bring me to the same oubt.

    You wrote:

    • service discovery is necessary to ensure that the client interacts with the servers characteristics using the correct attributes handles 

    I know in advance the server characteristic or I can store and recover them with Peer Manager, fine.
    But how I can link characteristic with handles?

    On the pheripheral (server) I have: 

    sd_ble_gatts_service_add() and sd_ble_gatts_characteristic_add()

    I have found to similar function for the client.

    So, how to establish connection after the database restore?

    Note: searching in the forum I have found this thread Can BTLE communication happen without service discovery?

    They have our similar issue: database discovery taking 1.5s also with 7.5ms of connection interval.
    I guess I have to investigate about this.
    Do you have any suggestion about it? 


    Alessandro

Children
No Data
Related