cordova-plugin-bluetoothle icon indicating copy to clipboard operation
cordova-plugin-bluetoothle copied to clipboard

iOS central mode and peripheral mode in background

Open sapotrotas opened this issue 5 years ago • 1 comments

Hi @randdusing ,

According to apple documentation, when an iOS is advertising in background mode:

The bluetooth-peripheral Background Execution Mode ... All service UUIDs contained in the value of the CBAdvertisementDataServiceUUIDsKey advertisement key are placed in a special “overflow” area; they can be discovered only by an iOS device that is explicitly scanning for them.

It doesn't seem to be working in the plugin... I do get the service uuid while the peripheral is running in foreground, but as soon it enters background it stops advertising it, which is OK by apple documentation. Problem is I'm not receiving the uuid service in this overflow area while scanning whith another iOS device. I was expecting to find it in the "overflowServiceUuids" array. I tried scanning both in foreground mode as well as background mode and also tried to filter scan (ScanParams) by the same service uuid and not filtering any service at all.

Any suggestion? Thanks!

sapotrotas avatar Apr 16 '20 01:04 sapotrotas

Sorry, my bad. I do get the correct service uuid in the "overflowServiceUuids" array, but only while I'm scanning in foreground mode.

Am i doing something wrong?

sapotrotas avatar Apr 16 '20 02:04 sapotrotas