How to install a bluetooth mouse in Linux
This worked on my laptop with all the bluetooth mice I have tested. The one I use is a Trust MI-5300M Bluetooth Optical Mini Mouse. For a list of tested mice see the bottom of this page, but it should work with any bluetooth mouse.
First of all, make sure you have set up your bluetooth dongle/adapter correctly. Maybe test it by connecting to your phone.
Edit your /etc/X11/xorg.conf to include this:
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Mouse1" "SendCoreEvents"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice" #this may be different, depends on your distro.
EndSection
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/input/mice" #this may be different, depends on your distro.
Option "Emulate3Buttons" "false"
Option "ZAxisMapping" "4 5"
EndSection
Open your bluetooth configuraton file (/etc/conf.d/bluetooth) and change the HIDD setting to "true"
# Start hidd (allowed values are "true" and "false")
HIDD_ENABLE=true
# Arguments to hidd
HIDD_OPTIONS=""
Now restart X (log out, hit CTRL-ALT-BACKSPACE. If this just stops X for you, hit CTRL-ALT-F2, log in as root and type "killall xdm && xdm"). Try moving your mouse around. It may take a second for X to notice it, but from then on it should work.
Tested mice:
- Trust MI-5300M Bluetooth Optical Mini Mouse
- Microsoft wireless bluetooth intellimouse
- Kensington PilotMouse Mini Bluetooth
| Home ↑ Top RSS |
Thanks for article, my mouse works now.
Unlikely, mouse stop to work after 15-40 minutes since system up.
Tested on laptop Toshiba Satellite M40 289,
ALT-linux (also Mandrake2006, ASP-11, Debian).
versions:
$uname -a
Linux *****.***.** 2.6.16.10 #2 PREEMPT Thu May 4 21:21:43 MSD 2006 i686 unknown unknown GNU/Linux
I tried it with other kernels (2.6.12, 2.6.14) with same results.
$modinfo bluetooth
filename: /lib/modules/2.6.16.10/kernel/net/bluetooth/bluetooth.ko
author: Maxim Krasnyansky
description: Bluetooth Core ver 2.8
version: 2.8
license: GPL
alias: net-pf-31
vermagic: 2.6.16.10 preempt PENTIUM4 gcc-3.4
depends:
srcversion: 33ACC2EE4F276D024C8AC67
Unfortunately I can't test with another bt-mouse. Wind0wsXP works perfectly with my mouse.
Have You any idea?
If you run or when it stops working, does it help?
Otherwise, I recommend asking at bluez-users.
I compiled all the bluetooth stuff into the kernel instead of loading modules. If you didn't you could try that.
with un/loading modules don't help me too.
Althogh, mouse works longer if bluetooth stuff compliled into the kernel :-)
Please, can You send the lsmod issue, bluetooth/usb settings in kernel-config and /etc/bluetooth/hcid.conf ?
ps: I have already send question to bluez-users, but for some reason, it isn't appears in mail-archive, so You are the single way to force my mouse start working correctly. Thanks!
Sorry, I can't see any referencies to config of kernel.
I have problem with network too: it disappears when i try download large file from net or stay in active connection long time. Problem was solved after setting "noapic" option as kernel loading parameter in lilo.conf. Obviously it is related with problem of mouse, because mouse works fine now.
Just now i reveal solution on this site :) Thanks!
convince my mouse to automaticaly connect while booting up the system.
The thing is following:
1. I can run mouse in X without problem after several scans with
"hcitool scan" command (it almost never find mouse for the first time)
and "hidd --connect xx:xx:xx:xx:xx:xx" command
2. I'd like to get a rid of this anoying routine everytime i start up my linux.
HCID.CONF
#
# HCI daemon configuration file.
#
# HCId options
options {
# Automatically initialize new devices
autoinit yes;
# Security Manager mode
# none - Security manager disabled
# auto - Use local PIN for incoming connections
# user - Always ask user for a PIN
#
security none;
# Pairing mode
# none - Pairing disabled
# multi - Allow pairing with already paired devices
# once - Pair once and deny successive attempts
pairing multi;
# PIN helper
pin_helper /usr/lib/kdebluetooth/kbluepin;
# D-Bus PIN helper
#dbus_pin_helper;
}
# Default settings for HCI devices
device {
# Local device name
# %d - device id
# %h - host name
name "%h-%d";
# Local device class
class 0x3e0100;
# Default packet type
#pkt_type DH1,DM1,HV1;
# Inquiry and Page scan
iscan enable; pscan enable;
# Default link mode
# none - no specific policy
# accept - always accept incoming connections
# master - become master on incoming connections,
# deny role switch on outgoing connections
lm accept;
# Default link policy
# none - no specific policy
# rswitch - allow role switch
# hold - allow hold mode
# sniff - allow sniff mode
# park - allow park mode
lp rswitch,hold,sniff,park;
# Authentication and Encryption (Security Mode 3)
auth disable;
#encrypt enable;
}
should i take care of some additional files like rfcomm.conf etc.?
I couldn't work out why my mouse wasn't working, even after ensuring it was connected via bluetooth.
Your article solved it :-)
Simon
Leave a comment: