2004-09-17 20:26:51

by [email protected]

[permalink] [raw]
Subject: [Bluez-users] Epox BT-MS02B Bluetooth HID mouse, authorization and encryption?

Thanks (marcel) for the page:
[URI1] < http://www.holtmann.org/linux/bluetooth/hid.html >

That gave me courage to buy and try EPoX BT-MS02B mouse. Have to decide
in 14 days if I will keep this.

I got it working, but few things (3) I'd need to find out still. hidd
program seems to be so new, there is no yet any documentation with it.
Maybe later there will FAQ for Linux HID.

I used to have authorization and encryption on in
/etc/bluetooth/hcid.conf before, but I noticed "hidd --search"
wanted a PIN then for outgoing connection. I have no idea what would be the
Bluetooth PIN-code for my mouse, neither was it mentioned anywhere in the
package or in the Windows-documentation which came with the mouse.

I'd still like to have authorization and encryption on, because I have also
Bluetooth OBEX-server on the machine and someone could now easily without
authorization write to my home directory. (gnome-obex-server)

1)
How one turns encryption off just for HID devices, preferrably only for
this one mouse,...or should I somehow be able to get the PID-code for
my mouse from somewhere? Is the VID:PID column in the table of the first URI
meant for that PID-code information?

2) After 11 minutes
(I assume from [URI2] <http://www.holtmann.org/linux/bluetooth/epox.html>)
the mouse has disconnected and went to the sleep mode. Is there some
way to reconnect it automaticly? Now I seem to need to push the mysterous
grey button on the bottom of the mouse always, and do `hidd --search` again
to get it reconnected.

[This 2. one I seem to have solved by upgrading to bluez-utils-2.10, now
hidd --server does accept reconnection after the power saving sleep, but
only if auth+encryption is disabled.]

I need to ask EPoX technical support what exactly is
the little grey button on the bottom of the mouse for. Or would you know?

I don't quite understand what hidd --server is for, [can guess now]
as again, there was no documentation, at least in the rpm packages
(bluez-utils-2.8*rpm) I also looked the newest bluez-utils-2.10 for
hidd documentation, no luck. Is it suppose to accept and re-attach connection
from the HID device which comes out of idle-state?

3)
What is the column "AFH" in the table of the first URI?
(and VID:PID ?)

Other info about the system:
OS Fedora Core 2, Kernel 2.6.8, bluez-libs-2.8, bluez-utils-2.8

# hciconfig -a
hci0: Type: USB
BD Address: 00:04:61:80:5D:88 ACL MTU: 192:8 SCO MTU: 64:8
UP RUNNING PSCAN ISCAN
RX bytes:1021048 acl:69685 sco:0 events:5583 errors:0
TX bytes:17089 acl:124 sco:0 commands:48 errors:0
Features: 0xff 0xff 0x0b 0x00 0x00 0x00 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'BlueZ (0)'
Class: 0x000100
Service Classes: Unspecified
Device Class: Computer, Uncategorized
HCI Ver: 1.1 (0x1) HCI Rev: 0x110 LMP Ver: 1.1 (0x1) LMP Subver: 0x110
Manufacturer: Cambridge Silicon Radio (10)

# hidd --show
00:04:61:82:00:88 HID Boot Device [0000:0000] connected [boot-protocol]

# hcitool info 00:04:61:82:00:88
Requesting information ...
BD Address: 00:04:61:82:00:88
Device Name: Bluetooth-Mouse 82007B
LMP Version: 1.1 (0x1) LMP Subversion: 0x356
Manufacturer: Cambridge Silicon Radio (10)
Features: 0xff 0xff 0x0b 0x00 0x00 0x00 0x00 0x00
<3-slot packets> <5-slot packets> <encryption> <slot offset>
<timing accuracy> <role switch> <hold mode> <sniff mode>
<park state> <RSSI> <channel quality> <SCO link> <HV2 packets>
<HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme>
<transparent SCO>



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2004-09-19 14:18:50

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Epox BT-MS02B Bluetooth HID mouse, authorization and encryption?

Hi Jouni,

> I did try 0000, 1234, 1111 and 9999 then but none of them seem to work.
>
> The trick is (or this time I was just lucky) the little grey button
> on the bottom of the mouse has to be pressed down whole time when
> "hidd --search" is run on the Linux side. Only after the PIN code had
> been entered and the hidd --search has succesfully connected to the mouse,
> so BT pairing has been finished, the button can be released.
>
> Maybe EPoX technical support can correct me or confirm me, when/if they
> reply after the weekend or some day to my request mail. I found it
> little odd the EPoX Bluetooth Mouse User's Guide, which came with the
> mouse, does not mention anything how the BT pairing should be done.
>
> It would make sense though. When authorization is negotiated, the
> software on the mouse end of the peer checks if it accepts the PIN code
> which is send by the host computer. The host computer must be the
> initiating party. If the grey button is then in that moment pressed down,
> authorization is accepted (would think any code would do), if not,
> the PIN confirmation request is rejected.

actually I tested it with my EPoX and I only had to press the grey
button once and use 1234 as pin code when I am in security mode 3. This
works for, but maybe you have to use virtual cable unplug first when
have bound it previously. In general the grey button should work as
virtual cable unplug, but sometimes when you presses it the mouse is in
progress with reconnect and that can cause some trouble in the lower
layers of the Bluetooth chip.

So for CSR mice the default pin code is 1234 and for Broadcom based mice
it is 0000. I need to put that on my webpage ;)

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-09-19 12:44:31

by [email protected]

[permalink] [raw]
Subject: Re: [Bluez-users] Epox BT-MS02B Bluetooth HID mouse, authorization and encryption?

On Sun, Sep 19, 2004 at 08:52:26AM +0100, Paul Hedderly wrote:
> I think you'll find your mouse is the same as mine - try "1234".

Thanks!

I did try 0000, 1234, 1111 and 9999 then but none of them seem to work.

The trick is (or this time I was just lucky) the little grey button
on the bottom of the mouse has to be pressed down whole time when
"hidd --search" is run on the Linux side. Only after the PIN code had
been entered and the hidd --search has succesfully connected to the mouse,
so BT pairing has been finished, the button can be released.

Maybe EPoX technical support can correct me or confirm me, when/if they
reply after the weekend or some day to my request mail. I found it
little odd the EPoX Bluetooth Mouse User's Guide, which came with the
mouse, does not mention anything how the BT pairing should be done.

It would make sense though. When authorization is negotiated, the
software on the mouse end of the peer checks if it accepts the PIN code
which is send by the host computer. The host computer must be the
initiating party. If the grey button is then in that moment pressed down,
authorization is accepted (would think any code would do), if not,
the PIN confirmation request is rejected.

It works now authorized and encrypted. Also recovers after the sleep
mode.

// jouni



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-09-19 07:52:26

by Paul Hedderly

[permalink] [raw]
Subject: Re: [Bluez-users] Epox BT-MS02B Bluetooth HID mouse, authorization and encryption?

On Fri, Sep 17, 2004 at 11:26:51PM +0300, [email protected] wrote:
>
> I used to have authorization and encryption on in
> /etc/bluetooth/hcid.conf before, but I noticed "hidd --search"
> wanted a PIN then for outgoing connection. I have no idea what would be the
> Bluetooth PIN-code for my mouse, neither was it mentioned anywhere in the
> package or in the Windows-documentation which came with the mouse.

I think you'll find your mouse is the same as mine - try "1234".

--
Paul


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-09-18 17:20:56

by [email protected]

[permalink] [raw]
Subject: Re: [Bluez-users] Epox BT-MS02B Bluetooth HID mouse, authorization and encryption?

On Fri, Sep 17, 2004 at 11:28:39PM +0200, Marcel Holtmann wrote:
> > I got it working, but few things (3) I'd need to find out still. hidd
> > program seems to be so new, there is no yet any documentation with it.
> > Maybe later there will FAQ for Linux HID.
>
> the hidd manpage is still missing. May you wanna write it for me?

Maybe when/if I'll understand this BT stuff fully. I've sometimes tried
to draw a ISO/OSI preference model presentation of Bluetooth stack, but
it is messy, I think, this far at least.

> Don't set auth and encrypt in hcid.conf. This puts your device in
> security mode 3 and you don't wanna do this. So mailing list archive for
> more details.

Actually I was pretty happy to keep my device (BT dongle) in security
mode 3 this far, before starting to use this HID mouse. Now when I had to turn
authorization and encryption off, anyone could download one of ogg/mp3
files from my computer with Bemused, not that I wouldn't share, and also
write to my home directory through gnome-obex-server (Cool .bashrc anyone?)

> This is a problem of the OBEX-server. Ask the author to implement proper
> support for it.

And Bemused, and ... quite many BT applications rely just on the lower lever
security, althoug it is known to be vulnerable.

> See above and read the Bluetooth specification to understand the
> differences between device and service security.

Ok, have to do that. Any good URI which would explain it like "for
Dummies"?
I just wonder, if service security will work with
mobile phones then. I mean, is it possible to make obex-server such that
mobile phone's OBEX software when sending some object understands the
server needs additional password. Or maybe it works like obex-server
would ask the lower HCI level to authenticate and encrypt after the
initial connection. Well, have to study that.

> You only have to press a mouse button and what for the reconnect of the
> mouse. To make this working you need to start hidd --server as root at
> boot time.

Yep, that worked and works now. (Just have to keep that security level
down)

// jouni



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2004-09-17 21:28:39

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Epox BT-MS02B Bluetooth HID mouse, authorization and encryption?

Hi Jouni,

> I got it working, but few things (3) I'd need to find out still. hidd
> program seems to be so new, there is no yet any documentation with it.
> Maybe later there will FAQ for Linux HID.

the hidd manpage is still missing. May you wanna write it for me?

> I used to have authorization and encryption on in
> /etc/bluetooth/hcid.conf before, but I noticed "hidd --search"
> wanted a PIN then for outgoing connection. I have no idea what would be the
> Bluetooth PIN-code for my mouse, neither was it mentioned anywhere in the
> package or in the Windows-documentation which came with the mouse.

Don't set auth and encrypt in hcid.conf. This puts your device in
security mode 3 and you don't wanna do this. So mailing list archive for
more details.

> I'd still like to have authorization and encryption on, because I have also
> Bluetooth OBEX-server on the machine and someone could now easily without
> authorization write to my home directory. (gnome-obex-server)

This is a problem of the OBEX-server. Ask the author to implement proper
support for it.

> 1)
> How one turns encryption off just for HID devices, preferrably only for
> this one mouse,...or should I somehow be able to get the PID-code for
> my mouse from somewhere? Is the VID:PID column in the table of the first URI
> meant for that PID-code information?

See above and read the Bluetooth specification to understand the
differences between device and service security.

> 2) After 11 minutes
> (I assume from [URI2] <http://www.holtmann.org/linux/bluetooth/epox.html>)
> the mouse has disconnected and went to the sleep mode. Is there some
> way to reconnect it automaticly? Now I seem to need to push the mysterous
> grey button on the bottom of the mouse always, and do `hidd --search` again
> to get it reconnected.

You only have to press a mouse button and what for the reconnect of the
mouse. To make this working you need to start hidd --server as root at
boot time.

> [This 2. one I seem to have solved by upgrading to bluez-utils-2.10, now
> hidd --server does accept reconnection after the power saving sleep, but
> only if auth+encryption is disabled.]

See above.

> I need to ask EPoX technical support what exactly is
> the little grey button on the bottom of the mouse for. Or would you know?

You need to press it if you wanna pair your device again. Speaking in
terms of the HID profile it means virtual cable unplug.

> I don't quite understand what hidd --server is for, [can guess now]
> as again, there was no documentation, at least in the rpm packages
> (bluez-utils-2.8*rpm) I also looked the newest bluez-utils-2.10 for
> hidd documentation, no luck. Is it suppose to accept and re-attach connection
> from the HID device which comes out of idle-state?

Correct. You need it for the reconnect.

> 3)
> What is the column "AFH" in the table of the first URI?
> (and VID:PID ?)

AFH = Adaptive Frequence Hopping (a Bluetooth 1.2 feature).
VID = Vendor ID
PID = Product ID

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users