[BLE central] Get the list of all nearby peripheral.

Hello, 

I'm working on a BLE central multilink application, where I want to get the list of all peripherals in range, In order to let the user select the needed periherals.

I can create a list based on "device_found" callback and delete sensors that we didn't detect since "x" seconds, but I was wondering if there is an easier way of doing so.

Best Regards.

Martin.

Parents
  • Hi

    Please check out the Bluetooth LE scanning documentation for more understanding into how scanning is done. I'm afraid we don't have a specific sample showcasing how to manage a list like this, and the suggested way to do so would be to manage it manually as Sawyer suggested. Do you have a specific question on what you're struggling with on your end we will try to help out.

    Best regards,

    Simon

  • Hi Simon, thanks for the response.

    What I want to do is having an "updated" list of nearby sensor. In that need I want to know if the sensor is still in range or not.

    The issue I'm facing is that I don't know when to delete the sensor from the list when I don't receive advertising packet anymore.

    Should I put a timeout for each device on advertising packet, should I try to connect periodically to all detected device to know if there are still in range ?

    Or maybe just keep all device scanned in the list.

    I'm trying to find the easiest way to do so.

    Do you know how the scanning it's done on regular phone ? 

    Best Regards.

    Martin. 

Reply
  • Hi Simon, thanks for the response.

    What I want to do is having an "updated" list of nearby sensor. In that need I want to know if the sensor is still in range or not.

    The issue I'm facing is that I don't know when to delete the sensor from the list when I don't receive advertising packet anymore.

    Should I put a timeout for each device on advertising packet, should I try to connect periodically to all detected device to know if there are still in range ?

    Or maybe just keep all device scanned in the list.

    I'm trying to find the easiest way to do so.

    Do you know how the scanning it's done on regular phone ? 

    Best Regards.

    Martin. 

Children
Related