The Grumpy Troll

Ramblings of a grumpy troll.

Re-pairing Apple Magic Mouse after battery swap

The Troll was using Mrs Troll's iMac, with an Apple Magic Mouse, when the low-battery warning popped up on screen. The mouse is about a month old and comes with non-rechargeable batteries. Fortunately, being of a technical persuasion, this Troll keeps a supply of AA batteries on hand. Even today. Yes, a quaint Troll.

What happened next? The mouse refused to work after the batteries were swapped. < Cmd-Space "bluetooth" down-a-few-times Enter > (a Spotlight search) pulled up the Bluetooth preferences pane. Tab navigation was able to show me two devices, the keyboard and mouse, and show me the mouse paired but not connected. I could find no way to get to the Discoverable checkbox to make the computer findable again.

Some search engine usage and browsing Apple's help docs only turned up confident assertions that the mouse would function fine after the battery swap. A terminal window was used to check for any defaults that might be of use:

$ defaults domains | tr , \\n | fgrep -i blue
$ defaults read

but no such luck. But then:

$ mdfind bluetooth

and some <Cmd-arrow> scrolling led to spotting a useful candidate:

$ open /System/Library/CoreServices/Bluetooth\ Setup\

This setup assistant searched for discoverable devices; I quickly power-cycled the mouse (!!) to make sure the light was blinking and it was discoverable. The mouse was found, I “Continue"d. I was told that the mouse was already paired! I checked, still not working. I then chose to answer in the affirmative to the question,

Your computer is already paired with that device. Do you wish to remove the pairing and set up the device again?

A few moments later, I was a happy troll, with a working mouse. Which is a little sad, as a heavy command-line user, but such is life with a Mac.

Some thoughts:

  • Both the Bluetooth and the Mouse preference panes could do with having keyboard shortcuts, with visible affordances to indicate what they are, so that in the event of being mouse-less it's possible to recover easily
  • When using Spotlight, the apps visible for Bluetooth were “Bluetooth Explorer”, “Bluetooth Diagnostics Utility” & “Bluetooth File Exchange”. No “Bluetooth Setup Assistant”, even if I enter more of the term. No, the diagnostics utility does not appear to offer anything relevant. So the only mechanism to run this without a mouse to ask for it, appears to be to use Spotlight (Cmd-Space) to run a Terminal and go from there.

So, MacOS X remains very slick and shiny, but it's when you're trying to recover from problems that you find out how error recovery is not so well thought through. Much as I am glad that Mrs Troll is adapting to using a Mac, so that I will need to touch Windows less frequently, the Windows habit of highlighting keyboard shortcuts is good for recovery, “ugly” be damned.

Ah well, perhaps this post will pop up in search query results and help others handle things more readily.


Usually it reconnects when you use/click it; this post is about how to recover on those occasions when it doesn't.

Categories: MacOSX Repair Mouse Battery Paired mouse Bluetooth