Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
By NoUse4ANick at 2006-04-03 21:56
Everyone that has bluetooth on their laptop knows how hard it is to pair their mouse with their distro. They probably have read multiple howto's on the subject with little or no success. Well in this 'how to' I'm going to show you how I got my laptop to talk to a non-Microsoft/Logitech bluetooth mouse.
I am personally running Gentoo, so the actual unpacking/installing of each file will be left up to the user and their distro. I would highly recommend that IF you are doing a fresh install of a distro that you tell it to include bluetooth support (go through it and select EVERY option for bluetooth). If you are doing a patch, then go into your .config file and edit the 'BT' section then recompile your kernal, I'll just go over here and wait while you do that.....
Done? Ok, if your using gentoo emerge the bluez libs and utils (you might need some of the other packages depending on your hardware and window manager), or go to http://www.bluez.org/download.html to get the packages & install them.
Ok, now your bluetooth should kinda work, you should be able to (after you get the stuff running) run hidd --search to see bluetooth devices that are in discover mode (note: you MUST put your mouse in this mode otherwise your computer won't see it!). For more info on how to get your hcid and hidd demons running google it or search the forums.
Now for the part that was REALLY tripping me up for the longest of time: the hcid.conf file!
This file should be in your /etc/bluetooth directory, open it up in your favorite editor (you might have to change permissions on it or open it as the root) and configure it to something simmilar to this:
Code:
#
# HCI daemon configuration file.
#
# $Id: hcid.conf,v 1.4 2004/04/29 20:14:21 holtmann Exp $
#
# 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 user;
#security auto;
# 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/bin/bluepin;
#pin_helper /etc/bluetooth/cbpinscript;
pin_helper /usr/lib/kdebluetooth/kbluepin;
# D-Bus PIN helper
#dbus_pin_helper;
}
# Default settings for HCI devices
device {
# Local device name - change to whatever you want
# %d - device id
# %h - host name
name "laptopcb (%d)";
# Local device class (orig)
# class 0x100;
# Local device class (modified from kde-bluetooth)
# might want to leave this to whatever it was set to orginally
class 0x100100;
# 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
# this is the key section!
auth disable;
#encrypt enable;
}
At this point restart hcid/hidd (or restart your computer), once your computer is back up and running turn on your mouse and see if your computer picks it up!
If anyone finds more links about bluetooth mice, please put them here in a comment so others can hopefully find either a better solution, a better step-by-step walkthough, or something for their distro/hardware that I didn't cover, and below are a couple of links that I used in this article:
Connect a Logitech MX900 bt mouse: http://www.bueche.ch/comp/mx900/mx900.html
Gentoo wiki info on bt: http://gentoo-wiki.com/HARDWARE_Gentoo_on_Dell_Inspiron_8600#Bluetooth
copyright: 2006 Art Miller, do with this as you please, if you are going to copy this please at least link back to it, thanks!
I'd rather have authorization and encryption on, also with mouse and especially with a bluetooth keyboard.
The changes I need to make to the instructions of the article above, in hcid.conf file are these:
security auto;
# instead of user
lm accept,master;
# instead of just accept
auth enable;
encrypt enable;
Connecting the mouse works first time by pressing the "pairing button" on the mouse (in the bottom of my Epox mouse) and right after that on the host:
# hidd --search
...it should find the mouse HW bluetooth address and will ask a PIN code in a dialog window (the PIN code for my EPoX Bluetooth mouse is "1234")
Latter times the mouse will autoreconnect after the sleep mode just by clicking the left or the right mouse button.
After that, the connection looks something like this:
$ hcitool con
Connections:
< ACL 00:04:61:XX:XX:XX handle 40 state 1 lm MASTER AUTH ENCRYPT
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
Bluetooth on a Dell 600m laptop
The changes I need to make to the instructions of the article above, in hcid.conf file are these:
security auto;
# instead of user
lm accept,master;
# instead of just accept
auth enable;
encrypt enable;
Connecting the mouse works first time by pressing the "pairing button" on the mouse (in the bottom of my Epox mouse) and right after that on the host:
# hidd --search
...it should find the mouse HW bluetooth address and will ask a PIN code in a dialog window (the PIN code for my EPoX Bluetooth mouse is "1234")
Latter times the mouse will autoreconnect after the sleep mode just by clicking the left or the right mouse button.
After that, the connection looks something like this:
$ hcitool con
Connections:
< ACL 00:04:61:XX:XX:XX handle 40 state 1 lm MASTER AUTH ENCRYPT