thegecko / bleat

Abstraction library for hiding differences in JavaScript BLE APIs
MIT License
48 stars 13 forks source link

evothings.ble.startScan() is missing serviceUUIDs in adapter.startScan #40

Closed dgoosse closed 8 years ago

dgoosse commented 8 years ago

// 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(); } }); };

ghost commented 8 years ago

@dgoosse Hi, added missing parameter in this pull request: https://github.com/thegecko/bleat/pull/41 Thanks for reporting!

ghost commented 8 years ago

Added test report to pull request: https://github.com/thegecko/bleat/pull/41#issuecomment-217730655

ghost commented 8 years ago

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