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
  • it's not like the user will see 0x53af2043bd or whatever and then say yeah that's my device.

    If you're (very?) lucky, the MAC address might be printed on the unit or its packaging or documentation.

    But, in general, you're probably right - it's not meaningful to the user.

    But it is meaningful to the nRF - so you can use it to distinguish devices to the nRF. And the nRF can give it to the app.

    So you'd probably still need some guided user interaction at the app for the user to identify which peripheral is which.

    Yes, you still have troubles with the iOS restrictions.

    But it's your project. I don't know the (full) details of what you're trying to achieve or why. I'm just throwing you some ideas - you need to think it all through.

    PM me if you want to discuss private consultancy...

Children
No Data
Related