Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find any ble devices #462

Open
fpinho opened this issue Oct 23, 2017 · 1 comment
Open

Can't find any ble devices #462

fpinho opened this issue Oct 23, 2017 · 1 comment
Labels

Comments

@fpinho
Copy link

fpinho commented Oct 23, 2017

Hi,

I am using the cordova plugin bluetoothle, but I can’t scan any device, only appear my macbook in list
You know why?
I try with empty array in services, and with filter 'fc12', that is my device. but only appears my mac, see the attachment.

this is the code:

bluetoothle.initialize(initializeSuccess, initializeError);

function initializeSuccess(obj) {
myApp.alert(JSON.stringify(obj));
params = '{'+
'"services": ['+
'"180D",'+
'"fc12"'+
'],'+
'"allowDuplicates": false'+
'"scanMode": bluetoothle.SCAN_MODE_LOW_LATENCY,'+
'"matchMode": bluetoothle.MATCH_MODE_AGGRESSIVE,'+
'"matchNum": bluetoothle.MATCH_NUM_MAX_ADVERTISEMENT,'+
'"callbackType": bluetoothle.CALLBACK_TYPE_ALL_MATCHES,'+
'}';
bluetoothle.startScan(initializeSuccess2,initializeError2,params);
}
function initializeError(obj) {
myApp.alert(JSON.stringify(obj));
}

function initializeSuccess2(obj) {
myApp.alert(JSON.stringify(obj));

}
function initializeError2(obj) {
myApp.alert(JSON.stringify(obj));
}
img_2291

@randdusing
Copy link
Owner

It looks like the scan is working overall. Are you sure your devices are Bluetooth LE?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants