evothings / cordova-ble

Bluetooth Low Energy plugin for Cordova
http://www.evothings.com/
Apache License 2.0
242 stars 103 forks source link

Nested Service UUID Arrays #148

Open bmg125 opened 6 years ago

bmg125 commented 6 years ago

I may be doing something incorrect, but there seems to be an issue when an array of serviceUUIDs is provided to the exports.startScan function in BLE.js (Line 141-142).

serviceUUIDs = getCanonicalUUIDArray(serviceUUIDs); exec(onSuccess, onFail, 'BLE', 'startScan', [serviceUUIDs]);

getCanonicalUUIDArray(serviceUUIDs); returns an array of Service UUIDs. This is then wrapped in another array on the next line. When I execute this code, I get no results. However, when I removed the outer array, the BLE Devices that match the serviceUUIDs I provide are correctly scanned.

I am trying to use the cordova-plugin-eddystone plugin which passes the eddystone service id by default. When I bypass this and pass no service uuids it works as expected.