BLE packet drops when Bluetooth and BLE are simultaneously in use - bluetooth

I am using BLE v4.1 for my application where I am able to transfer 200 packets of length 20 bytes each from peripheral to central side.
I want to transfer data via BLE and play some music while the data is being transferred. The music file is available locally and will be played on earphones(can be wired or wireless BlueTooth earphones)
I am facing an issue of packet drops around 15-20% when I am playing audio through wireless earphones while data is being transferred via BLE and audio is played on phone Bluetooth earphones(tried on Android and iOS, both) simultaneously.
With wired earphones connected; there is no issue, I can transfer data via BLE and play audio smoothly without any issue but things are different with wireless Bluetooth earphones case. I tried it with different Android phones(Android 11, different manufacturers) and different BlueTooth earphones, the issue still exists.
What could be a cause for the same and how can I debug it?

Bluetooth and Bluetooth Low Energy has only one radio that can only do one thing at a time. The connection events are scheduled and cannot overlap. This means the throughput is shared among all connected devices. You will get a higher throughput per device with only one connection than with two connections.
You will have to experiment with connection interval and connection event length to find parameters that seems to work, and test with multiple Bluetooth controllers (phones), since all have different scheduling algorithms.

Related

Connect Multiple Bluetooth Speakers with Raspberry Pi

I'm trying to connect several bluetooth devices with Raspberry PI to use them as speakers.
I'm using RetroPie as a distribution, because of the tests I've done it's the only one that matches and allows continuous synchronization with several bluetooth devices at the same time.
However, the system only detects the first device that connects as a sound card, the rest keep the bluetooth synchronization active, but it does not interpret them as audio cards even though it is indicated by blueman-manager.
Is there anything I can do to keep all devices synchronized and supported as audio cards?
Palm,
even so this a old post, it is not yet closed.
As I just got the same issue, here my answer.
What you try to do is to connect mutliple audio sreaming services (Speakers) to 1 audio bluetooth source, that is not possible like this. Therefore your PC only connects to the first box.
You could try multiple bluetooth dongles, but then you run into the timing issue with audio stream syncronization between the boxes.
The only solution is to use Bluetooth 4.1 upwards master-slave services.
Therefore the Speakers need to be connected to each other and seen as 1 device from the PC. In that mode the stream is skewed to ensure syncronous playing.
Many new Bluetooth speakers support this mode.
Hope that helped.

iOS Core Bluetooth peripheral scan question: how to distinguish multiple devices advertising at the same time

We have multiple devices (same kind) advertising at the same time. But in iOS, all the advertising packets are treated as one device.
Understand the reason: iOS filtered out the BLE address for privacy reasons.
Without BLE address the advertising packets from the difference devices are exactly the same.
My question is: is it possible to use iOS core bluetooth to tell there are multiple devices are advertising?
Thanks

Control multiple BLE peripherals with one central

I am pretty new to IoT and BLE. What I want to achieve is to write on GATT characteristic of at least 100 peripheral devices simultaneously or in a very short period of time(i.e. less than 100ms). Currently my peripherals are Ble nano (nRF51822) with custom GATT service running on them. I am using my Mac as central BLE. I am using Node.js and noble to implement the central. I want to know if such thing is possible at all and if possible, please link me to an example code. :)
You should note that Bluetooth chips for computers are usually (quite arbitrarily) limited to only a few simultaneous connections. Common values are between 3 and 14. Even if you connect a few at a time, send the characteristic value, disconnect and then connect next devices it would be impossible to do this within 100 ms. If you want to send the same data to everyone you should instead let your computer advertise and the nrf devices scan. That way you broadcast the data instead.

What is bluetooth le multi advertising?

I couldn't find a clear explanation what is Bluetooth le multi advertising.
For example, in Specification of the Bluetooth System, I see only
description of BLE advertising but not multi advertising.
What the difference between BLE advertising and multi advertising?
Thanks
LE Multi advertising refers to a specific offload (non bluetooth specification) feature that has been implemented in the Android releases by Google, starting from the L release.
What multi advertising means is, that your Android phone or a device with Android stack, can enable multiple advertisement trains at the same time. For instance, one specific app can set certain advertisement data (example supported services etc.), advertisement parameters and enable advertisement, and so can N number of other apps, on the same device.
At the hardware level (or physical layer), these advertisement trains are interleaved between the three advertisement channels (37, 38, 39) and thus your phone behaves as multiple peripheral devices at the same time. All these advertisement trains also have a separate Random private address, so they are seen distinctly by the remote scanner.
Bluetooth Smart has two ways of communicating. The first one is using advertisements, where a BLE peripheral device broadcasts packets to every device around it. The receiving device can then act on this information or connect to receive more information. The second way to communicate is to receive packets using a connection, where both the peripheral and central send packets. We will focus on advertisement for several reasons:
You can’t create a connection between two devices without using advertisements. Defining the data and format of advertisement packets is usually the first thing you work on when developing a BLE device.
A large number of BLE products sleep most of the time, waking up only to advertise and connect when needed. This means advertisements have a big impact on power consumption.
Users want responsive products, and the advertising interval is critical in quick connections.
Advertising is by design unidirectional. A Central device can’t send any data to the Peripheral device without a connection. But a single peripheral can advertise to multiple masters in the area.
ref:http://www.argenox.com/bluetooth-low-energy-ble-v4-0-development/library/a-ble-advertising-primer/

how many bluetooth pairing can be made?

I have an android phone and I want it to communicate with 10 bluetooth modules, not simultaneously. I know that a master device can have 7 slaves for bluetooth connection. does it mean "pairing"?
The question is can I have my phone paired with 10 bluetooth devices? Then send them data seperately?
There is no set limit on the number of pairings possible for a device, except for any limitations made by the platform or bluetooth software stack (eg. limited storage).
does it mean "pairing"?
Bluetooth pairing and connecting are two separate operations.
When two Bluetooth devices pair, they will exchange Bluetooth addresses and encryption keys. If pairing is successful, it allows the devices to connect to each other at a later time.
When two bluetooth devices connect, the profiles are established (a2dp if a speaker, hfp if headset, etc), and they can communicate.
Sometimes there is confusion between pairing and connecting since most smartphones automatically connect after detecting a successful pairing.
Pairing is just done once, typically when you buy a Bluetooth product. Connection is done whenever you use the product.
The question is can I have my phone paired with 10 bluetooth devices?
Then send them data seperately?
As mentioned in the other answer, the maximum number of paired devices is platform dependent, it varies from product to product, but there is no set limit. The maximum number of connected devices (that you could send/receive data concurrently to) is 7 according to the Bluetooth specification.

Resources