I'm working on a simple chrome web store app that uses a new API called chrome.bluetooth. The API is rather new and only available to the google chrome dev channel.
I have managed to discover all devices, search through their services and if they have the service I need to connect, it establishes a connection.
My chrome.bluetooth.onConnection function works fine, it returns a socket which I am attempting to write to:
chrome.bluetooth.onConnection.addListener(function(socket){
log("Connected", arguments);
if (socket) {
sockets.push(socket);
var data = str2ab("hello"); //My string to array buffer converter
chrome.bluetooth.write({ //Try to write to socket
socket:socket,
data:data
},function(){
log("Wrote to socket",socket,data,arguments)
})
}
});
After I attempt to write, chrome.runtime.lastError message is:
"Failed to send data. IOReturn code: 3758097088"
Im not quite sure what I am doing wrong, mainly because I don't understand the error. What does "IOReturn code: 3758097088" mean? I was wondering if anybody knows what I am doing wrong and what this error means?
Cheers,