You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chrome.bluetooth.startDiscovery();chrome.bluetooth.onDeviceAdded.addListener(device=>{console.log(device.name+":"+device.address);if(device.name=='REXBLUNO'){// bluetooth name of my arduino with built-in bluetoothconsole.log(device);chrome.bluetooth.stopDiscovery(function(){if(chrome.runtime.lastError){console.log('Failed to stop discovery: '+chrome.runtime.lastError.message);return;}// so far no errorchrome.bluetoothLowEnergy.connect(device.address,function(){if(chrome.runtime.lastError){console.log('Failed to connect: '+chrome.runtime.lastError.message);return;}});});}});
Console output:
server.js:16 Failed to connect: Permission denied
According to this issue, NW.js should enable all chrome.* API. Some how the connect function within the bluetoothLowEnergy object fails.
The Bluetooth hardware is fine, my Android phone can connect to it and read/write data.
NW.js version
nwjs-sdk-v0.15.3-osx-x64
OS
El Capitan 10.11.5 64bit
code:
Console output:
According to this issue, NW.js should enable all chrome.* API. Some how the connect function within the bluetoothLowEnergy object fails.
The Bluetooth hardware is fine, my Android phone can connect to it and read/write data.
API reference:
https://developer.chrome.com/apps/bluetoothLowEnergy
The text was updated successfully, but these errors were encountered: