Open Na-Cly opened 4 years ago
It should be noted this workaround didn’t work the last time I tried it, so it’s definitely not a fix every time.
- Remove device from mac from debug menu
Where can I find the "debug menu"?
Where can I find the "debug menu"?
Hold shift and option while clicking the bluetooth menu bar icon
another tip shared @petejohanson
My Macbook constantly wake itself up from sleep, and the battery drains over night. I suspect it is waken up by battery report or some other notification but it wake up even when I switch the keyboard to a different ZMK BLE profile. Unchecking the checkbox that allows bluetooth to wake up computer solves the issue, but for some mysterious reason my MacOS automatically re-check that box for me from time to time.
@pluskid do you have ZMK deep sleep enabled? We're almost ready to enable it by default, but if you haven't turned it on, doing so might help, since once the keyboard sleeps it will stop sending battery notifications.
@petejohanson Cool! I will test it tonight.
Update: it did not work. pmset -g log
shows DarkWake to FullWake from Deep Idle [CDNVA] : due to HID Activity Using AC (Charge:100%)
. I was not able to see anything suspicious from USB logging (when the keyboard is connected to another computer). Currently the only workaround that works is unchecking 'Allow Bluethooth devices to wake this computer', and the main pain point is that that checkbox somehow get checked again automatically by some mysterious force.
@petejohanson Enabling deep sleep did not work, but my guess is it has not really entered deep sleep stage yet. For my case, the laptop wakes up almost within 1 minute of being put to sleep, which is definitely before the deep sleep kicks in. Is there way to trigger the deep sleep manually using a key press? Or are we able to config the sleep timeout to be a very short one for debugging purpose?
We've just merged the update to Zephyr 2.4.0, which brings some major BT stability improvements (macOS!)
Does this mean this issue is resolved?
Is Mac OS BLE really a trash can? ;p
I’m using it daily, still have drops occasionally.
Sent from my iPhone
On 14 Dec 2020, at 21:30, carbncl notifications@github.com wrote:
We've just merged the update to Zephyr 2.4.0, which brings some major BT stability improvements (macOS!)
Does this mean this issue is resolved?
Is Mac OS BLE really a trash can? ;p
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Oh also, does this solve the constant wake from sleep of macOS?
Nope
Sent from my iPhone
On 14 Dec 2020, at 21:33, carbncl notifications@github.com wrote:
Oh also, does this solve the constant wake from sleep of macOS?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Nope … Sent from my iPhone On 14 Dec 2020, at 21:33, carbncl @.***> wrote: Oh also, does this solve the constant wake from sleep of macOS? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
My suspicion is that the BAS notifications are causing the wake-up. We may need to enhance the BAS stuff to check for any subscriptions to the notification before sending; upstream Zephyr battery service may not do that, and so that may be causing issues.
I will recompile the firmware and confirm the new updates behaviours.
I have recompiled the firmware, it has been good for the last 20 hours. Before the Sleep function wasn't working, the new update seems to fix the sleep/wake functionality on the nice nano controller itself, I have not tested with sleeping interruption with Mac.
Anyone have some new tips on this?
My experience matches the original post, connection often appears ok on mac os and in logs over usb but when I disconnect USB there are no keypresses over BT. If I hit reset button on my board mac os quickly updates BT device status to "Not Connected" and it stays as "Not Connected" in BT devices list forever despite laptop and keyboard reboots.
I haven't had success with the 4 steps listed in the OP. I have gotten the board to pair/connect in the past through a whole bunch of trial and error but I can't figure out a reliable way to do it again after accidentally hitting bt clear the other day :man_facepalming: .
There are some additional plist
files you can try deleting, see https://stackoverflow.com/a/20554393
Another option to try is blueutil --discoverable 1
a user recently said they may have fixed their issue with that, see #763
Thanks @MvEerd . I had tried the plist stuff with no luck in the past. I tried the blueutil command just now and I'm up and running. Not sure I understand "why" that worked but that's fine, ha.
I've noticed a lot more ease after zephyr core upgrades. It usually feels like a crapshoot of what fixes it though.
Would it be possible to bring back bond-reset as a behavior, instead of as a flashable shield? I find that resetting the bond often fixes the issue. Being able to do this as a behavior would be much less hassle than flashing the reset shield
Nothing is working for me, I have a nice!nano and reviung41 with macOS
Nothing works for me either on nice!60, MacOS 11.5.1
Do we know what the error code is from Zephyr?
I am using an M1 MacBook Pro with a Sofle split keyboard (nice!nano on both halves) and see the errors below.
I have tried the reset, remove all Bluetooth devices, clear bond approach many times but never had success.
[00:00:33.100,616] <dbg> zmk.connected: Connected thread: 0x20002f88
[00:00:33.100,646] <dbg> zmk.connected: Connected a0:78:17:75:2e:f0 (public)
[00:00:33.100,646] <dbg> zmk.update_advertising: advertising from 0 to 2
[00:00:33.861,267] <inf> bas: BAS Notifications enabled
[00:00:34.011,352] <err> zmk: Security failed: a0:78:17:75:2e:f0 (public) level 1 err 4
[00:00:34.267,333] <err> zmk: Security failed: a0:78:17:75:2e:f0 (public) level 1 err 4
[00:00:38.344,512] <dbg> zmk.le_param_updated: a0:78:17:75:2e:f0 (public): interval 12 latency 30 timeout 400
@peauters is this the kind of information you were looking for? Let me know if I need to do more digging.
After having the same issues with endless spinner connects on the following devices, I think I found a process that works for me on my Polarity Works BT60.
Some of these steps might not be necessary, but it's what worked for me:
What works for me literally just trying over and over again until it successfully pairs and works. As in 1) forget device from macOS menu 2) clear relevant profile on device 3) try to pair 4) go to step 1.
Is there anything any of us can do to help debug what's causing the issues and help the ZMK maintainers fix this issue?
There is definitely some problem with MacBooks on last MacOS version. I can't connect nrfmicro to my MacBook Air M1 with 11.2.1. But I can connect the same nrfmicro to my Hackintosh with same OS version and native bluetooth module.
I tried all the steps above. Also I tried updating MacBook to beta OS. Nothing helps. I paired them few times. But when I switch device on keyboard or wait for the sleep - connection breaks and I cannot reconnect or re-pair it anymore.
I'm having issues as well with my Nice!Nanos on my Intel MBP (13-inch, 2019, Two Thunderbolt 3 ports).
I've tried clearing all the profiles, it's detecting the keyboard just fine, but after clicking connect it just spins and spins.
Curiously, it also had problems with my bootcamp partition and my phone.
After having the same issues with endless spinner connects on the following devices, I think I found a process that works for me on my Polarity Works BT60.
* Macbook Pro 15" Mid 2015 macOS 10.15.7 * Macbook Pro 15" 2019 macOS 10.15.7 * Macbook Air 13" M1 macOS 11.3
Some of these steps might not be necessary, but it's what worked for me:
1. Remove BT60 from every computer 2. BT_CLR every profile 3. Unplug power and battery from PCB 4. Turn off every computer 5. Wait at least 10 minutes 6. Plug only battery in PCB 7. Turn on first computer 8. Select a profile 9. Connect BT60 on first computer 10. Repeat 7-9 for all computers
This seems promising but I -- the idiot that I am -- don't know how to switch between profiles on the BT60. Any chance you could help me out?
@DavidCarstens If you haven't switched the BT profile before you probably don't need to reset them all, but this is the default BT60 keymap where you can toggle BT next and prev, which cycles through 1-5 looped.
I have just tried Pete's PR and it really works on macbook m1!
I tried PR #946 on a Corne-ish Zen (nRF52840, zmk branch) on a 2020 MBP (Big Sur).
I have tried many resets/CLRs, but am failing to get the keyboard to connect. (It says Connected
in BT prefs but is spinning.)
My Mac console logs are:
default 11:06:46.033437-0400 bluetoothd ***** [handleATTErrorResponse].
error 11:06:46.033509-0400 bluetoothd ***** [handleATTErrorResponse] - Insufficient Encryption.
default 11:06:46.033535-0400 bluetoothd ***** [handleATTErrorResponse] - Link is not encrypted, perform pairing with MITM disbled.
default 11:06:46.033565-0400 bluetoothd ***** [startLESecurityManagerPairingSecureConnection] Start secure pairing with mitm: 0, bonding: 1, sc: 1, keypress: 0, ct2: 0
default 11:06:46.033849-0400 bluetoothd ***** [startLESecurityManagerPairingSecureConnection] - Master: _localAuthReq: 0x9, localInitiatorKeyDistribution: 0x3, localResponderKeyDistribution: 0x3
default 11:06:46.033874-0400 bluetoothd ***** [pairingRequest] Send Pairing Request: auth 0x9
default 11:06:46.063355-0400 bluetoothd ***** [l2capChannelData] - Received Pairing Failed.
error 11:06:46.063482-0400 bluetoothd *****[handlePairingFailed] reason = 3.
error 11:06:46.063872-0400 bluetoothd Unable to Subscribe to HID Report <GATTDescriptor:0x7fdb98372900 handle:0x0022 uuid:0x2902> - Destroying HID If Created
I tried PR #946 on a Corne-ish Zen (nRF52840, zmk branch) on a 2020 MBP (Big Sur).
I have tried many resets/CLRs, but am failing to get the keyboard to connect. (It says
Connected
in BT prefs but is spinning.)My Mac console logs are:
default 11:06:46.033437-0400 bluetoothd ***** [handleATTErrorResponse]. error 11:06:46.033509-0400 bluetoothd ***** [handleATTErrorResponse] - Insufficient Encryption. default 11:06:46.033535-0400 bluetoothd ***** [handleATTErrorResponse] - Link is not encrypted, perform pairing with MITM disbled. default 11:06:46.033565-0400 bluetoothd ***** [startLESecurityManagerPairingSecureConnection] Start secure pairing with mitm: 0, bonding: 1, sc: 1, keypress: 0, ct2: 0 default 11:06:46.033849-0400 bluetoothd ***** [startLESecurityManagerPairingSecureConnection] - Master: _localAuthReq: 0x9, localInitiatorKeyDistribution: 0x3, localResponderKeyDistribution: 0x3 default 11:06:46.033874-0400 bluetoothd ***** [pairingRequest] Send Pairing Request: auth 0x9 default 11:06:46.063355-0400 bluetoothd ***** [l2capChannelData] - Received Pairing Failed. error 11:06:46.063482-0400 bluetoothd *****[handlePairingFailed] reason = 3. error 11:06:46.063872-0400 bluetoothd Unable to Subscribe to HID Report <GATTDescriptor:0x7fdb98372900 handle:0x0022 uuid:0x2902> - Destroying HID If Created
Can you get the ZMK logs when this happens, as well?
Sure, thanks for taking a look Pete!
I turned MBP bluetooth on, and pushed Connect button:
[00:02:31.140,014] <dbg> zmk.split_central_connected: Connected: 88:66:5a:10:0a:cf (public)
[00:02:31.140,045] <dbg> zmk.split_central_process_connection: Current security for connection: 1
[00:02:31.141,571] <dbg> zmk.split_central_process_connection: New connection params: Interval: 12, Latency: 0, PHY: 1
[00:02:31.141,632] <dbg> zmk.connected: Connected thread: 0x20003530
[00:02:31.141,662] <dbg> zmk.connected: Connected 88:66:5a:10:0a:cf (public)
[00:02:31.141,662] <dbg> zmk.update_advertising: advertising from 0 to 2
[00:02:31.147,186] <inf> bas: BAS Notifications enabled
[00:02:31.704,559] <err> zmk: Security failed: 88:66:5a:10:0a:cf (public) level 1 err 4
[00:02:31.990,631] <err> zmk: Security failed: 88:66:5a:10:0a:cf (public) level 1 err 4
[00:02:32.215,911] <err> zmk: Security failed: 88:66:5a:10:0a:cf (public) level 1 err 4
[00:02:32.275,756] <err> zmk: Security failed: 88:66:5a:10:0a:cf (public) level 1 err 4
[00:02:32.335,601] <err> zmk: Security failed: 88:66:5a:10:0a:cf (public) level 1 err 4
[00:02:36.337,432] <dbg> zmk.le_param_updated: 88:66:5a:10:0a:cf (public): interval 12 latency 30 timeout 400
I then turned MBP bluetooth off:
[00:03:21.633,056] <inf> bas: BAS Notifications disabled
[00:03:21.636,077] <dbg> zmk.split_central_disconnected: Disconnected: 88:66:5a:10:0a:cf (public) (reason 19)
[00:03:21.636,169] <dbg> zmk.disconnected: Disconnected from 88:66:5a:10:0a:cf (public) (reason 0x13)
Sure, thanks for taking a look Pete!
I turned MBP bluetooth on, and pushed Connect button:
[00:02:31.140,014] <dbg> zmk.split_central_connected: Connected: 88:66:5a:10:0a:cf (public) [00:02:31.140,045] <dbg> zmk.split_central_process_connection: Current security for connection: 1 [00:02:31.141,571] <dbg> zmk.split_central_process_connection: New connection params: Interval: 12, Latency: 0, PHY: 1 [00:02:31.141,632] <dbg> zmk.connected: Connected thread: 0x20003530 [00:02:31.141,662] <dbg> zmk.connected: Connected 88:66:5a:10:0a:cf (public) [00:02:31.141,662] <dbg> zmk.update_advertising: advertising from 0 to 2 [00:02:31.147,186] <inf> bas: BAS Notifications enabled [00:02:31.704,559] <err> zmk: Security failed: 88:66:5a:10:0a:cf (public) level 1 err 4 [00:02:31.990,631] <err> zmk: Security failed: 88:66:5a:10:0a:cf (public) level 1 err 4 [00:02:32.215,911] <err> zmk: Security failed: 88:66:5a:10:0a:cf (public) level 1 err 4 [00:02:32.275,756] <err> zmk: Security failed: 88:66:5a:10:0a:cf (public) level 1 err 4 [00:02:32.335,601] <err> zmk: Security failed: 88:66:5a:10:0a:cf (public) level 1 err 4 [00:02:36.337,432] <dbg> zmk.le_param_updated: 88:66:5a:10:0a:cf (public): interval 12 latency 30 timeout 400
I then turned MBP bluetooth off:
[00:03:21.633,056] <inf> bas: BAS Notifications disabled [00:03:21.636,077] <dbg> zmk.split_central_disconnected: Disconnected: 88:66:5a:10:0a:cf (public) (reason 19) [00:03:21.636,169] <dbg> zmk.disconnected: Disconnected from 88:66:5a:10:0a:cf (public) (reason 0x13)
Can you also post the logs from restart, and when selecting and clearing each of the BT profiles?
Here are the logs you asked for:
```
[tio 17:17:08] Disconnected
[tio 17:17:15] Connected
m
```
[00:04:22.182,891]
```
[00:06:15.060,974]
On BT_CLR
and BT_SEL n
, I don't see anything interesting other than
<err> zmk: Advertising failed to start (err -69)
Thank you!
After having the same issues with endless spinner connects on the following devices, I think I found a process that works for me on my Polarity Works BT60.
* Macbook Pro 15" Mid 2015 macOS 10.15.7 * Macbook Pro 15" 2019 macOS 10.15.7 * Macbook Air 13" M1 macOS 11.3
Some of these steps might not be necessary, but it's what worked for me:
1. Remove BT60 from every computer 2. BT_CLR every profile 3. Unplug power and battery from PCB 4. Turn off every computer 5. Wait at least 10 minutes 6. Plug only battery in PCB 7. Turn on first computer 8. Select a profile 9. Connect BT60 on first computer 10. Repeat 7-9 for all computers
Based on your advice, I tried a modification of this that worked for me today:
BT_SEL <#>
and BT_CLR
on every single profile (I have 0-3)BT_SEL 1
for me)After having the same issues with endless spinner connects on the following devices, I think I found a process that works for me on my Polarity Works BT60.
* Macbook Pro 15" Mid 2015 macOS 10.15.7 * Macbook Pro 15" 2019 macOS 10.15.7 * Macbook Air 13" M1 macOS 11.3
Some of these steps might not be necessary, but it's what worked for me:
1. Remove BT60 from every computer 2. BT_CLR every profile 3. Unplug power and battery from PCB 4. Turn off every computer 5. Wait at least 10 minutes 6. Plug only battery in PCB 7. Turn on first computer 8. Select a profile 9. Connect BT60 on first computer 10. Repeat 7-9 for all computers
Based on your advice, I tried a modification of this that worked for me today:
1. Forget the keyboard on my work Macbook Pro 2. On my keyboard, `BT_SEL <#>` and `BT_CLR` on every single profile (I have 0-3) 3. Select the profile I wanted to use to pair with my work MBP (Which was `BT_SEL 1` for me) 4. I re-paired my keyboard and am using it to type this message. I'll report back if I have this issue again and if this fix is enough or if I just go lucky from unpairing/forgetting/re-trying a bunch of times.
Follow up: I lost connection as soon as I closed my laptop lid and went from home to a coffee shop. This was yesterday. For a few days, even with my MBP going to sleep, I had no issues with the connection.
I've tried the steps I mentioned and nothing works so far.
Any updates here? This seems to semi-reliably happen after trying to reconnect to a Mac after either clearing the corresponding bluetooth bond or reflashing firmware onto the controllers. Removing the device in System Preferences -> Bluetooth before doing this doesn't seem to be a reliable preventative measure.
In all cases, the keyboard connects an iPhone just fine but continues to hang in the "Connected" state with a spinner in the bluetooth preferences on the Mac.
Anecdotally, resetting the controllers and clearing all the bluetooth bonds multiple times seems to be potentially correlated with resolving the connectivity issue.
I have the same issue. Initially, the keyboard connected to my MacBook on the first try, but now I can't get it to connect even once. One difference is, that I don't see the loading indicator when trying to connect to it. The keyboard just moves to the "connected" section, and stays there for about 1 minute. I think that I'll be using the keyboard with a cable for now.
This is the only thing that worked for me: (I tried all of the suggestions above) https://zmk.dev/docs/troubleshooting/#split-keyboard-halves-unable-to-pair
To add some tiny data points to this: I am experiencing this issue very regularly on my Intel MacBook Pro, but I haven't had it on my M1 Air or my Hackintosh so far. (crkbd with a nice!nano and a corne-ish zen)
To add some tiny data points to this: I am experiencing this issue very regularly on my Intel MacBook Pro, but I haven't had it on my M1 Air or my Hackintosh so far. (crkbd with a nice!nano and a corne-ish zen)
I'm having issues with my hackintosh, Ventura 13.2.1
Pairing with Mac OS has been an overall negative experience that requires multiple resets of the keyboard and multiple resets of bluetooth settings on the mac, and when it does start working you've tried so many things you don't even remember how you got to where you are.
Here's behavior I've seen when pairing and unpairing from mac os:
Since the improved bluetooth profiles were released this has been significantly helped as now if the connection is established and working it will usually continue working and an occasional reset of central is required after a reboot.
There are ways to get it working with a couple of reboots but I wanted a method of restoring connectivity without rebooting. So far this is the method I've come up with:
This has been the best to get the keyboard working again without rebooting.