Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Configuring BLE on nRF52 using modern TWS mechanism

Hi to you all. I have a question about how I can apply this mechanism in nRF52.

In modern TWS, it works like the phone or PC connects earbuds separately and sends and receives data between them. So, I want to apply this mechanism to the BLE service. While searching the BLE devices I want to see one name but when I connect BLE I want to get data from two devices. Which example of the nRF SDK meets my requirements while developing the BLE service? I just want to send data that I read from ADC to the PC or phone side of the system. PC or phone will connect two devices under the same name. 

Thanks for helping. Have a great day.

Parents Reply
  • Hi Hung Bui,

    Thanks for your reply. I am using nRF5 SDK. Thanks for your advice. The working mechanism of this configuration is like master-slave right? One of them will be the slave and send data to the master device and the master device will communicate with a PC or phone. I will try this configuration.

    But I also try to make independent connections via Bluetooth. I want the phone or PC to be connected to the devices separately. Just like in modern TWS headphones. Can I integrate this? Does it allow such a configuration? If so, which examples should I review?

    Again thanks for your reply. Have a great day.

Children
  • Hi Omer, 

    omerBzkrt said:
    But I also try to make independent connections via Bluetooth. I want the phone or PC to be connected to the devices separately. Just like in modern TWS headphones. Can I integrate this? Does it allow such a configuration? If so, which examples should I review?

    Please elaborate more on what you want on this. 
    So you want the possibility of connect to either of the device and then can request data from the other device, correct ? I think it's possible. You will need both device can act as central + peripheral and they can share data between each other. 

  • Thanks for your reply Hung Bui,
    This is the result that I gave from one of the AI tools. According to this table, there are two options for creating my project based on my requirements. So you answered my question using the first option which is this one Dual Peripheral Mode (One Connection to Phone). So now I am wondering if there are any examples of the second option which is Independent Connections (TWS-Style, Two Connections to Phone). If so, which examples should I review?

    Thanks for your reply.

    Feature Dual Peripheral Mode (One Connection to Phone) Independent Connections (TWS-Style, Two Connections to Phone)
    Phone Connections 1 BLE connection (Primary forwards Secondary data) 2 BLE connections (Each nRF52 connects directly)
    Synchronization Easier (Primary syncs Secondary before sending) Harder (Phone must handle desync issues)
    Latency Slightly higher (due to forwarding) Lower (direct phone communication)
    Scalability More complex to add extra devices Easier to extend to more devices
    Power Consumption Lower (only 1 device actively connected to phone) Higher (both devices maintain a connection)
    Robustness More reliable (only 1 phone connection) Potential instability (phone handles two connections)
    BLE Bandwidth More efficient (1 connection uses less BLE bandwidth) Higher BLE bandwidth usage (two active connections)
    Implementation Complexity More complex (requires BLE Peripheral + Central roles) Simpler (both act as independent peripherals)
  • Hi Omer, 
    So you want to have two separate connection to two separate peripherals ?
    If it's the case I think any sample in the SDK can do that. You just need to flash them with the same sample, for example peripheral_uart . The phone will then see 2 devices and can connect to them one by one. 
    If you want that the phone only see one but when connecting it connect to two. Then you need to implement your  mechanism in the phone's app to do so. As AI already mentioned, the phone need to handle the sync of the two peripherals and the connect/disconnect need to be done for both peripherals. 

Related