Pairing Magic Mouse
Tofloor
poster avatar
eridani
deepin
2015-04-07 13:20
Author
Edited by eridani at 2015-4-17 17:41

Hello, I've been having problems trying to pair Apple's Magic Mouse.

Whenever I turn on the mouse, Deepin notices it and try to pair, instantly a notification saying "Magic Mouse Disconected" pops. If I keep clicking, Deepin keeps trying to connect and the notification appears one after another.

I had the same problem when pairing it on Ubuntu a year ago; Ubuntu automatically detected the mouse and tried to pair, then it failed over and over again. That time got it solved by manually setting up the device key (entering 0000 on the Bluetooth panel).

Is there a way to manually set up Bluetooth connections? either via GUI or terminal (not a terminal guy, but don't mind getting my hands dirty > ).

Or is there a different workaround to pair this device?

Best regards.

________________________________________________________
OKAY! Here is the workaround!

It seems the problem is related to this bug, affecting at the very least Ubuntu 13 & 14, I don't know if they fixed it for v15+, but as of now I don't think so.

But everything got complicated because you can't install any program that relies on bluez withouth uninstalling DDE and bluez itself, because Bluez is not called bluez but bluez5; and some stuff (bluez utils, hidd, etc.) although is installed doesn't work OOTB on Deepin like it does on other distros.

I read somewhere that there was the option to pair via 'rfcomm' directly instead using bluez but tried for an hour and never got the trick of it; people said it was easy peasy. They lied!

So! to pair your mouse you have to:
  • Start the Bluez5 agent:
    1. python '/usr/share/bluez5/simple-agent'
    Copy the Code

  • Now try pair again the normal way***.
  • In the terminal window you will be asked to enter the PIN for the device, enter "0000" (four zero) and hit enter
  • Press "ctrl+c" to kill the agent
  • You are set! you can restart to check everything is going smooth.


    *** If the normal way is not working
  • Run on a new terminal:
    1. hcitool scan
    Copy the Code

  • You just got MAC addresses of all visible Bluetooth devices, take note of the one that interest you. Something like XX:XX:XX:XX:XX:XX
  • Now type:
    1. hcitool cc XX:XX:XX:XX:XX:XX
    Copy the Code

  • Enter the PIN "0000" on the first terminal window and continue with the steps above.

Thats it. It isn't that complicated, but when you don't know it, well... you don't know it! and in this particular case few knew it and nobody wrote it, so...
Reply Favorite View the author
All Replies
nickirk
deepin
2015-04-07 16:41
#1
Hello,

I'd suggest you ask the same question in other forums, like https://askubuntu.com/. If there is no further help from this forum.
Basically, most of the solutions on Ubuntu should also do for Deepin. I personally do not have Bluetooth on my laptop, so I can't help you with this. But if you find any solutions elsewhere, please do not forget to update this post as well. ‘Cause it will probably help someone else.

Best
Reply View the author