Fix BLE scanning fallback for devices without extended advertising#53
Fix BLE scanning fallback for devices without extended advertising#53juhapellotsalo wants to merge 1 commit intoruuvi:masterfrom
Conversation
Check isLeExtendedAdvertisingSupported before disabling legacy mode, allowing devices to fall back to legacy scanning when extended advertising is not supported.
|
scanSettings.setLegacy(false) - won't disable legacy advertisments . setLegacy setLegacy(false) - enables extended advertisments (+legacy) In my opinion in some cases bluetoothManager.adapter.isLeExtendedAdvertisingSupported returns true but phone actually can't receive extended for some reason. Need to figure out more reliable way to detect if extended supported or not. |
|
My try here. We ignore 3 first seconds of legacy data (for Air). If no extended received - we start working with legacy. |
Check isLeExtendedAdvertisingSupported before disabling legacy mode, allowing devices to fall back to legacy scanning when extended advertising is not supported.