Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to tell a peripheral to switch to central mode and connect to another specific peripheral?

Hello,

I'm not posting this as a problem, but rather to get some suggestions and ideas about this feature. I have a device based on the NRF52832. It is meant to work as a peripheral, but now I want to extend its features by connecting to other peripherals, for example, a BLE GPS receiver to get GPS data.

My device does not have a screen or any buttons, but I have a working app that connects to my peripheral. I would like to somehow choose in the app the peripheral I want my device to connect to.

I'm looking for suggestions on how to go about this. My initial idea is that the app should scan for devices, then the user would choose one and the app would tell the device to enable central mode and to start scanning for the chosen device. What would be a good way to identify the same device in both the app and the device?

Thanks in advance for your insights!

Parents Reply
  • Correct.

    But, once your app has identified which device is which, it can tell your device the appropriate MAC address.

    Or, back to the earlier suggestion, your device sends a list of MAC+Name pairs to the app...

    Maybe I should just ask the user in the app to turn off conflicting devices

    Well, if the devices can't be distinguished by their names (which seems common), then you're going to have to work out some plan for how to distinguish them - maybe by the app telling the user to switch only one on at a time...

Children
Related