-
• #2
for me the namePrefix works, in one place you have
filter
notfilters
so maybe that was it -
• #3
Thanks, makes no difference unfortunately ... this is what the list looks like (filter set to 4C):
[ BluetoothDevice: { "id": "68:8e:9f:41:ed:04 private-resolvable", "rssi": -85, "data": new Uint8Array([2, 1, 26, 2, 10, 12, 12, 255, 76, 0, 16, 7, 61, 31, 172, 239, 186, 118, 120]).buffer, "manufacturer": 76, "manufacturerData": new Uint8Array([16, 7, 61, 31, 172, 239, 186, 118, 120]).buffer }, BluetoothDevice: { "id": "55:9d:8f:7b:45:a1 private-resolvable", "rssi": -62, "data": new Uint8Array([2, 1, 26, 26, 255, 76, 0, 12, 14, 8, 3, 143, 238, 224, 193, 184, 184, 230, 42, 244, 112, 20, 89, 16, 5, 75, 28, 13, 209, 32]).buffer, "manufacturer": 76, "manufacturerData": new Uint8Array([12, 14, 8, 3, 143, 238, 224, 193, 184, 184, 230, 42, 244, 112, 20, 89, 16, 5, 75, 28, 13, 209, 32]).buffer }, BluetoothDevice: { "id": "31:7e:10:d1:55:67 private-nonresolvable", "rssi": -45, "data": new Uint8Array([2, 1, 26, 11, 255, 76, 0, 9, 6, 3, 58, 192, 168, 20, 104]).buffer, "manufacturer": 76, "manufacturerData": new Uint8Array([9, 6, 3, 58, 192, 168, 20, 104]).buffer }, BluetoothDevice: { "id": "36:c2:b6:c2:32:23 private-nonresolvable", "rssi": -90, "data": new Uint8Array([2, 1, 26, 11, 255, 76, 0, 9, 6, 3, 5, 192, 168, 1, 47]).buffer, "manufacturer": 76, "manufacturerData": new Uint8Array([9, 6, 3, 5, 192, 168, 1, 47]).buffer }, BluetoothDevice: { "id": "54:24:6f:a9:f3:a0 private-resolvable", "rssi": -49, "data": new Uint8Array([2, 1, 26, 2, 10, 12, 10, 255, 76, 0, 16, 5, 71, 28, 200, 62, 162]).buffer, "manufacturer": 76, "manufacturerData": new Uint8Array([16, 5, 71, 28, 200, 62, 162]).buffer }, BluetoothDevice: { "id": "73:c9:92:18:1f:b6 private-resolvable", "rssi": -28, "data": new Uint8Array([2, 1, 26, 2, 10, 7, 11, 255, 76, 0, 16, 6, 87, 30, 133, 239, 171, 122]).buffer, "manufacturer": 76, "manufacturerData": new Uint8Array([16, 6, 87, 30, 133, 239, 171, 122]).buffer }, BluetoothDevice: { "id": "e5:a2:61:4d:88:81 random", "rssi": -28, "data": new Uint8Array([7, 255, 76, 0, 18, 2, 0, 3]).buffer, "manufacturer": 76, "manufacturerData": new Uint8Array([18, 2, 0, 3]).buffer }, BluetoothDevice: { "id": "74:be:34:49:3d:37 private-resolvable", "rssi": -28, "data": new Uint8Array([2, 1, 26, 13, 255, 76, 0, 22, 8, 0, 143, 10, 199, 38, 46, 176, 112]).buffer, "manufacturer": 76, "manufacturerData": new Uint8Array([22, 8, 0, 143, 10, 199, 38, 46, 176, 112]).buffer }, BluetoothDevice: { "id": "c4:b1:75:d5:55:41 random", "rssi": -47, "data": new Uint8Array([30, 255, 76, 0, 18, 25, 32, 249, 117, 54, 221, 67, 90, 101, 94, 4, 49, 34, 203, 36, 161, 116, 116, 86, 147, 200, 222, 188, 59, 1, 65]).buffer, "manufacturer": 76, "manufacturerData": new Uint8Array([18, 25, 32, 249, 117, 54, 221, 67, 90, 101, 94, 4, 49, 34, 203, 36, 161, 116, 116, 86, 147, 200, 222, 188, 59, 1, 65]).buffer }, BluetoothDevice: { "id": "de:c3:1d:ad:f1:ed random", "rssi": -47, "data": new Uint8Array([7, 255, 76, 0, 18, 2, 36, 0]).buffer, "manufacturer": 76, "manufacturerData": new Uint8Array([18, 2, 36, 0]).buffer }, BluetoothDevice: { "id": "f4:36:f6:2b:1d:7b random", "rssi": -56, "data": new Uint8Array([7, 255, 76, 0, 18, 2, 0, 3]).buffer, "manufacturer": 76, "manufacturerData": new Uint8Array([18, 2, 0, 3]).buffer }, BluetoothDevice: { "id": "6d:8f:cd:d6:fb:9f private-resolvable", "rssi": -88, "data": new Uint8Array([2, 1, 26, 2, 10, 4, 11, 255, 76, 0, 16, 6, 77, 29, 159, 243, 222, 40]).buffer, "manufacturer": 76, "manufacturerData": new Uint8Array([16, 6, 77, 29, 159, 243, 222, 40]).buffer }, BluetoothDevice: { "id": "fe:ab:ab:74:da:31 random", "rssi": -85, "data": new Uint8Array([7, 255, 76, 0, 18, 2, 0, 0]).buffer, "manufacturer": 76, "manufacturerData": new Uint8Array([18, 2, 0, 0]).buffer }, BluetoothDevice: { "id": "48:f0:f4:6b:28:58 private-resolvable", "rssi": -85, "data": new Uint8Array([2, 1, 26, 13, 255, 76, 0, 22, 8, 0, 129, 159, 50, 7, 139, 249, 66]).buffer, "manufacturer": 76, "manufacturerData": new Uint8Array([22, 8, 0, 129, 159, 50, 7, 139, 249, 66]).buffer } ]
How come there is no "name" at all?
-
• #4
that looks like correct output for
filters : [{ manufacturerData:{0x004c:{}} }]
- all of them manufacturer 76 = 0x4c
name is optional, lot of devices do not have any name, when using here I see a lot of devices without name but some do have it
Hi again,
I want my puck to wait a little longer before going into code that changes its name and advertising behaviour. But want it to wait only if a certain device is around (e.g. my iPhone).
So I tried to do a scan or a request ... but this never returns ANY names of the devices, even with higher timeouts and "active" being true?!
"namePrefix" does not make a difference when using findDevices – it just lists all, regardless of what I set. "namePrefix" does the opposite when using requestDevice – it never finds any, even if I just set one letter. Yes, I can see plenty of devices around using nRF-Connect including the ones I want the Puck to find.
This is what I have tried:
--> puts out a rather large list, but without names
--> shows the same full list without names, although only two devices would fit.
--> times out without any result
I have tried setting timeout to 10 or even 30 seconds – no difference. I must be doing something fundamentally wrong. Please advise.