sandeepmistry / arduino-BLEPeripheral

An Arduino library for creating custom BLE peripherals with Nordic Semiconductor's nRF8001 or nR51822.
MIT License
462 stars 179 forks source link

Add ability to update connection params after connect #183

Open dsanders11 opened 6 years ago

dsanders11 commented 6 years ago

@sandeepmistry, take a look when you get a chance.

I ran into an issue when using Web Bluetooth with Google Chrome, where after a few messages Chrome would send a connection params update to change the connection interval to a very slow 97.5 ms, which is too slow for my application. After that happens if I change them back to what I have them set at for new connections, Chrome accepts it and doesn't mess with it any further.

This PR adds two things, ability to update the connection params during an active connection, and a new event so you can detect when the connection params are changed by the central.