jrowberg / bglib

BGLib implementation for Bluegiga BLE Bluetooth Smart modules
Other
239 stars 170 forks source link

Creating multiple connections #30

Closed nalauder closed 8 years ago

nalauder commented 8 years ago

Using this library i have been able to only connect to one module to my dongle. Whenever i try to connect a second, it interferes with the incoming data checking from the first dongle. Is it possible to support more than one connection with this library. If so, how?

jrowberg commented 8 years ago

The library itself is agnostic when it comes to multiple connections. It simply provides an access layer to the binary protocol underneath. In order to support multiple connections, you must have the module/dongle configured correctly as described in the Bluetooth Smart Module Configuration Guide. Specifically, you need the tag in the optional "config.xml" file compiled with a connection count limit. See the following support forum thread:

http://community.silabs.com/t5/Bluetooth-Wi-Fi/Multiple-connections-bonding-limitation/td-p/148840

It is also critical to make sure you pay attention to the connection handle that is present in all GATT client API methods and in the connection_status event that occurs when the connection is established. The API always gives you enough information to differentiate between data belonging to each slave.

nalauder commented 8 years ago

Working with multiple connection now