LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   connect bluetooth mouse automatically (https://www.linuxquestions.org/questions/linux-hardware-18/connect-bluetooth-mouse-automatically-333578/)

laurentwahl 06-14-2005 04:01 PM

connect bluetooth mouse automatically
 
Hello. I use Fedora Core 4. I have a logitech mx900 bluetooth mouse.
To make it work in fedora, either

I can start the Bluetooth Manager and press scan there, After waiting a lot, he finds the mouse. Then, I write /usr/bin/hidd –server in the terminal as root, and it works

or
I write /usr/bin/hidd --connect 00:07:61:0d:f6:1d as root and then I have to push the connect button on the mouse.

But it is annoying to do one of these procedures every time when I start my computer. Can’t I configure Fedora, that he does this automatically at every startup?

laurentwahl 06-17-2005 01:22 PM

In windows, he connects automaticaly the mouse, can't I configure this in Linux.

I coud perhaps add, that I don't use the bluetooth hub of the mouse, because I have already a bluetooth module in my laptop, which I use for the mouse.

am_microhead 06-22-2005 03:12 AM

You may want to try adding the device address in the /etc/bluetooth/rfcomm.conf file, and setting bind to yes. This does work on my workstation. However, on my dell laptop, I also need to toggle FN+F2, and then restart bluetooth service for it to work.

laurentwahl 06-22-2005 12:57 PM

this doesn't work

laurentwahl 06-27-2005 03:44 PM

Because I found nowhere a solution to my problem, I added now to my /etc/rc.d/rc.local file
Quote:

/usr/bin/hidd --connect 00:07:61:0d:f6:1d
. Now I have to push the connect button on my mouse when I start my computer and then it works.

But I would still be glad if some body could tell my the right method without pushing the connect button on the mouse, so that everything works automaticaly.

panic42 07-19-2005 07:47 AM

Hi,

The right way to do it is to do hidd --connect XX:XX:... once and
for all, to make mouse and pc recognise each other.

Then, make sure hidd --server is started at boot time
(typically added as
Code:

[ -e /etc/sysconfig/hidd ] && . /etc/sysconfig/hidd
 ...
 daemon /usr/bin/hidd $HIDDARGS

in /etc/init.d/bluetooth or /etc/init.d/hidd, where
/etc/sysconfig/hidd contains
Code:

HIDDARGS="--server"
).

When the hidd server is started succesfully, you should only need
to move your mouse, wait a few seconds, and then it should work.
Also, if you have not used it for some time, you need to reconnect
by moving and waiting.

If you have bluetooth in your PC, you don't need to connect the
cradle USB stuff at all---but simply use it for recharging the
batteries.

-- Arne

laurentwahl 07-22-2005 07:03 AM

my /etc/init.d/hidd file doesn't contain HIDDARGS="--server".
Here is my /etc/init.d/hidd file
Quote:

#!/bin/sh
#
# hidd: Bluetooth Human Interface Device Daemon.
#
# chkconfig: 2345 26 89
# description: Bluetooth Human Interface Device Daemon. Provides keyboard, \
# mouse etc. functionality over Bluetooth.
#

# Source function library.
. /etc/rc.d/init.d/functions

. /etc/sysconfig/network

[ ${NETWORKING} = "no" ] && exit 0

[ -r /etc/sysconfig/hidd ] || exit 0

. /etc/sysconfig/hidd

[ -z "$HIDDARGS" ] && exit 0

start()
{
echo -n $"Starting hidd: "
daemon /usr/bin/hidd $HIDDARGS

touch /var/lock/subsys/hidd
echo
}

stop()
{
echo -n $"Shutting down hidd: "
/usr/bin/hidd -K
killproc hidd

rm -f /var/lock/subsys/hidd
echo
}

[ -f /usr/bin/hidd ] || exit 0

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
condrestart)
[ -e /var/lock/subsys/hidd ] && (stop; start)
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|condrestart}"
exit 1
esac

exit 0
I tryed to add: [ -e /etc/sysconfig/hidd ] && . /etc/sysconfig/hidd and HIDDARGS="--server"
but this doesn't work

panic42 07-22-2005 07:14 AM

You don't say exactly how it doesn't work, so we are left
to guess... :D

Things to check:

* Are relevant kernel modules loaded, e.g. hci_usb?
modprobe hci_usb

* Is your hci device up and working?
hcitool dev

* Can your pc see your mouse?
hcitool scan

* Is your hidd server up?
hidd --server

Without more detailed debug info, it is hard to say
what exactly could be wrong.

-- Arne

laurentwahl 07-22-2005 07:23 AM

when I push the connect button on my mouse and then I write
Quote:

hidd --connect 00:07:61:0d:f6:1d
then it works.

I don't know how to control if my hidd server is up at startup, perhaps there is the problem

laurentwahl 07-22-2005 07:25 AM

with hidd --server
I don't have to push the connect button on my mouse, but I have to write hidd --connect 00:07:61:0d:f6:1d

panic42 07-22-2005 07:52 AM

The --connect or --search stuff should only be done once and for all.

On all subsequent starts of hidd, use --server and waggle
the mouse. You might have to wait several seconds before
the connection is made.

When debugging, you might find it handy to watch
/var/log/messages to see what's happening with various
daemons and events.

Perhaps you can also debug it by looking at the output of

lsmod | grep hci

hcitool dev

hcitool con

hcitool scan

ps -A | grep hidd

hidd --show

-- Arne

lmcilwain 07-22-2005 01:03 PM

I actually can't get my bluetooth mouse to work at all with my laptop running FC4. I did the following:

[root@Whistler ~]# hcitool scan
Scanning ...
00:50:F2:E2:A5:A2 n/a
[root@Whistler ~]# hidd server
[root@Whistler ~]# hidd connect 00:50:F2:E2:A5:A2
I tap my button at the bottom

I was still not able to get my mouse working. I also tried doing this in the bluetooth manager and it discovers my mouse but I can't double click no it or right click on it or get to the poperties of it to try and connect it.

My messages log states the following when trying this:
Jul 22 13:53:41 Whistler pam_timestamp_check: pam_timestamp: `/' owner UID != 0
Jul 22 13:54:16 Whistler last message repeated 7 times
Jul 22 13:54:21 Whistler pam_timestamp_check: pam_timestamp: `/' owner UID != 0
Jul 22 13:54:23 Whistler kernel: Bluetooth: HIDP (Human Interface Emulation) ver 1.1
Jul 22 13:54:26 Whistler pam_timestamp_check: pam_timestamp: `/' owner UID != 0
Jul 22 13:55:01 Whistler last message repeated 7 times

lsmod shows:
bluetooth 56133 8 hidp,rfcomm,l2cap,hci_usb

hcitool dev shows:
Devices:
hci0 00:10:C6:62:AD:10

hcitool con shows:
Connections:

hctool scan shows:
Scanning ...
00:50:F2:E2:A5:A2 Microsoft Mouse

hidd --show doesn't show anything at all.

panic42 07-22-2005 10:53 PM

Quote:

Originally posted by lmcilwain
I actually can't get my bluetooth mouse to work at all with my laptop running FC4. I did the following:

[root@Whistler ~]# hcitool scan
Scanning ...
00:50:F2:E2:A5:A2 n/a
[root@Whistler ~]# hidd server
[root@Whistler ~]# hidd connect 00:50:F2:E2:A5:A2
I tap my button at the bottom

...now, I wonder what this last line means... :p

Anyway, my manual page for hidd says that you must precede switches
with two dashes. I suggest you try this:

1 hidd --search
(or hidd --connect 00:50:F2:E2:A5:A2)

2 Press the connect button on the mouse

3 hidd --show
to see whether the connection has been made

-- Arne

laurentwahl 07-23-2005 11:37 AM

My laptop still doesn't connect at startup.
my kernel modules are loaded:
Quote:

lsmod|grep hci
hci_usb 18761 2
bluetooth 56133 8 hidp,rfcomm,l2cap,hci_usb
uhci_hcd 35152 0
ehci_hcd 41037 0
My hci device is working:
Quote:

hcitool dev
Devices:
hci0 00:20:E0:7A:B0:8F
with: hcitool scan, he writes:
Quote:

Scanning ...
with: hidd --server he writes nothing.

After I push the connect button and type hidd --connect 00:07:61:0d:f6:1d, my mouse works. Then he writes as connection:
Quote:

hcitool con
Connections:
< ACL 00:07:61:0D:F6:1D handle 41 state 1 lm MASTER
When I start my computer and move my mouse, the little bluetooth light on my IBM laptop is blinking, but the cursor doesn't move. So he sees that there is a bluetooth device, but he doesn't connect to him automaticaly.

panic42 07-24-2005 12:36 AM

Quote:

Originally posted by laurentwahl
My laptop still doesn't connect at startup.

Does this mean that you are only having problems at startup?
I.e., when up and running, you can manually start hidd, waggle
your mouse to make the connection without hidd --connect or
hidd --search?

Quote:

with: hidd --server he writes nothing.

This is as it should be, but is hidd running? Try ps -A | grep hidd

Another useful command is hidd --show, but I guess it won't
show any connections in this case. And, of course, your
system log is a sensible place to look for debugging clues.

Quote:

After I push the connect button and type hidd --connect 00:07:61:0d:f6:1d, ...

Now that you have run hidd --connect once, you should not need to do
it ever again; hidd and your mouse should automatically connect when you
waggle your mouse.

-- Arne


All times are GMT -5. The time now is 04:58 PM.