Switching between BLE Peripheral and Central modes

Hi


I am working on two similar projects, one legacy project using Keil uVision and nRF SDK 17, and the other using VS Code.
Both applications operate as BLE peripherals. The VS Code app was developed starting with Nordic’s Peripheral UART example.

What I am trying to do is the following (for both applications):

  • Power up as a BLE Peripheral, and wait until BLE connection established with a Central node.
  • Then, disconnect and run as a BLE Central node for a short time – enough time to connect and disconnect with another BLE peripheral.
  • Then return to running as a BLE Peripheral, so that it can connect with the original BLE Central node again

Are there any SDK or VSCode examples that demonstrate switching modes from Peripheral to Central (and back)?

Related