Hi,
I have a simple Midi over BLE service implemented using bleno and running on a RPi3. It works fine when I try to connect with an iPhone and an older Nexus Tablet. But my never Samsung Galaxy Tab A is not able to connect. I made hcidumps of all three devices but I am unable to really read/understand them.
Here's my code:
#!/usr/local/bin/node
'use strict';
const os = require('os');
const bleno = require('bleno');
const midi = require('midi');
const Getopt = require('node-getopt');
const fs = require('fs');
const ini = require('ini');
const PrimaryService = bleno.PrimaryService;
const Characteristic = bleno.Characteristic;
const midiServiceUUID = '03b80e5aede84b33a7516ce34ec4c700';
const midiCharacteristicUUID = '7772e5db38684112a1a9f2669d106bf3';
var ble_midi_service_name = "KempBLE Midi";
var kempline_config = '/etc/kempline.conf'
var midiTypes = {
'8': 'noteoff',
'9': 'noteon',
'10': 'polyat',
'11': 'controlchange',
'12': 'programchange',
'13': 'channelat',
'14': 'pitchbend',
'15': 'sysex'
};
var vmidi_in = undefined
var vmidi_out = undefined
var data_cb_fct = null;
var delay_between_midi_msg_in_ms = 0
var midi_message_buffer = 0
var midiCharacteristic = new Characteristic({
uuid: midiCharacteristicUUID, // or 'fff1' for 16-bit
properties: ['write', 'writeWithoutResponse', 'notify', 'read'], // can be a combination of 'read', 'write', 'writeWithoutResponse', 'notify', 'indicate'
//secure: ['write', 'notify', 'read'], // enable security for properties, can be a combination of 'read', 'write', 'writeWithoutResponse', 'notify', 'indicate'
//value: null, // optional static value, must be of type Buffer - for read only characteristics
descriptors: [
// see Descriptor for data type
],
onReadRequest: function(offset, callback) {
if (callback != false)
callback(this.RESULT_SUCCESS, new Buffer(0)); // optional read request handler, function(offset, callback) { ... }
},
onWriteRequest: function(data, offset, withoutResponse, callback) {
// console.log(`onWriteRequest data: ${data.toString('hex')}, ${offset}, ${withoutResponse}`);
// console.log('Size: ' + data.length);
callback(this.RESULT_SUCCESS);
}, // optional write request handler, function(data, offset, withoutResponse, callback) { ...}
onSubscribe: function(maxValueSize, updateValueCallback) {
console.log(`onSubscribe: ${maxValueSize}`);
data_cb_fct = updateValueCallback;
// console.log('updateValueCallback, callback is: ' + data_cb_fct);
}, // optional notify/indicate subscribe handler, function(maxValueSize, updateValueCallback) { ...}
onUnsubscribe: function() {
console.log('onUnsubscribe');
}, // optional notify/indicate unsubscribe handler, function() { ...}
onNotify: function() {
console.log('onNotify');
}, // optional notify sent handler, function() { ...}
onIndicate: function() {
console.log('onIndicate');
} // optional indicate confirmation received handler, function() { ...}
});
var midiService = new PrimaryService({
uuid: midiServiceUUID, // or 'fff0' for 16-bit
characteristics: [midiCharacteristic]
});
bleno.on('stateChange', function(state) {
console.log('on -> stateChange: ' + state);
if (state === 'poweredOn') {
bleno.startAdvertising(ble_midi_service_name, [midiServiceUUID]);
} else {
bleno.stopAdvertising();
}
});
bleno.on('advertisingStart', function(error) {
console.log('on -> advertisingStart: ' + (error ? 'error ' + error : 'success'));
if (!error) {
console.log('BLE device is now discoverable as: ' + ble_midi_service_name);
bleno.setServices([midiService]);
}
});
bleno.on('accept', function(clientAddress) {
console.log("Accepted connection from address: " + clientAddress);
});
bleno.on('disconnect', function(clientAddress) {
console.log("Disconnected from address: " + clientAddress);
});
bleno.on('notify', function() {
console.log("blene.onNotify: ");
});
var opt = new Getopt([
['s' , '=' , 'name of BLE service that will be created.'],
['m' ,'=' , 'name of virtual midi interface that will be created to send/receive messages.'],
['h' , 'help', 'display this help']
])
.bindHelp() // bind option 'help' to default action
.parseSystem(); // parse command line
if(opt.options['s'] == undefined)
console.log('No BLE midi service name given. Using standard value: ' + ble_midi_service_name)
else
ble_midi_service_name = opt.options['s']
var virtual_midi_name = "vmidi_kempline_ble"
if(opt.options['m'] == undefined)
console.log('No virtual midi port name given. Using standard value: ' + virtual_midi_name)
else
virtual_midi_name = opt.options['m']
open_virtual_midi_port(virtual_midi_name)
var stdin = process.stdin;
// resume stdin in the parent process (node app won't quit all by itself
// unless an error or process.exit() happens)
stdin.resume();
// i don't want binary, do you?
stdin.setEncoding( 'utf8' );
// on any data into stdin
stdin.on( 'data', function( key ){
// ctrl-c ( end of text )
if ( key === '\u0003' ) {
process.exit();
}
if(data_cb_fct != null) {
const buf = new Buffer([0x80, 0x80, 0xB0, 80, 1]);
data_cb_fct(buf);
console.log('Sent: ' + buf.toString('hex') + ' to BLE device');
}
else
console.log('No callback fct registered so far.');
});
hcidump Nexus Tablet (working properly):
HCI sniffer - Bluetooth packet analyzer ver 5.43
device: hci0 snap_len: 1500 filter: 0xffffffff
2019-04-02 20:57:57.237276 > HCI Event: LE Meta Event (0x3e) plen 19
LE Connection Complete
status 0x00 handle 64, role slave
bdaddr 5E:CF:87:D8:74:B9 (Random)
2019-04-02 20:57:57.237619 < HCI Command: LE Read Remote Used Features (0x08|0x0016) plen 2
40 00
2019-04-02 20:57:57.238691 > HCI Event: Command Status (0x0f) plen 4
LE Read Remote Used Features (0x08|0x0016) status 0x00 ncmd 1
2019-04-02 20:57:57.238764 < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2
value 0x00 (scanning disabled)
filter duplicates 0x00 (disabled)
2019-04-02 20:57:57.241933 > HCI Event: Command Complete (0x0e) plen 4
LE Set Scan Enable (0x08|0x000c) ncmd 1
status 0x00
2019-04-02 20:57:57.242009 < HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7
type 0x00 (passive)
interval 60.000ms window 30.000ms
own address: 0x00 (Public) policy: white list only
2019-04-02 20:57:57.242523 > HCI Event: Command Complete (0x0e) plen 4
LE Set Scan Parameters (0x08|0x000b) ncmd 1
status 0x00
2019-04-02 20:57:57.242578 < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2
value 0x01 (scanning enabled)
filter duplicates 0x01 (enabled)
2019-04-02 20:57:57.243222 > HCI Event: Command Complete (0x0e) plen 4
LE Set Scan Enable (0x08|0x000c) ncmd 1
status 0x00
2019-04-02 20:57:57.391168 > HCI Event: LE Meta Event (0x3e) plen 12
LE Read Remote Used Features Complete
status 0x00 handle 64
Features: 0x1f 0x00 0x00 0x00 0x00 0x00 0x00 0x00
2019-04-02 20:57:57.537284 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Group req (0x10)
start 0x0001, end 0xffff
type-uuid 0x2800
2019-04-02 20:57:57.538351 < ACL data: handle 64 flags 0x00 dlen 18
ATT: Read By Group resp (0x11)
attr handle 0x0001, end group handle 0x0005
value 0x00 0x18
attr handle 0x0006, end group handle 0x0009
value 0x01 0x18
2019-04-02 20:57:57.683568 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Group req (0x10)
start 0x000a, end 0xffff
type-uuid 0x2800
2019-04-02 20:57:57.684722 < ACL data: handle 64 flags 0x00 dlen 26
ATT: Read By Group resp (0x11)
attr handle 0x000a, end group handle 0x000d
value 0x00 0xc7 0xc4 0x4e 0xe3 0x6c 0x51 0xa7 0x33 0x4b 0xe8 0xed 0x5a 0x0e 0xb8 0x03
2019-04-02 20:57:57.781075 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Group req (0x10)
start 0x000e, end 0xffff
type-uuid 0x2800
2019-04-02 20:57:57.781838 < ACL data: handle 64 flags 0x00 dlen 9
ATT: Error (0x01)
Error: Attribute not found (10)
Read By Group req (0x10) on handle 0x000e
2019-04-02 20:57:57.781924 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 2
2019-04-02 20:57:57.883463 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x0001, end 0x0005
type-uuid 0x2802
2019-04-02 20:57:57.884323 < ACL data: handle 64 flags 0x00 dlen 9
ATT: Error (0x01)
Error: Attribute not found (10)
Read By Type req (0x08) on handle 0x0001
2019-04-02 20:57:57.884412 > HCI Event: LE Meta Event (0x3e) plen 10
LE Connection Update Complete
status 0x00 handle 64
interval 7.50ms, latency 0.00ms, superv. timeout 20000.00ms
2019-04-02 20:57:57.898578 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x0001, end 0x0005
type-uuid 0x2803
2019-04-02 20:57:57.899139 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 2
2019-04-02 20:57:57.900205 < ACL data: handle 64 flags 0x00 dlen 20
ATT: Read By Type resp (0x09)
length: 7
handle 0x0002, value 0x02 0x03 0x00 0x00 0x2a
handle 0x0004, value 0x02 0x05 0x00 0x01 0x2a
2019-04-02 20:57:57.921036 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x0005, end 0x0005
type-uuid 0x2803
2019-04-02 20:57:57.921760 < ACL data: handle 64 flags 0x00 dlen 9
ATT: Error (0x01)
Error: Attribute not found (10)
Read By Type req (0x08) on handle 0x0005
2019-04-02 20:57:57.936075 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x0006, end 0x0009
type-uuid 0x2802
2019-04-02 20:57:57.936805 < ACL data: handle 64 flags 0x00 dlen 9
ATT: Error (0x01)
Error: Attribute not found (10)
Read By Type req (0x08) on handle 0x0006
2019-04-02 20:57:57.936891 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 2
2019-04-02 20:57:57.951038 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x0006, end 0x0009
type-uuid 0x2803
2019-04-02 20:57:57.952102 < ACL data: handle 64 flags 0x00 dlen 13
ATT: Read By Type resp (0x09)
length: 7
handle 0x0007, value 0x20 0x08 0x00 0x05 0x2a
2019-04-02 20:57:57.966082 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x0008, end 0x0009
type-uuid 0x2803
2019-04-02 20:57:57.966512 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 2
2019-04-02 20:57:57.967228 < ACL data: handle 64 flags 0x00 dlen 9
ATT: Error (0x01)
Error: Attribute not found (10)
Read By Type req (0x08) on handle 0x0008
2019-04-02 20:57:57.981047 > ACL data: handle 64 flags 0x02 dlen 9
ATT: Find Information req (0x04)
start 0x0009, end 0x0009
2019-04-02 20:57:57.982066 < ACL data: handle 64 flags 0x00 dlen 10
ATT: Find Information resp (0x05)
format: uuid-16
handle 0x0009, uuid 0x2902 (GATT(desc) Client Characteristic Configuration)
2019-04-02 20:57:57.996076 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x000a, end 0x000d
type-uuid 0x2802
2019-04-02 20:57:57.996495 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 2
2019-04-02 20:57:57.997571 < ACL data: handle 64 flags 0x00 dlen 9
ATT: Error (0x01)
Error: Attribute not found (10)
Read By Type req (0x08) on handle 0x000a
2019-04-02 20:57:58.011041 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x000a, end 0x000d
type-uuid 0x2803
2019-04-02 20:57:58.012181 < ACL data: handle 64 flags 0x00 dlen 27
ATT: Read By Type resp (0x09)
length: 21
handle 0x000b, value 0x1e 0x0c 0x00 0xf3 0x6b 0x10 0x9d 0x66 0xf2 0xa9 0xa1 0x12 0x41 0x68 0x38 0xdb 0xe5 0x72 0x77
2019-04-02 20:57:58.025935 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 2
2019-04-02 20:57:58.041010 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x000c, end 0x000d
type-uuid 0x2803
hcidump iPhone (ios/working properly):
HCI sniffer - Bluetooth packet analyzer ver 5.43
device: hci0 snap_len: 1500 filter: 0xffffffff
2019-04-02 20:49:10.856420 > HCI Event: LE Meta Event (0x3e) plen 19
LE Connection Complete
status 0x00 handle 64, role slave
bdaddr 55:3E:9D:DA:42:C5 (Random)
2019-04-02 20:49:10.856778 < HCI Command: LE Read Remote Used Features (0x08|0x0016) plen 2
40 00
2019-04-02 20:49:10.857238 > HCI Event: Command Status (0x0f) plen 4
LE Read Remote Used Features (0x08|0x0016) status 0x00 ncmd 1
2019-04-02 20:49:11.015320 > HCI Event: LE Meta Event (0x3e) plen 12
LE Read Remote Used Features Complete
status 0x00 handle 64
Features: 0x1f 0x00 0x00 0x00 0x00 0x00 0x00 0x00
2019-04-02 20:49:11.135186 > ACL data: handle 64 flags 0x02 dlen 11
L2CAP(d): cid 0x003a len 7 [psm 0]
09 05 06 03 00 00 00
2019-04-02 20:49:11.135720 > ACL data: handle 64 flags 0x02 dlen 7
ATT: MTU req (0x02)
client rx mtu 185
2019-04-02 20:49:11.136396 < ACL data: handle 64 flags 0x00 dlen 7
ATT: MTU resp (0x03)
server rx mtu 185
2019-04-02 20:49:11.195187 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Group req (0x10)
start 0x0001, end 0xffff
type-uuid 0x2800
2019-04-02 20:49:11.196257 < ACL data: handle 64 flags 0x00 dlen 18
ATT: Read By Group resp (0x11)
attr handle 0x0001, end group handle 0x0005
value 0x00 0x18
attr handle 0x0006, end group handle 0x0009
value 0x01 0x18
2019-04-02 20:49:11.255224 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Group req (0x10)
start 0x000a, end 0xffff
type-uuid 0x2800
2019-04-02 20:49:11.256183 < ACL data: handle 64 flags 0x00 dlen 26
ATT: Read By Group resp (0x11)
attr handle 0x000a, end group handle 0x000d
value 0x00 0xc7 0xc4 0x4e 0xe3 0x6c 0x51 0xa7 0x33 0x4b 0xe8 0xed 0x5a 0x0e 0xb8 0x03
2019-04-02 20:49:11.256246 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 2
2019-04-02 20:49:11.315186 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Group req (0x10)
start 0x000e, end 0xffff
type-uuid 0x2800
2019-04-02 20:49:11.315935 < ACL data: handle 64 flags 0x00 dlen 9
ATT: Error (0x01)
Error: Attribute not found (10)
Read By Group req (0x10) on handle 0x000e
2019-04-02 20:49:11.375226 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x0006, end 0x0009
type-uuid 0x2803
2019-04-02 20:49:11.375469 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 2
2019-04-02 20:49:11.376127 < ACL data: handle 64 flags 0x00 dlen 13
ATT: Read By Type resp (0x09)
length: 7
handle 0x0007, value 0x20 0x08 0x00 0x05 0x2a
2019-04-02 20:49:11.435184 > ACL data: handle 64 flags 0x02 dlen 9
ATT: Find Information req (0x04)
start 0x0009, end 0x0009
2019-04-02 20:49:11.435934 < ACL data: handle 64 flags 0x00 dlen 10
ATT: Find Information resp (0x05)
format: uuid-16
handle 0x0009, uuid 0x2902 (GATT(desc) Client Characteristic Configuration)
2019-04-02 20:49:11.495223 > ACL data: handle 64 flags 0x02 dlen 9
ATT: Write req (0x12)
handle 0x0009 value 0x02 0x00
2019-04-02 20:49:11.495459 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 2
2019-04-02 20:49:11.495962 < ACL data: handle 64 flags 0x00 dlen 5
ATT: Write resp (0x13)
2019-04-02 20:49:11.555189 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x000a, end 0x000d
type-uuid 0x2803
2019-04-02 20:49:11.556182 < ACL data: handle 64 flags 0x00 dlen 27
ATT: Read By Type resp (0x09)
length: 21
handle 0x000b, value 0x1e 0x0c 0x00 0xf3 0x6b 0x10 0x9d 0x66 0xf2 0xa9 0xa1 0x12 0x41 0x68 0x38 0xdb 0xe5 0x72 0x77
2019-04-02 20:49:11.615185 > ACL data: handle 64 flags 0x02 dlen 7
ATT: Read req (0x0a)
handle 0x000c
2019-04-02 20:49:11.615439 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 2
2019-04-02 20:49:11.615974 < ACL data: handle 64 flags 0x00 dlen 5
ATT: Read resp (0x0b)
2019-04-02 20:49:11.873672 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 1
2019-04-02 20:49:11.945158 > ACL data: handle 64 flags 0x02 dlen 9
ATT: Find Information req (0x04)
start 0x000d, end 0x000d
2019-04-02 20:49:11.946012 < ACL data: handle 64 flags 0x00 dlen 10
ATT: Find Information resp (0x05)
format: uuid-16
handle 0x000d, uuid 0x2902 (GATT(desc) Client Characteristic Configuration)
2019-04-02 20:49:12.035184 > ACL data: handle 64 flags 0x02 dlen 9
ATT: Write req (0x12)
handle 0x000d value 0x01 0x00
2019-04-02 20:49:12.036055 < ACL data: handle 64 flags 0x00 dlen 5
ATT: Write resp (0x13)
2019-04-02 20:49:12.095089 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 2
2019-04-02 20:49:12.159352 > HCI Event: LE Meta Event (0x3e) plen 10
LE Connection Update Complete
status 0x00 handle 64
interval 15.00ms, latency 0.00ms, superv. timeout 2000.00ms
2019-04-02 20:49:12.409751 < ACL data: handle 64 flags 0x00 dlen 12
ATT: Handle notify (0x1b)
handle 0x000c
value 0x80 0x80 0x91 0x0b 0x40
2019-04-02 20:49:12.623718 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 1
2019-04-02 20:49:12.910988 < ACL data: handle 64 flags 0x00 dlen 12
ATT: Handle notify (0x1b)
handle 0x000c
value 0x80 0x80 0x81 0x0b 0x40
2019-04-02 20:49:13.123676 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 1
2019-04-02 20:49:13.238949 > ACL data: handle 64 flags 0x02 dlen 11
ATT: Read By Type req (0x08)
start 0x0001, end 0x0005
type-uuid 0x2a00
2019-04-02 20:49:13.239909 < ACL data: handle 64 flags 0x00 dlen 19
ATT: Read By Type resp (0x09)
length: 13
hcidump Samsung Galaxy Tab A (NOT working):
HCI sniffer - Bluetooth packet analyzer ver 5.43
device: hci0 snap_len: 1500 filter: 0xffffffff
2019-04-02 20:51:06.886952 < HCI Command: Set Event Mask (0x03|0x0001) plen 8
Mask: 0xfffffbff07f8bf3d
2019-04-02 20:51:06.887812 > HCI Event: Command Complete (0x0e) plen 4
Set Event Mask (0x03|0x0001) ncmd 1
status 0x00
2019-04-02 20:51:06.887858 < HCI Command: LE Set Event Mask (0x08|0x0001) plen 8
mask 0x1f00000000000000 (Reserved)
2019-04-02 20:51:06.888364 > HCI Event: Command Complete (0x0e) plen 4
LE Set Event Mask (0x08|0x0001) ncmd 1
status 0x00
2019-04-02 20:51:06.888392 < HCI Command: Read Local Version Information (0x04|0x0001) plen 0
2019-04-02 20:51:06.888837 > HCI Event: Command Complete (0x0e) plen 12
Read Local Version Information (0x04|0x0001) ncmd 1
status 0x00
HCI Version: 4.1 (0x7) HCI Revision: 0x168
LMP Version: 4.1 (0x7) LMP Subversion: 0x2209
Manufacturer: Broadcom Corporation (15)
2019-04-02 20:51:06.888862 < HCI Command: Write LE Host Supported (0x03|0x006d) plen 2
01 00
2019-04-02 20:51:06.889234 > HCI Event: Command Complete (0x0e) plen 4
Write LE Host Supported (0x03|0x006d) ncmd 1
00
2019-04-02 20:51:06.889259 < HCI Command: Read LE Host Supported (0x03|0x006c) plen 0
2019-04-02 20:51:06.889659 > HCI Event: Command Complete (0x0e) plen 6
Read LE Host Supported (0x03|0x006c) ncmd 1
00 01 00
2019-04-02 20:51:06.889683 < HCI Command: Read BD ADDR (0x04|0x0009) plen 0
2019-04-02 20:51:06.890101 > HCI Event: Command Complete (0x0e) plen 10
Read BD ADDR (0x04|0x0009) ncmd 1
status 0x00 bdaddr B8:27:EB:07:C4:DC
2019-04-02 20:51:06.890127 < HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1
00
2019-04-02 20:51:06.890493 > HCI Event: Command Complete (0x0e) plen 4
LE Set Advertise Enable (0x08|0x000a) ncmd 1
status 0x0c
Error: Command Disallowed
2019-04-02 20:51:06.890517 < HCI Command: LE Set Advertising Parameters (0x08|0x0006) plen 15
min 100.000ms, max 100.000ms
type 0x00 (ADV_IND - Connectable undirected advertising) ownbdaddr 0x00 (Public)
directbdaddr 0x00 (Public) 00:00:00:00:00:00
channelmap 0x07 filterpolicy 0x00 (Allow scan from any, connection from any)
2019-04-02 20:51:06.891048 > HCI Event: Command Complete (0x0e) plen 4
LE Set Advertising Parameters (0x08|0x0006) ncmd 1
status 0x00
2019-04-02 20:51:06.891707 < HCI Command: LE Set Scan Response Data (0x08|0x0009) plen 32
10 0F 08 4B 65 6D 70 42 4C 45 20 50 79 4D 69 64 69 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
2019-04-02 20:51:06.892435 > HCI Event: Command Complete (0x0e) plen 4
LE Set Scan Response Data (0x08|0x0009) ncmd 1
status 0x00
2019-04-02 20:51:06.892462 < HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32
15 02 01 06 11 06 00 C7 C4 4E E3 6C 51 A7 33 4B E8 ED 5A 0E
B8 03 00 00 00 00 00 00 00 00 00 00
2019-04-02 20:51:06.893186 > HCI Event: Command Complete (0x0e) plen 4
LE Set Advertising Data (0x08|0x0008) ncmd 1
status 0x00
2019-04-02 20:51:06.893233 < HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1
01
2019-04-02 20:51:06.893669 > HCI Event: Command Complete (0x0e) plen 4
LE Set Advertise Enable (0x08|0x000a) ncmd 1
status 0x00
2019-04-02 20:51:06.893708 < HCI Command: LE Set Scan Response Data (0x08|0x0009) plen 32
10 0F 08 4B 65 6D 70 42 4C 45 20 50 79 4D 69 64 69 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
2019-04-02 20:51:06.894439 > HCI Event: Command Complete (0x0e) plen 4
LE Set Scan Response Data (0x08|0x0009) ncmd 1
status 0x00
2019-04-02 20:51:06.894473 < HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32
15 02 01 06 11 06 00 C7 C4 4E E3 6C 51 A7 33 4B E8 ED 5A 0E
B8 03 00 00 00 00 00 00 00 00 00 00
2019-04-02 20:51:06.895262 > HCI Event: Command Complete (0x0e) plen 4
LE Set Advertising Data (0x08|0x0008) ncmd 1
status 0x00
2019-04-02 20:51:12.084177 > HCI Event: LE Meta Event (0x3e) plen 19
LE Connection Complete
status 0x00 handle 64, role slave
bdaddr 5E:94:5E:AA:04:7E (Random)
2019-04-02 20:51:12.084516 < HCI Command: LE Read Remote Used Features (0x08|0x0016) plen 2
40 00
2019-04-02 20:51:12.090938 > HCI Event: Command Status (0x0f) plen 4
LE Read Remote Used Features (0x08|0x0016) status 0x00 ncmd 1
2019-04-02 20:51:12.091010 < HCI Command: LE Add Device To White List (0x08|0x0011) plen 7
01 7E 04 AA 5E 94 5E
2019-04-02 20:51:12.091633 > HCI Event: Command Complete (0x0e) plen 4
LE Add Device To White List (0x08|0x0011) ncmd 1
status 0x00
2019-04-02 20:51:12.091681 < HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7
type 0x00 (passive)
interval 60.000ms window 30.000ms
own address: 0x00 (Public) policy: white list only
2019-04-02 20:51:12.092167 > HCI Event: Command Complete (0x0e) plen 4
LE Set Scan Parameters (0x08|0x000b) ncmd 1
status 0x00
2019-04-02 20:51:12.092210 < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2
value 0x01 (scanning enabled)
filter duplicates 0x01 (enabled)
2019-04-02 20:51:12.092873 > HCI Event: Command Complete (0x0e) plen 4
LE Set Scan Enable (0x08|0x000c) ncmd 1
status 0x00
2019-04-02 20:51:12.337363 > HCI Event: LE Meta Event (0x3e) plen 13
LE Long Term Key Request
40 00 F9 68 15 52 88 68 1E AB 38 82
2019-04-02 20:51:12.337436 < HCI Command: LE Long Term Key Request Reply (0x08|0x001a) plen 18
40 00 22 F1 AB F2 6E 80 AC DE 44 11 25 04 A1 3B 1E 79
2019-04-02 20:51:12.338074 > HCI Event: Command Complete (0x0e) plen 6
LE Long Term Key Request Reply (0x08|0x001a) ncmd 1
00 40 00
2019-04-02 20:51:12.517578 > HCI Event: Encrypt Change (0x08) plen 4
status 0x00 handle 64 encrypt 0x01
2019-04-02 20:51:12.587266 < ACL data: handle 64 flags 0x00 dlen 7
ATT: MTU req (0x02)
client rx mtu 517
2019-04-02 20:51:12.607525 > HCI Event: LE Meta Event (0x3e) plen 12
LE Read Remote Used Features Complete
status 0x00 handle 64
Features: 0x1f 0x00 0x00 0x00 0x00 0x00 0x00 0x00
2019-04-02 20:51:12.697349 > ACL data: handle 64 flags 0x02 dlen 7
ATT: MTU resp (0x03)
server rx mtu 517
2019-04-02 20:51:12.697681 < ACL data: handle 64 flags 0x00 dlen 7
ATT: Read req (0x0a)
handle 0x0016
2019-04-02 20:51:12.787900 > ACL data: handle 64 flags 0x02 dlen 24
ATT: Read resp (0x0b)
47 61 6C 61 78 79 20 54 61 62 20 41 20 28 32 30 31 36 29
2019-04-02 20:51:12.788100 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 2
2019-04-02 20:51:12.788195 < ACL data: handle 64 flags 0x00 dlen 7
ATT: Read req (0x0a)
handle 0x0018
2019-04-02 20:51:12.922355 > ACL data: handle 64 flags 0x02 dlen 7
ATT: Read resp (0x0b)
00 00
2019-04-02 20:51:12.922622 < ACL data: handle 64 flags 0x00 dlen 11
ATT: Read By Group req (0x10)
start 0x0001, end 0xffff
type-uuid 0x2800
2019-04-02 20:51:13.012608 > ACL data: handle 64 flags 0x02 dlen 18
ATT: Read By Group resp (0x11)
attr handle 0x0001, end group handle 0x0003
value 0x01 0x18
attr handle 0x0014, end group handle 0xffff
value 0x00 0x18
2019-04-02 20:51:13.013056 > HCI Event: Number of Completed Packets (0x13) plen 5
handle 64 packets 2
Any idea what's going on here or how I can even get closer to the source of the problem?
Hi, I have a simple Midi over BLE service implemented using bleno and running on a RPi3. It works fine when I try to connect with an iPhone and an older Nexus Tablet. But my never Samsung Galaxy Tab A is not able to connect. I made hcidumps of all three devices but I am unable to really read/understand them.
Here's my code:
hcidump Nexus Tablet (working properly):
hcidump iPhone (ios/working properly):
hcidump Samsung Galaxy Tab A (NOT working):
Any idea what's going on here or how I can even get closer to the source of the problem?
Thanks in advance!