Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot register new user #29

Open
nerdosity opened this issue Mar 27, 2021 · 25 comments
Open

cannot register new user #29

nerdosity opened this issue Mar 27, 2021 · 25 comments
Labels
enhancement New feature or request

Comments

@nerdosity
Copy link

Hi,

Just installed in VM on Synology, but this happened to me on Raspberry Pi3 2 yeas ago.

Croot@debian-nodejs:~# keyble-registeruser -n keyble -q M001ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXNEQXXXXXXXXX Press and hold "Unlock" button until the yellow light flashes in order to enter pairing mode Registering user on Smart Lock with address "00:xx:xx:xx:xx:e9", card key "xxxxxxxxxxxxxxxxxxxxxxxxxxx" and serial "NEQXXXXXXXX"...

And it stay like this forever.
Running everything with root.

@nerdosity
Copy link
Author

Not working even without the key, passing it on user input it's the same.

@nerdosity
Copy link
Author

https://pastebin.com/TSNQhyEb this is with DEBUG enabled.

@oyooyo
Copy link
Owner

oyooyo commented Mar 29, 2021

@nerdosity As I understand the debug log, the problem was that your smart lock was not discovered while scanning for nearby Bluetooth devices. Your smart lock has a MAC address starting with "00:1a:...", but no such device shows up while scanning. Two possible reasons instantly come to my mind:

  1. The smart lock was indeed simply too far away from the device you ran this on
  2. There was already another connection to the smart lock when you ran the program. AFAIK, the smart lock only ever allows a single connection, so as soon as one device is connected, the smart lock stops advertising and can thus no longer be discovered by a Bluetooth scan. If this should be the case, the most probable reason would probably be that your smartphone was connected to the smart lock at that time, in which case you should try terminating the smartphone app and try to run the program again.

@oyooyo oyooyo added the enhancement New feature or request label Mar 29, 2021
@oyooyo
Copy link
Owner

oyooyo commented Mar 29, 2021

I currently assume this is not an actual bug, but it would clearly be better if there was a timeout and a meaningful error message if the smart lock cannot be discovered for some reason.

@nerdosity
Copy link
Author

@nerdosity As I understand the debug log, the problem was that your smart lock was not discovered while scanning for nearby Bluetooth devices. Your smart lock has a MAC address starting with "00:1a:...", but no such device shows up while scanning. Two possible reasons instantly come to my mind:

  1. The smart lock was indeed simply too far away from the device you ran this on
  2. There was already another connection to the smart lock when you ran the program. AFAIK, the smart lock only ever allows a single connection, so as soon as one device is connected, the smart lock stops advertising and can thus no longer be discovered by a Bluetooth scan. If this should be the case, the most probable reason would probably be that your smartphone was connected to the smart lock at that time, in which case you should try terminating the smartphone app and try to run the program again.

Hi, I tried again yesterday.
I could still not register user.
I disconnected bluetooth on my phone, and asked my girlfriend to turn off on hers.

I can consistently scan for the EQ3 lock, but this issue persists.
Bluetooth is near the lock, I think 3/4 meters, no walls between.
Have you got any suggestion?
The virtual machine is clear, I just created it and installed your tools. I am using root user, and I can scan, reset HCI and all, so I don't think it's a bluetooth permission issue.

@oyooyo
Copy link
Owner

oyooyo commented May 1, 2021

Hi, I tried again yesterday.
I could still not register user.
I disconnected bluetooth on my phone, and asked my girlfriend to turn off on hers.

I can consistently scan for the EQ3 lock, but this issue persists.
Bluetooth is near the lock, I think 3/4 meters, no walls between.
Have you got any suggestion?
The virtual machine is clear, I just created it and installed your tools. I am using root user, and I can scan, reset HCI and all, so I don't think it's a bluetooth permission issue.

It definitely doesn't seem to be bluetooth permission issue. I'm afraid I currently have no other idea what might be causing the problem. As I said, the debug log you posted indicates that the problem is that the device running keyble is not receiving any BLE advertisements from the smart lock. However, it does receive BLE advertisements by a number of other BLE peripherals, so the BLE scanning generally seems to be working.

What you might try is installing the free "nRF Connect" smartphone app (if you don't have it installed yet). Start it, place your smartphone next to the device running keyble, and make the NRF Connect-App run a BLE scan as well while you're trying to register a new user via keyble. Check if your smartphone shows the smart lock when you scan for BLE devices.

@magisternavis
Copy link

Same issue here: trying to get a new user registered with no success. I went through the detailed installation manual and also tried it as root user.

root@homebridge:~# keyble-registeruser -n homebridge -q M...........................................0
Press and hold "Unlock" button until the yellow light flashes in order to enter pairing mode
Registering user on Smart Lock with address "00:xxxx:8f", card key "38xxxxxx92" and serial "NExxxxxx"...

@josepedromonteiro
Copy link

@magisternavis @oyooyo Could this be somehow related to this issue?

@magisternavis
Copy link

@magisternavis @oyooyo Could this be somehow related to this issue?

Unfortunately not since I’m running homebridge on a raspberry 3B+. My web client is indeed a Mac but with Big Sur not Monterey. The software is on a raspberry.

@oyooyo
Copy link
Owner

oyooyo commented Nov 19, 2021

@magisternavis

Here's a few things you could try:

  1. Turn debug output on by prepending the keyble-registeruser with DEBUG=*, so like this:
DEBUG=* keyble-registeruser <args...>

Debug output should hopefully provide some hints about the problem. But don't post the raw debug output here, as it might contain information that you do not want to publish. Remove information that looks like MAC addresses or the "card key" for example. Posting the actual data being sent between the computer and the smart lock shouldn't pose a security problem though.

  1. If you have a separate Bluetooth 4-capable USB dongle, try using this instead of the internal Bluetooth hardware of the Raspberry Pi. As far as I remember, the Raspberry Pi internal Bluetooth hardware sometimes causes some strange issues.
    To specify which Bluetooth adapter to use, prepend the keyble-registeruser command with NOBLE_HCI_DEVICE_ID=<adapter id> (see here for more information)

  2. Try to make sure that no other device is currently connected to the smart lock. AFAIK, only one device can be connected to the smart lock at any time, so if for example the official app for the smart lock was running on your smartphone and was somehow connected to the smart lock while trying to run keyble-registeruser, the command wouldn't even be possible to scan for the smart lock and would fail. The free "nRF Connect" app could be helpful, if it doesn't show a "KEY-BLE" entry when scanning for nearby Bluetooth LE devices, there's something wrong.

  3. If possible, place the smart lock rather close to the Raspberry Pi (just so you can rule out problems like a weak radio connection, ignore this if you are sure the problem is unrelated to a weak radio connection).

@phrogg
Copy link

phrogg commented Dec 9, 2021

Same Problem here:

DEBUG=* keyble-registeruser -n Pihole -q **********
Press and hold "Unlock" button until the yellow light flashes in order to enter pairing mode
Registering user on Smart Lock with address "**************", card key "***********" and serial "***********"...
Error: ENODEV, No such device
    at Hci.init (/usr/lib/node_modules/keyble/node_modules/@abandonware/noble/lib/hci-socket/hci.js:121:20)
    at NobleBindings.init (/usr/lib/node_modules/keyble/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:93:13)
    at Noble.get (/usr/lib/node_modules/keyble/node_modules/@abandonware/noble/lib/noble.js:73:26)
    at /usr/lib/node_modules/keyble/node_modules/simble/simble.js:130:13
    at new Promise (<anonymous>)
    at ensure_noble_state (/usr/lib/node_modules/keyble/node_modules/simble/simble.js:129:9)
    at Object.scan_for_peripheral (/usr/lib/node_modules/keyble/node_modules/simble/simble.js:593:9)
    at Key_Ble.ensure_peripheral (/usr/lib/node_modules/keyble/keyble.js:863:19)
    at Key_Ble.ensure_connected (/usr/lib/node_modules/keyble/keyble.js:887:17)
    at Key_Ble.send_message (/usr/lib/node_modules/keyble/keyble.js:841:73) {
  errno: 19,
  code: 'ENODEV',
  syscall: 'bind'
}

I tried this on my main PC and also on my Pihole with the same result as above.

@oyooyo
Copy link
Owner

oyooyo commented Dec 9, 2021

Error: ENODEV, No such device

Strange error. Sounds to me like the noble library was for some reason unable to find/access any Bluetooth adapter it could use.
There is one issue in noble's GitHub tracker that also mentions this error type, but there's no solution posted yet.

@magisternavis
Copy link

  1. Turn debug output on by prepending the keyble-registeruser with DEBUG=*, so like this:

Sorry but I cant do anything with this result 😀

pi@homebridge:/var/lib/homebridge $ sudo DEBUG=* keyble-registeruser -n homebridge -q MXXXXXXX Press and hold "Unlock" button until the yellow light flashes in order to enter pairing mode Registering user on Smart Lock with address "00:1a:22:09:82:8f", card key "XXXXX" and serial "YYYYY"... hci setting filter to: 1600000020c10800000000400000 +0ms hci set event mask - writing: 01010c08fffffbff07f8bf3d +7ms hci set le event mask - writing: 010120081f00000000000000 +3ms hci read local version - writing: 01011000 +4ms hci write LE host supported - writing: 016d0c020100 +2ms hci read LE host supported - writing: 016c0c00 +2ms hci le read buffer size - writing: 01022000 +2ms hci read bd addr - writing: 01091000 +2ms hci onSocketData: 040e0401010c00 +8ms hci event type = 4 +2ms hci sub event type = 14 +1ms hci cmd = 3073 +2ms hci status = 0 +0ms hci result = +1ms hci onSocketData: 040e0401012000 +1ms hci event type = 4 +2ms hci sub event type = 14 +0ms hci cmd = 8193 +0ms hci status = 0 +0ms hci result = +1ms hci onSocketData: 040e0c010110000956010931011961 +1ms hci event type = 4 +1ms hci sub event type = 14 +1ms hci cmd = 4097 +0ms hci status = 0 +0ms hci result = 0956010931011961 +1ms hci set scan enabled - writing: 010c20020001 +1ms hci set scan parameters - writing: 010b200701100010000000 +2ms hci onSocketData: 040e04016d0c00 +1ms hci event type = 4 +0ms hci sub event type = 14 +1ms hci cmd = 3181 +0ms hci status = 0 +0ms hci result = +0ms hci onSocketData: 040e06016c0c000100 +1ms hci event type = 4 +0ms hci sub event type = 14 +1ms hci cmd = 3180 +0ms hci status = 0 +0ms hci result = 0100 +0ms hci le = 1 +0ms hci simul = 0 +1ms hci onSocketData: 040e0701022000fb0007 +1ms hci event type = 4 +0ms hci sub event type = 14 +1ms hci cmd = 8194 +0ms hci status = 0 +0ms hci result = fb0007 +0ms hci le buffer size: length = 251, num = 7 +0ms hci onSocketData: 040e0a01091000d97393eb27b8 +1ms hci event type = 4 +0ms hci sub event type = 14 +1ms hci cmd = 4105 +1ms hci status = 0 +0ms hci result = d97393eb27b8 +0ms hci address = b8:27:eb:93:73:d9 +1ms noble addressChange b8:27:eb:93:73:d9 +0ms hci onSocketData: 040e04010c200c +3ms hci event type = 4 +0ms hci sub event type = 14 +0ms hci cmd = 8204 +0ms hci status = 12 +1ms hci result = +0ms hci onSocketData: 040e04010b2000 +1ms hci event type = 4 +0ms hci sub event type = 14 +0ms hci cmd = 8203 +1ms hci status = 0 +0ms hci result = +0ms noble stateChange poweredOn +7ms noble scanParametersSet +1ms simble:info Starting to scan for peripheral... +0ms hci set scan enabled - writing: 010c20020001 +6ms hci set scan parameters - writing: 010b200701100010000000 +0ms hci set scan enabled - writing: 010c20020101 +1ms hci onSocketData: 040e04010c200c +2ms hci event type = 4 +0ms hci sub event type = 14 +0ms hci cmd = 8204 +1ms hci status = 12 +0ms hci result = +0ms hci onSocketData: 040e04010b2000 +1ms hci event type = 4 +0ms hci sub event type = 14 +0ms hci cmd = 8203 +1ms hci status = 0 +0ms hci result = +0ms noble scanParametersSet +9ms hci onSocketData: 040e04010c2000 +1ms hci event type = 4 +1ms hci sub event type = 14 +0ms hci cmd = 8204 +1ms hci status = 0 +0ms hci result = +0ms noble scanStart +3ms hci onSocketData: 043e290201030105aa00e172291d02011a19ff4c000906033cc0a80239130c0a6506287487f5010401030cc3 +21ms hci event type = 4 +1ms hci sub event type = 62 +0ms hci LE meta event type = 2 +0ms hci LE meta event status = 1 +0ms hci LE meta event data = 030105aa00e172291d02011a19ff4c000906033cc0a80239130c0a6506287487f5010401030cc3 +1ms hci type = 3 +1ms hci address = 29:72:e1:00:aa:05 +0ms hci address type = random +0ms hci eir = 02011a19ff4c000906033cc0a80239130c0a6506287487f5010401030c +1ms hci rssi = -61 +0ms gap advertisement = {"manufacturerData":{"type":"Buffer","data":[76,0,9,6,3,60,192,168,2,57,19,12,10,101,6,40,116,135,245,1,4,1,3,12]},"serviceData":[],"serviceUuids":[],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +0ms simble:info Scanned peripheral 29:72:e1:00:aa:05 (Name:"undefined", advertised services:[]) +43ms hci onSocketData: 043e22020100004f85014089be16020106030212180e09454c4b2d424c45444f4d202020a5 +9ms hci event type = 4 +1ms hci sub event type = 62 +0ms hci LE meta event type = 2 +0ms hci LE meta event status = 1 +0ms hci LE meta event data = 00004f85014089be16020106030212180e09454c4b2d424c45444f4d202020a5 +1ms hci type = 0 +0ms hci address = be:89:40:01:85:4f +0ms hci address type = public +0ms hci eir = 020106030212180e09454c4b2d424c45444f4d202020 +0ms hci rssi = -91 +1ms gap advertisement = {"localName":"ELK-BLEDOM ","serviceData":[],"serviceUuids":["1812"],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +10ms hci onSocketData: 043e1d020100011705400b06421102011a020a0c0aff4c001005481c2ec89cac +20ms hci event type = 4 +0ms hci sub event type = 62 +1ms hci LE meta event type = 2 +0ms hci LE meta event status = 1 +0ms hci LE meta event data = 00011705400b06421102011a020a0c0aff4c001005481c2ec89cac +0ms hci type = 0 +0ms hci address = 42:06:0b:40:05:17 +1ms hci address type = random +0ms hci eir = 02011a020a0c0aff4c001005481c2ec89c +0ms hci rssi = -84 +0ms gap advertisement = {"txPowerLevel":12,"manufacturerData":{"type":"Buffer","data":[76,0,16,5,72,28,46,200,156]},"serviceData":[],"serviceUuids":[],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +23ms hci onSocketData: 043e0c020104011705400b064200ac +2ms hci event type = 4 +0ms hci sub event type = 62 +1ms hci LE meta event type = 2 +0ms hci LE meta event status = 1 +0ms hci LE meta event data = 04011705400b064200ac +0ms hci type = 4 +0ms hci address = 42:06:0b:40:05:17 +0ms hci address type = random +1ms hci eir = +0ms hci rssi = -84 +0ms gap advertisement = {"txPowerLevel":12,"manufacturerData":{"type":"Buffer","data":[76,0,16,5,72,28,46,200,156]},"serviceData":[],"serviceUuids":[],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +3ms simble:info Scanned peripheral 42:06:0b:40:05:17 (Name:"undefined", advertised services:[]) +32ms hci onSocketData: 043e1b02010301423fc66e9d2a0f02011a0bff4c0009060389c0a8022cc8 +16ms hci event type = 4 +0ms hci sub event type = 62 +0ms hci LE meta event type = 2 +0ms hci LE meta event status = 1 +1ms hci LE meta event data = 0301423fc66e9d2a0f02011a0bff4c0009060389c0a8022cc8 +0ms hci type = 3 +0ms hci address = 2a:9d:6e:c6:3f:42 +0ms hci address type = random +0ms hci eir = 02011a0bff4c0009060389c0a8022c +1ms hci rssi = -56 +0ms gap advertisement = {"manufacturerData":{"type":"Buffer","data":[76,0,9,6,3,137,192,168,2,44]},"serviceData":[],"serviceUuids":[],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +18ms simble:info Scanned peripheral 2a:9d:6e:c6:3f:42 (Name:"undefined", advertised services:[]) +18ms hci onSocketData: 043e1f0201000111fb2aaa5f581302011a020a070cff4c001007301f8c39096c58bb +7ms hci event type = 4 +0ms hci sub event type = 62 +1ms hci LE meta event type = 2 +0ms hci LE meta event status = 1 +0ms hci LE meta event data = 000111fb2aaa5f581302011a020a070cff4c001007301f8c39096c58bb +0ms hci type = 0 +0ms hci address = 58:5f:aa:2a:fb:11 +1ms hci address type = random +0ms hci eir = 02011a020a070cff4c001007301f8c39096c58 +0ms hci rssi = -69 +1ms gap advertisement = {"txPowerLevel":7,"manufacturerData":{"type":"Buffer","data":[76,0,16,7,48,31,140,57,9,108,88]},"serviceData":[],"serviceUuids":[],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +10ms hci onSocketData: 043e0c0201040111fb2aaa5f5800bb +1ms hci event type = 4 +0ms hci sub event type = 62 +1ms hci LE meta event type = 2 +0ms hci LE meta event status = 1 +0ms hci LE meta event data = 040111fb2aaa5f5800bb +0ms hci type = 4 +1ms hci address = 58:5f:aa:2a:fb:11 +0ms hci address type = random +0ms hci eir = +0ms hci rssi = -69 +1ms gap advertisement = {"txPowerLevel":7,"manufacturerData":{"type":"Buffer","data":[76,0,16,7,48,31,140,57,9,108,88]},"serviceData":[],"serviceUuids":[],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +4ms simble:info Scanned peripheral 58:5f:aa:2a:fb:11 (Name:"undefined", advertised services:[]) +14ms hci onSocketData: 043e1d020100009b821f854a6c1102011a020a0c0aff4c0010050214568130c7 +9ms hci event type = 4 +0ms hci sub event type = 62 +1ms hci LE meta event type = 2 +0ms hci LE meta event status = 1 +0ms hci LE meta event data = 00009b821f854a6c1102011a020a0c0aff4c0010050214568130c7 +6ms hci type = 0 +0ms hci address = 6c:4a:85:1f:82:9b +0ms hci address type = public +0ms hci eir = 02011a020a0c0aff4c0010050214568130 +0ms hci rssi = -57 +0ms gap advertisement = {"txPowerLevel":12,"manufacturerData":{"type":"Buffer","data":[76,0,16,5,2,20,86,129,48]},"serviceData":[],"serviceUuids":[],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +17ms hci onSocketData: 043e0c020104009b821f854a6c00c8 +1ms hci event type = 4 +1ms hci sub event type = 62 +0ms hci LE meta event type = 2 +0ms hci LE meta event status = 1 +0ms hci LE meta event data = 04009b821f854a6c00c8 +0ms hci type = 4 +1ms hci address = 6c:4a:85:1f:82:9b +0ms hci address type = public +0ms hci eir = +1ms hci rssi = -56 +0ms gap advertisement = {"txPowerLevel":12,"manufacturerData":{"type":"Buffer","data":[76,0,16,5,2,20,86,129,48]},"serviceData":[],"serviceUuids":[],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +3ms simble:info Scanned peripheral 6c:4a:85:1f:82:9b (Name:"undefined", advertised services:[]) +20ms hci onSocketData: 043e2902010301c9a818b303111d02011a19ff4c00090603a4c0a8023c130c1ac663187d84be010401030cc1 +2ms hci event type = 4 +1ms hci sub event type = 62 +0ms hci LE meta event type = 2 +0ms hci LE meta event status = 1 +0ms hci LE meta event data = 0301c9a818b303111d02011a19ff4c00090603a4c0a8023c130c1ac663187d84be010401030cc1 +0ms hci type = 3 +1ms hci address = 11:03:b3:18:a8:c9 +0ms hci address type = random +0ms hci eir = 02011a19ff4c00090603a4c0a8023c130c1ac663187d84be010401030c +1ms hci rssi = -63 +0ms gap advertisement = {"manufacturerData":{"type":"Buffer","data":[76,0,9,6,3,164,192,168,2,60,19,12,26,198,99,24,125,132,190,1,4,1,3,12]},"serviceData":[],"serviceUuids":[],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +6ms simble:info Scanned peripheral 11:03:b3:18:a8:c9 (Name:"undefined", advertised services:[]) +6ms hci onSocketData: 043e1d02010001b16d45f58e451102011a020a0c0aff4c00100513185e18f1ab +14ms hci event type = 4 +0ms hci sub event type = 62 +0ms hci LE meta event type = 2 +1ms hci LE meta event status = 1 +0ms hci LE meta event data = 0001b16d45f58e451102011a020a0c0aff4c00100513185e18f1ab +0ms hci type = 0 +1ms hci address = 45:8e:f5:45:6d:b1 +0ms hci address type = random +0ms hci eir = 02011a020a0c0aff4c00100513185e18f1 +0ms hci rssi = -85 +1ms gap advertisement = {"txPowerLevel":12,"manufacturerData":{"type":"Buffer","data":[76,0,16,5,19,24,94,24,241]},"serviceData":[],"serviceUuids":[],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +17ms hci onSocketData: 043e2b020100012b1c0eae8f491f0201061bff4c000c0e00a6d7e4639b2c8c7c51fcc56bfe10064e1d31bc8b18b5 +4ms hci event type = 4 +1ms hci sub event type = 62 +0ms hci LE meta event type = 2 +0ms hci LE meta event status = 1 +0ms hci LE meta event data = 00012b1c0eae8f491f0201061bff4c000c0e00a6d7e4639b2c8c7c51fcc56bfe10064e1d31bc8b18b5 +1ms hci type = 0 +0ms hci address = 49:8f:ae:0e:1c:2b +0ms hci address type = random +1ms hci eir = 0201061bff4c000c0e00a6d7e4639b2c8c7c51fcc56bfe10064e1d31bc8b18 +0ms hci rssi = -75 +1ms gap advertisement = {"manufacturerData":{"type":"Buffer","data":[76,0,12,14,0,166,215,228,99,155,44,140,124,81,252,197,107,254,16,6,78,29,49,188,139,24]},"serviceData":[],"serviceUuids":[],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +7ms hci onSocketData: 043e1d02010001ce0d3ab516511102011a020a180aff4c0010050f18c71cadb8 +35ms hci event type = 4 +1ms hci sub event type = 62 +0ms hci LE meta event type = 2 +1ms hci LE meta event status = 1 +0ms hci LE meta event data = 0001ce0d3ab516511102011a020a180aff4c0010050f18c71cadb8 +0ms hci type = 0 +1ms hci address = 51:16:b5:3a:0d:ce +0ms hci address type = random +0ms hci eir = 02011a020a180aff4c0010050f18c71cad +1ms hci rssi = -72 +0ms gap advertisement = {"txPowerLevel":24,"manufacturerData":{"type":"Buffer","data":[76,0,16,5,15,24,199,28,173]},"serviceData":[],"serviceUuids":[],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +40ms hci onSocketData: 043e0c02010401ce0d3ab5165100b8 +2ms hci event type = 4 +0ms hci sub event type = 62 +1ms hci LE meta event type = 2 +0ms hci LE meta event status = 1 +0ms hci LE meta event data = 0401ce0d3ab5165100b8 +0ms hci type = 4 +0ms hci address = 51:16:b5:3a:0d:ce +0ms hci address type = random +0ms hci eir = +1ms hci rssi = -72 +0ms gap advertisement = {"txPowerLevel":24,"manufacturerData":{"type":"Buffer","data":[76,0,16,5,15,24,199,28,173]},"serviceData":[],"serviceUuids":[],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +3ms simble:info Scanned peripheral 51:16:b5:3a:0d:ce (Name:"undefined", advertised services:[]) +67ms hci onSocketData: 043e0c020104004f85014089be00ae +70ms hci event type = 4 +1ms hci sub event type = 62 +0ms hci LE meta event type = 2 +0ms hci LE meta event status = 1 +0ms hci LE meta event data = 04004f85014089be00ae +1ms hci type = 4 +0ms hci address = be:89:40:01:85:4f +1ms hci address type = public +0ms hci eir = +0ms hci rssi = -82 +0ms gap advertisement = {"localName":"ELK-BLEDOM ","serviceData":[],"serviceUuids":["1812"],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +74ms simble:info Scanned peripheral be:89:40:01:85:4f (Name:"ELK-BLEDOM ", advertised services:[00001812-1000-8000-0080-5f9b34fb]) +75ms hci onSocketData: 043e2a020100008f8209221a001e02010511071bc5d5a5020037b7e611d8150069e05808094b45592d424c45b0 +49ms hci event type = 4 +1ms hci sub event type = 62 +0ms hci LE meta event type = 2 +0ms hci LE meta event status = 1 +1ms hci LE meta event data = 00008f8209221a001e02010511071bc5d5a5020037b7e611d8150069e05808094b45592d424c45b0 +0ms hci type = 0 +1ms hci address = 00:1a:22:09:82:8f +0ms hci address type = public +0ms hci eir = 02010511071bc5d5a5020037b7e611d8150069e05808094b45592d424c45 +1ms hci rssi = -80 +0ms gap advertisement = {"localName":"KEY-BLE","serviceData":[],"serviceUuids":["58e0690015d811e6b7370002a5d5c51b"],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +53ms hci onSocketData: 043e1d020104008f8209221a001108094b45592d424c4507ff001a2209828fb1 +2ms hci event type = 4 +0ms hci sub event type = 62 +1ms hci LE meta event type = 2 +0ms hci LE meta event status = 1 +0ms hci LE meta event data = 04008f8209221a001108094b45592d424c4507ff001a2209828fb1 +1ms hci type = 4 +0ms hci address = 00:1a:22:09:82:8f +1ms hci address type = public +0ms hci eir = 08094b45592d424c4507ff001a2209828f +0ms hci rssi = -79 +1ms gap advertisement = {"localName":"KEY-BLE","manufacturerData":{"type":"Buffer","data":[0,26,34,9,130,143]},"serviceData":[],"serviceUuids":["58e0690015d811e6b7370002a5d5c51b"],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +6ms simble:info Scanned peripheral 00:1a:22:09:82:8f (Name:"KEY-BLE", advertised services:[58e06900-15d8-11e6-b737-0002a5d5c51b]) +58ms simble:info Peripheral 00:1a:22:09:82:8f matches filters, stopping scanning +1ms hci set scan enabled - writing: 010c20020001 +3ms simble:info Connecting to peripheral 00:1a:22:09:82:8f... +2ms hci create le conn - writing: 010d20196000300000008f8209221a000006000c000000c80004000600 +5ms ^C hci onSocketData: 043e2702010001b5f093303bed1b02010612ff4c0006cd00d3ce01dd611b0900e21804020408457665c8 +21s hci event type = 4 +1ms hci sub event type = 62 +0ms hci LE meta event type = 2 +1ms hci LE meta event status = 1 +0ms hci LE meta event data = 0001b5f093303bed1b02010612ff4c0006cd00d3ce01dd611b0900e21804020408457665c8 +0ms hci type = 0 +1ms hci address = ed:3b:30:93:f0:b5 +0ms hci address type = random +0ms hci eir = 02010612ff4c0006cd00d3ce01dd611b0900e21804020408457665 +1ms hci rssi = -56 +0ms gap advertisement = {"localName":"Eve","manufacturerData":{"type":"Buffer","data":[76,0,6,205,0,211,206,1,221,97,27,9,0,226,24,4,2]},"serviceData":[],"serviceUuids":[],"solicitationServiceUuids":[],"serviceSolicitationUuids":[]} +21s hci set scan enabled - writing: 010c20020001 +5ms

  1. If you have a separate Bluetooth 4-capable USB dongle, try using this instead of the internal Bluetooth hardware of the Raspberry Pi. As far as I remember, the Raspberry Pi internal Bluetooth hardware sometimes causes some strange issues.

Tried with same result

  1. Try to make sure that no other device is currently connected to the smart lock. AFAIK, only one device can be connected to the smart lock at any time, so if for example the official app for the smart lock was running on your smartphone and was somehow connected to the smart lock while trying to run keyble-registeruser, the command wouldn't even be possible to scan for the smart lock and would fail. The free "nRF Connect" app could be helpful, if it doesn't show a "KEY-BLE" entry when scanning for nearby Bluetooth LE devices, there's something wrong.

No app is connected. I can see the KEY-BLE as well as when doing a hcitool lescan

  1. If possible, place the smart lock rather close to the Raspberry Pi (just so you can rule out problems like a weak radio connection, ignore this if you are sure the problem is unrelated to a weak radio connection).

same issue after placing raspberry 1cm away from key lock .

@phrogg
Copy link

phrogg commented Feb 25, 2022

I just tried it again as well unfortunately the same issue :(

@user45876
Copy link

user45876 commented Mar 5, 2022

Was just trying to register the lock to a new Zero 2 and unfortunately ran into the same issue. Staying at the mentioned output forever :-( Raspi is located 50cm from the lock, no other app / connection is using it.

@phrogg
Copy link

phrogg commented Apr 11, 2022

The problem still persists for me unfortunately.

@Ircama
Copy link

Ircama commented Dec 27, 2022

Perhaps this problem is unrelated to keyble and I'm afraid that the Eqiva eQ-3 Bluetooth smart lock has an internal firmware limit to register new users. In fact, I happened to find a similar problem with the App (iOS and Android), when registering the same devices on new smartphones: the error message produced by the app when pairing the new smartphones notified the impossibility to add a new user before first deleting another one. Maybe this is because the App in certain occurrences is reusing the same user, or maybe because of the number of registered users. As I do not think that there is a way to manage and remove users saved in the device, the only mode I found to fix the issue was resetting all impacted devices to the factory settings through the instruction manual and then registering again all mobile phones.

@phrogg
Copy link

phrogg commented Dec 27, 2022

Perhaps this problem is unrelated to keyble and I'm afraid that the Eqiva eQ-3 Bluetooth smart lock has an internal firmware limit to register new users. In fact, I happened to find a similar problem with the App (iOS and Android), when registering the same devices on new smartphones: the error message produced by the app when pairing the new smartphones notified the impossibility to add a new user before first deleting another one. Maybe this is because the App in certain occurrences is reusing the same user, or maybe because of the number of registered users. As I do not think that there is a way to manage and remove users saved in the device, the only mode I found to fix the issue was resetting all impacted devices to the factory settings through the instruction manual and then registering again all mobile phones.

I doubt that, because I also had this error and did a reset it removed all users and I could add users via smartphone but not keyble.

@user45876
Copy link

I agree with @phrogg .

@Ircama
Copy link

Ircama commented Dec 27, 2022

OK so it was a different problem, thanks for the feedback

@nerdosity
Copy link
Author

I doubt that, because I also had this error and did a reset it removed all users and I could add users via smartphone but not keyble.

Same. My smart lock was bought after I decided to use it with keyble, so it had just 2 or 3 users.

@DaHype
Copy link

DaHype commented Feb 25, 2023

Es scheint das es ein Problem mit dem Raspberry PI B+ ist.

Ich habe und Virtual Studio, Node und co auf Windows 11 installiert. Hier konnte ich den User Problemlos aktivieren!

Somit ist für mich das Problem nun behoben. Jedoch nun die nächste Baustelle. Die Daten werden mir im MQTT Broker nicht eingelesen. Das ist aber eine andere Sache!

@magisternavis
Copy link

Ach das ist ja mal eine interessante Frage ob es an der Hardware liegt. Hat jemand von euch schon mal eine neuere verwendet?

@phrogg
Copy link

phrogg commented Mar 6, 2023

Es scheint das es ein Problem mit dem Raspberry PI B+ ist.

Ich habe und Virtual Studio, Node und co auf Windows 11 installiert. Hier konnte ich den User Problemlos aktivieren!

Somit ist für mich das Problem nun behoben. Jedoch nun die nächste Baustelle. Die Daten werden mir im MQTT Broker nicht eingelesen. Das ist aber eine andere Sache!
TRANSLATION:
"It seems that it is a problem with the Raspberry PI B+. I have installed Virtual Studio, Node and co on Windows 11. Here I could activate the user without problems! So for me the problem is now solved. But now the next problem. The data are not read in the MQTT Broker. But that is another thing!"

How exactly did you do that? I tried this with my linux systems and had no luck setting it up...

@batram
Copy link

batram commented Nov 25, 2023

Nur um noch mehr dem PI die Schuld in die Schuhe zu schieben.

This really seems to be an issue with the build-in Bluetooth of the PI.

cat /proc/cpuinfo

Hardware        : BCM2835
Revision        : a22082
Model           : Raspberry Pi 3 Model B Rev 1.2

keyble only works intermittently/rarely with the build-in Bluetooth.

After disabling the internal Bluetooth and using an external USB Bluetooth dongle no more problems.
https://gist.github.com/carry0987/a5b84d0098d62080f19c9b9fb690daa2#:~:text=dtoverlay%3Dpi3%2Ddisable%2Dbt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants