Ok, so after a few changes, bluetoothctl is showing:
[bluetooth]# list-attributes F1:F9:F8:7F:B3:CE Primary Service /org/bluez/hci0/dev_F1_F9_F8_7F_B3_CE/service000b 0000bcde-0000-1000-8000-00805f9b34fb Unknown Characteristic /org/bluez/hci0/dev_F1_F9_F8_7F_B3_CE/service000b/char000c 0000abcd-0000-1000-8000-00805f9b34fb Unknown Descriptor /org/bluez/hci0/dev_F1_F9_F8_7F_B3_CE/service000b/char000c/desc0010 00002903-0000-1000-8000-00805f9b34fb Server Characteristic Configuration Descriptor /org/bluez/hci0/dev_F1_F9_F8_7F_B3_CE/service000b/char000c/desc000f 00002901-0000-1000-8000-00805f9b34fb Characteristic User Description Descriptor /org/bluez/hci0/dev_F1_F9_F8_7F_B3_CE/service000b/char000c/desc000e 00002902-0000-1000-8000-00805f9b34fb Client Characteristic Configuration Primary Service /org/bluez/hci0/dev_F1_F9_F8_7F_B3_CE/service000a 00001801-0000-1000-8000-00805f9b34fb Generic Attribute Profile [bluetooth]#
The puck.js code is
function SetupServices() { NRF.setServices({ 0xbcde : { 0xabcd : { value : "Hello", // optional maxLen : 5, // optional (otherwise is length of initial value) broadcast : true, // 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:['bcde'], uart:false}); } //setInterval(SetupServices,1000); SetupServices();
but the bluez/tinyB is showing me:
Bluetooth manager started... Device discovery.. Discovered devices: Class = BluetoothDevice Path = /org/bluez/hci0/dev_F1_F9_F8_7F_B3_CE Name = Puck.js b3ce Connected = 0 Connecting to device..0x1aaeff8 Fetch services.. Class = BluetoothGattService Path = /org/bluez/hci0/dev_F1_F9_F8_7F_B3_CE/service000a UUID = 00001801-0000-1000-8000-00805f9b34fb Device = /org/bluez/hci0/dev_F1_F9_F8_7F_B3_CE
So confused now :)
@JohnH started
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.
Ok, so after a few changes, bluetoothctl is showing:
The puck.js code is
but the bluez/tinyB is showing me:
So confused now :)