0
Good morning,
I have an application in Cordova. I want to connect it to the Arduino through bluetooth. I can’t get the value that comes from Iraq
var macAddress = "00:06:66:4D:00:00";
var app = {
initialize: function () {
this.bindEvents();
},
bindEvents: function () {
document.addEventListener('deviceready', this.onDeviceReady, false);
},
onDeviceReady: function () {
bluetoothSerial.connect(macAddress, app.onConnect, app.onDisconnect);
},
onConnect: function () {
statusDiv.innerHTML = "Connected to " + macAddress + ".";
bluetoothSerial.subscribe("\n", app.onMessage, app.subscribeFailed);
bluetoothSerial.read(function (data) { console.log(data, 'read'); }, app.subscribeFailed);
},
onDisconnect: function () {
alert("Disconnected");
statusDiv.innerHTML = "Disconnected.";
},
onMessage: function (data) {
console.log(data, 'onMessage');
counter.innerHTML = data;
},
subscribeFailed: function () {
alert("subscribe failed");
}
};
The console gives me this:
The key "target-densitydpi" is not supported. (index):65
adding proxy for Battery (index):65
adding proxy for Camera (index):65
adding proxy for File (index):65
adding proxy for Capture (index):65
adding proxy for Device (index):65
adding proxy for Accelerometer (index):65
adding proxy for Compass (index):65
adding proxy for Globalization (index):65
adding proxy for InAppBrowser (index):65
adding proxy for NetworkStatus (index):65
adding proxy for SplashScreen (index):65
Persistent fs quota granted (index):65
Error: exec proxy not found for :: StatusBar :: _ready (index):65
bluetoothSerial.connect: 00:06:66:4D:00:00 (index):65
bluetoothSerial.subscribe ' ' (index):65
bluetoothSerial.read: (index):65 read
I think I’m connected with bluetooth but I can’t get the data coming from the Arduino. On the console I noticed this line:
Error: exec proxy not found for :: StatusBar :: _ready (index):65
Could this be the problem? If so, how can I fix it? (I am working on windows 10);
Thank you.