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

Magic Keyboard doesn't pair #93

Open
cehenriques opened this issue Oct 24, 2024 · 1 comment
Open

Magic Keyboard doesn't pair #93

cehenriques opened this issue Oct 24, 2024 · 1 comment

Comments

@cehenriques
Copy link

Hi.

I have 2 Macbook Pro and I'm trying to use blueutil to quickly pair an Apple Magic Keyboard on one or other.
I'm running this shell script:

if [ $connected -eq '1' ]
then
    echo "already connected"
else
    echo "unpairing with BT device $id, $name"
    blueutil --unpair "$id"
    echo "unpaired, waiting a few seconds for device to go to pairable state"
    sleep 3
    echo "pairing with BT device $id, $name"
    blueutil --pair "$id"
    echo "paired"
    blueutil --connect "$id"
    echo "connected"
fi

The keyboard gets unpaired successfully, but then blueutil gets stuck on the --pair command.
I need to turn off and on the keyboard again and add it through the Bluetooth settings.

Is this a common issue or is there anything I can adjust on my script?

  • blueutil 2.10.0
  • macOS 12.7.6 (Monterrey)
  • Macbook Pro 15-inch, Mid 2015
  • Apple Magic Keyboard with numpad

Thank you.

@toy
Copy link
Owner

toy commented Nov 13, 2024

The commands are correct, but I'm wondering about the script, as it unpairs then pairs and connects the same device. Anyway please check if bluetooth is allowed for the terminal application that you are using. Also have you tried with any other bluetooth device and does it not work on both macbooks?

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

No branches or pull requests

2 participants