Code: Select all
app.onSendCommand = function()
{
app.device.writeCharacteristic(
'6e400002-b5a3-f393-e0a9-e50e24dcca9e',
new Unit8Array([1,0]),
function(){console.log('the write is done');},
function(error){console.log('write error' + error) })
}
Hey all, is there any problem with this code, the function(){console.log('the write is done');} does not work at all, but function(error){console.log('write error' + error) }) can work.
Does the writeCharacteristic() expecting some feedback from ble board?