2005-03-03 23:48:08

by Joe Emenaker

[permalink] [raw]
Subject: [Bluez-users] Automatically accepting pairing from a mouse?

Please forgive the newbie question... I'm still a little new to how
bluetooth devices interact.

I've got bluez-utils running on my debian laptop and I can use it to
find my bluetooth mouse.
I can run "hcitool scan" and, provided that I've clicked the little
"pairing" button on my mouse, the scan finds it.
Then, I can run "hidd --connect aa:bb:cc:dd:ee:ff" (not the actual hw
address I use) and it connects!

However, I'd like to avoid having to open a konsole window and do this
pairing every time I boot my laptop. Furthermore, the mouse I have likes
to go to sleep after about 5-10 minutes of inactivity... at which point
it requires pairing again.

It would be nice if I could just click the pairing button on my mouse
and have the rest happen automatically.

In an attempt to do this, I've changed my "HIDD_OPTIONS=--master
--server" to "HIDD_OPTIONS=-i aa:bb:cc:dd:ee:ff --server", but this
doesn't seem to have done anything.

So now, I'm kinda stuck. I guess I'm looking for a bluetooth equivalent
to "waproamd" for WiFi, where it periodically scans for available
devices and connects to them if it has a configuration for it.

Is there anything in bluez-utils that does auto-scan-and-connect like that?

If not, what's the alternative? Do I have to find a mouse that can
scan-and-connect from *it's* end?

Lastly, does anyone have any suggestions for a better mouse? My current
one is pretty nifty, though. It has an on/off switch so that I can save
batteries when the laptop is packed away. And it's a mini-style. But the
timeout-sleep thing is just killing me....

- Joe


Attachments:
smime.p7s (3.12 kB)
S/MIME Cryptographic Signature

2005-03-07 19:01:53

by Joe Emenaker

[permalink] [raw]
Subject: Re: [Bluez-users] Automatically accepting pairing from a mouse?

Marcel Holtmann wrote:

>it is enought to edit /etc/default/bluez-utils to contain
>
> HIDD_ENABLED=1
> HIDD_OPTIONS="--server"
>
>and then restart the Bluetooth subsystem. The next time your mouse will
>reconnect and this will be handled by the running hidd.
>
>
I was so certain that this wasn't going to work that I was getting ready
to step through the process and capture output from "hcitool" etc. to
show you that it wasn't working when.... uh.... it worked. :)

Strangely, I had HIDD_ENABLED=1, and HIDD_OPTIONS="-i 00:0E:A1:01:FD:A7
--server"

What was the "-i" option doing which made it not work?

- Joe


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-03-04 10:45:58

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Automatically accepting pairing from a mouse?

Hi Joe,

> Please forgive the newbie question... I'm still a little new to how
> bluetooth devices interact.
>
> I've got bluez-utils running on my debian laptop and I can use it to
> find my bluetooth mouse.
> I can run "hcitool scan" and, provided that I've clicked the little
> "pairing" button on my mouse, the scan finds it.
> Then, I can run "hidd --connect aa:bb:cc:dd:ee:ff" (not the actual hw
> address I use) and it connects!
>
> However, I'd like to avoid having to open a konsole window and do this
> pairing every time I boot my laptop. Furthermore, the mouse I have likes
> to go to sleep after about 5-10 minutes of inactivity... at which point
> it requires pairing again.
>
> It would be nice if I could just click the pairing button on my mouse
> and have the rest happen automatically.
>
> In an attempt to do this, I've changed my "HIDD_OPTIONS=--master
> --server" to "HIDD_OPTIONS=-i aa:bb:cc:dd:ee:ff --server", but this
> doesn't seem to have done anything.

it is enought to edit /etc/default/bluez-utils to contain

HIDD_ENABLED=1
HIDD_OPTIONS="--server"

and then restart the Bluetooth subsystem. The next time your mouse will
reconnect and this will be handled by the running hidd.

> Lastly, does anyone have any suggestions for a better mouse? My current
> one is pretty nifty, though. It has an on/off switch so that I can save
> batteries when the laptop is packed away. And it's a mini-style. But the
> timeout-sleep thing is just killing me....

Run the hidd and the timeout thing is no longer a problem.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2005-03-04 02:47:22

by Marco Trudel

[permalink] [raw]
Subject: Re: [Bluez-users] Automatically accepting pairing from a mouse?

Hello Joe

My suggestion for this is to write a little bash-script or something like
that (but there might be a better solution). something like:

while [ 1 -eq 1 ] # endless loop
do
# if mouse not connected, connect to it
if [ `hcitool con | grep aa:bb:cc:dd:ee:ff | wc -l` -eq 0 ]
then
hidd --connect aa:bb:cc:dd:ee:ff
fi

sleep 10 # wait 10s before checking again
done


regards
Marco

Joe Emenaker wrote:
> Please forgive the newbie question... I'm still a little new to how
> bluetooth devices interact.
>
> I've got bluez-utils running on my debian laptop and I can use it to
> find my bluetooth mouse.
> I can run "hcitool scan" and, provided that I've clicked the little
> "pairing" button on my mouse, the scan finds it.
> Then, I can run "hidd --connect aa:bb:cc:dd:ee:ff" (not the actual hw
> address I use) and it connects!
>
> However, I'd like to avoid having to open a konsole window and do this
> pairing every time I boot my laptop. Furthermore, the mouse I have likes
> to go to sleep after about 5-10 minutes of inactivity... at which point
> it requires pairing again.
>
> It would be nice if I could just click the pairing button on my mouse
> and have the rest happen automatically.
>
> In an attempt to do this, I've changed my "HIDD_OPTIONS=--master
> --server" to "HIDD_OPTIONS=-i aa:bb:cc:dd:ee:ff --server", but this
> doesn't seem to have done anything.
>
> So now, I'm kinda stuck. I guess I'm looking for a bluetooth equivalent
> to "waproamd" for WiFi, where it periodically scans for available
> devices and connects to them if it has a configuration for it.
>
> Is there anything in bluez-utils that does auto-scan-and-connect like that?
>
> If not, what's the alternative? Do I have to find a mouse that can
> scan-and-connect from *it's* end?
>
> Lastly, does anyone have any suggestions for a better mouse? My current
> one is pretty nifty, though. It has an on/off switch so that I can save
> batteries when the laptop is packed away. And it's a mini-style. But the
> timeout-sleep thing is just killing me....
>
> - Joe


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users