Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Mar 2008 16:16:29 -0800
From:      "Maksim Yevmenkin" <maksim.yevmenkin@gmail.com>
To:        mato <gamato@users.sf.net>
Cc:        freebsd-bluetooth@freebsd.org
Subject:   Re: BT issues
Message-ID:  <bb4a86c70803311716k7e0b4b9es1608a10234c0d88e@mail.gmail.com>
In-Reply-To: <47F1395D.5090003@users.sf.net>
References:  <47DBE7A4.3060006@users.sf.net> <bb4a86c70803161729y51f376d0t8333c30713c646d6@mail.gmail.com> <47EF6AA5.60403@users.sf.net> <1206902625.989759.1963.nullmailer@galant.ukfsn.org> <47F1395D.5090003@users.sf.net>

next in thread | previous in thread | raw e-mail | index | archive | help
[...]

> > the pairing is between the Bluetooth controllers (the actual dongle) but
> > the Link Key is generally held in the OS so dual booting can be
> > troublesome. In FreeBSD it is stored and supplied by hcsecd and you can
> > edit it, but naturally Windows does not know about that so it makes a new
> > link key and then FreeBSD does not know what it is.
>
>  Yeah, and imho that's quite useful feature of Windows in this case -- it
> first tries its stored link key and if it doesn't work it'll ask for PIN and
> will generate a new link key.

hcsecd on freebsd does exactly the same

>  Even if FreeBSD has no facility or desire to interactively ask for PIN, I
> can imagine it could at least try and regenerate link key from PIN which
> would help in this case.

it does that

> > - set the PIN to be a fixed PIN so that a new link key will be generated
> >  each time (I don't know if Windows can do this either) (its not a great
> >  solution)
>
>  I'm not aware of this possibility.  How can I make FreeBSD regenerate link
> key each time ?
>  It's not an issue with Windows as it asks for PIN when pairing fails.

like i said, the rules are - use link if present, the use pin code if present.

> > - hack into Windows and find the link key, store this in your hcsecd file
> >  and all should be well. (I think there is a way to do this with Windows
> >  but I didn't find it)
>
>  I've no idea how to do this.  And it wouldn't help in the following
> scenario -- I've got a guest who would like to connect to the internet via
> my BT sharing and once doing it she would make my FreeBSD regenerate the
> link key and I'm in the same situation as now (except that I cannot possibly
> hack link keys in Windows of my visitors).

it is perfectly fine with visitor, unless visitor does not dual boot,
or unless you share your bluetooth dongle between multiple computers.
the only way around this is to share the keys between oses/computers,
or program link keys directly into the device itself. see
read/write_stored_link_key commands in hccontrol.

> > - store the link key in the device, so that the OS does not need to know
> >  about it.
>
>  I've no idea how to do it and if it is possible at all.

read above, i.e. read/write_stored_link_key commands in hccontrol.

> > I wrote a program that does this last for NetBSD called btkey(1) -
> > although it will not work directly on FreeBSD (the config file we use is
> > different) it should not be difficult to port it, at least enough to store
> > a link key into the device.
> >
> > (see cvsweb.netbsd.org .. src/usr.bin/btkey)

hccontrol was able to do this on freebsd since day 1

thanks,
max



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bb4a86c70803311716k7e0b4b9es1608a10234c0d88e>