Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Mar 2008 19:43:45 +0100 (BST)
From:      Iain Hibbert <plunky@rya-online.net>
To:        mato <gamato@users.sf.net>
Cc:        freebsd-bluetooth@freebsd.org
Subject:   Re: BT issues
Message-ID:  <1206902625.989759.1963.nullmailer@galant.ukfsn.org>
In-Reply-To: <47EF6AA5.60403@users.sf.net>
References:  <47DBE7A4.3060006@users.sf.net> <bb4a86c70803161729y51f376d0t8333c30713c646d6@mail.gmail.com> <47EF6AA5.60403@users.sf.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 30 Mar 2008, mato wrote:

> 2) What am I trying to do ?  Well, I set up internet sharing on my home laptop
> via BT and I can use it from my other laptop.  Now, it works when my other
> (work) laptop runs FreeBSD.  When I boot the other laptop in to Windows it
> asks me for PIN and then it works OK.  But when I boot in to FreeBSD again I
> cannot connect and I have to reinitialise as explained in my original email.
> So to me it seems connecting from Windows somehow changes stored key which is
> unusable for subsequent FreeBSD uses.

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.

There are some ways around this, in order of bestness:

- make no authentication necessary (ie no pairing) (dangerous)

- 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)

- 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)

- store the link key in the device, so that the OS does not need to know
  about it.

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)

regards,
iain



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