I've read the various tutorials and examples about how this should work, but I just don't seem to be able to get it right.
If I use the nrF Connect app on my iPad, connect to the Puck it shows the expected UART service with TX/RX.
If I connect via TinyB, BLE command line I see two services listed:
1) The expected one for UART: 6e400001-b5a3-f393-e0a9-e50e24dcca9e
2) Another one: 00001801-0000-1000-8000-00805f9b34fb (what is this one?)
If I try to add my own service and specify UART:false on the options then the iPad won't connect to the puck at all and the code version still either sees 1 or both of the previously mentioned service uuids.
I'm trying to use the sample code like this:
RF.setServices({
"0000bcde-0000-0000-0000-000000000000" : {
"0000abcd-0000-0000-0000-000000000000" : {
value : "Hello", // optional
maxLen : 5, // optional (otherwise is length of initial value)
broadcast : false, // optional, default is false
readable : true, // optional, default is false
writable : true, // optional, default is false
notify : true, // optional, default is false
indicate : true, // optional, default is false
description: "My Characteristic", // optional, default is null
onWrite : function(evt) { // optional
console.log("Got ", evt.data);
}
}
// more characteristics allowed
}
// more services allowed
},{advertise:['0000bcde-0000-0000-0000-000000000000'], uart:false});
I would expect to only see the one service listed and connection from iPad should work too.
Also are then any more details about what the various attributes mean ie:
broadcast : false, // optional, default is false
notify : true, // optional, default is false
indicate : true, // optional, default is false
description: "My Characteristic", // optional, default is null
Quite often I also find that the Puck vanishes or won't connect and I constantly need to either reset it AND or run /etc/init.d/bluetooth restart to keep things running. I've ensured all the libraries are up to date.
Another note is that in the console of the WebIDE I get the message:
BLE Connected, queueing BLE restart for later
If I try to put the setService in a timer then that message is written out every time it fires.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi,
I've read the various tutorials and examples about how this should work, but I just don't seem to be able to get it right.
If I use the nrF Connect app on my iPad, connect to the Puck it shows the expected UART service with TX/RX.
If I connect via TinyB, BLE command line I see two services listed:
1) The expected one for UART: 6e400001-b5a3-f393-e0a9-e50e24dcca9e
2) Another one: 00001801-0000-1000-8000-00805f9b34fb (what is this one?)
If I try to add my own service and specify UART:false on the options then the iPad won't connect to the puck at all and the code version still either sees 1 or both of the previously mentioned service uuids.
I'm trying to use the sample code like this:
I would expect to only see the one service listed and connection from iPad should work too.
Also are then any more details about what the various attributes mean ie:
I also don't see any way to retrieve the description detail via TinyB,
http://iotdk.intel.com/docs/master/tinyb/classtinyb_1_1BluetoothGattCharacteristic.html
Quite often I also find that the Puck vanishes or won't connect and I constantly need to either reset it AND or run /etc/init.d/bluetooth restart to keep things running. I've ensured all the libraries are up to date.
Another note is that in the console of the WebIDE I get the message:
If I try to put the setService in a timer then that message is written out every time it fires.