Again, this is more for future reference for myself than any, but in case some of you have the same issue:
Add to /boot/loader.conf:
Add to /etc/rc.conf:
Reboot, or run:
Figure out the name of the Bluetooth HCI node by running:
The node name will be something like “ubt0hci”; replace all HCINODE below with this name.
Figure out the EUI-48 address (“BD_ADDR” in the output, six hexadecimal bytes separated by colons) of the mouse by running this right after turning on the mouse:
hccontrol -n HCINODE inquiry
Replace all BDADDR below with the EUI-48 address.
Note: Mighty Mouse goes into sleep mode in a minute or so if it can't find a computer that wants to control it.
Optional: Set up a Bluetooth host alias in /etc/bluetooth/hosts by running:
echo BDADDR BDHOST >> /etc/bluetooth/hosts
Pick a suitable host name, e.g. “mightymouse”, for BDHOST.
Register the device with bthidd(8) by running:
bthidcontrol -a BDADDR query >> /etc/bluetooth/bthidd.conf
Register the PIN for the mouse by adding this to /etc/bluetooth/hcsecd.conf:
name "Mighty Mouse";
Restart hcsecd and bthidd:
Turn the mouse off and back on.
If all went well, bthidd will emit messages like these in /var/log/messages:
Feb 16 23:06:58 seerajeane bthidd: Accepted control connection from BDADDR
Feb 16 23:06:58 seerajeane bthidd: Accepted interrupt connection from BDADDR
Note: Apparently bthidd talks directly to the console control device (/dev/consolectl) to inject mouse messages, without running moused. Don't be alarmed if you don't see any moused running. :D