I used the function .services to get services on already paired device on Windows.
Error message:
Exception is about to be caught by JavaScript library code at line 1010, column 3 in ms-appx://io.cordova.hellocordova/www/plugins/cordova-plugin-bluetoothle/src/windows/BluetoothLEPlugin.js
0x800a138f - JavaScript runtime error: Unable to get property '1' of undefined or null reference occurred
On:
function getUUID(service) {
var UuidRe = /([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i;
var serviceId = UuidRe.exec(service.uuid)[1]; <<<<<<<<<<<<<<<<<<<<<<
var re = /0000([0-9a-f]{4})-0000-1000-8000-00805f9b34fb/;
var shortUuidMatch = re.exec(serviceId);
if (shortUuidMatch !== null) {
serviceId = shortUuidMatch[1];
}
My function (same as describe in the github example):
My bluetooth device has {e0cbf06c-cd8b-4647-bb8a-263b43f0f974} as a classguid.
In services, I found this selector : System.Devices.InterfaceClassGuid:=\"{6E3BB679-4372-40C8-9EAA-4509DF260CD8}\"
I used the function .services to get services on already paired device on Windows.
Error message: Exception is about to be caught by JavaScript library code at line 1010, column 3 in ms-appx://io.cordova.hellocordova/www/plugins/cordova-plugin-bluetoothle/src/windows/BluetoothLEPlugin.js 0x800a138f - JavaScript runtime error: Unable to get property '1' of undefined or null reference occurred
On: function getUUID(service) { var UuidRe = /([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i; var serviceId = UuidRe.exec(service.uuid)[1]; <<<<<<<<<<<<<<<<<<<<<< var re = /0000([0-9a-f]{4})-0000-1000-8000-00805f9b34fb/; var shortUuidMatch = re.exec(serviceId); if (shortUuidMatch !== null) { serviceId = shortUuidMatch[1]; }
My function (same as describe in the github example):
function getDeviceServices(address) {
}