Reputation: 1
Recently I've developed an APP which is working fine with BLE devices, I've added most of options and features to my APP. It can scan devices, showing the list and then user can choose a device to connect. My problem is my code is able to connect to one BLE only; if user wants to connect to other devices, it has to disconnect from the connected one. Is there any option or method which I can use to solve this issue?
Upvotes: 0
Views: 1057
Reputation: 13549
You should post code if you want some actual help, but I can tell you that your problem is simply a design problem. It seems apparent that you haven't implemented your CBCentralManager
methods in a scaleable way, both for the underlying connections as well as the user interface. I can tell you from direct experience in my applications that the current Apple limit is 10 Bluetooth Low Energy connections at any given time (although people may try to claim different). However, while the system is able to handle 10, the BTServer
process (Apple's bluetooth process) begins to bug out with this many connections and crashes frequently.
You need to rethink the way you've designed your implementations of the CBPeripheral
and CBCentralManager
classes. Ensure they aren't attached to specific peripherals, just instances of peripherals you may encounter. Make some design changes and you should be able to fix your problem.
Upvotes: 3
Reputation: 10382
I don't know about your specific case, but I do know that it's possible to connect to multiple BLE devices as I'm currently doing it in Linux with the Bluez stack. However, BLE hardware differs with respect to how many devices can connect so it's possible that there's some hardware exists that only allows one connection. I have one dongle that allows up to 3 connections and another one that allows up to 7. When you try to make additional connections it automatically drops one of the other connections to make the new one.
Upvotes: 0