Closed dgoosse closed 8 years ago
@dgoosse Hi, added missing parameter in this pull request: https://github.com/thegecko/bleat/pull/41 Thanks for reporting!
Added test report to pull request: https://github.com/thegecko/bleat/pull/41#issuecomment-217730655
I should add that Cordova BLE plugin 1.1.2 or later is needed for service UUID scanning to work: https://github.com/evothings/cordova-ble/releases
// Begin scanning for devices adapter.startScan = function( serviceUUIDs, // String[] serviceUUIDs advertised service UUIDs to restrict results by foundFn, // Function(Object deviceInfo) function called with each discovered deviceInfo completeFn, // Function() function called once starting scanning errorFn // Function(String errorMsg) function called if error occurs ) { init(function() { evothings.ble.stopScan(); evothings.ble.startScan( serviceUUIDs, function(deviceInfo) { if (foundFn) { foundFn(createBleatDeviceObject(deviceInfo)); } }, function(error) { if (errorFn) { errorFn(error); } }); if (completeFn) { completeFn(); } }); };