Cannot maintain two connections for a 5340 running as Peripheral and Central

I am running the 5340 audio example on three dev kits. My goal is to have the gateway to act as a peripheral and a central so that the device can connect to the two headphones and so that a remote phone can connect to it so that it can control the gateway.

  • Phone connection
  • NRF5340 Gateway
    • NRF5340 Headphone L
    • NRF5340 Headphone R

I modified the gateway code so that advertises similarly to the headphone code, but checks the role connections/disconnections on whether it is a PERIPHERAL or CENTRAL. I can get it to connect as a peripheral and can get it to connect as central but not simultaneously. I read through Zephyr and Bluetooth specification and it says that it is possible, but my device keeps kicking off my phone connection:

The Link Layer state machine allows only one state to be active at a time. The
Link Layer shall have at least one Link Layer state machine that supports one
of Advertising state or Scanning state. The Link Layer may have multiple
instances of the Link Layer state machine.

My main questions are: 

  1. How do I prevent them from kicking it off? Do I need to make a separate thread?
  2. For media or remote control for the phone, where should I look? is it MCS/MPS examples?
Parents Reply Children
No Data
Related