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

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Iain,

Iain Hibbert wrote:
> 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.
>
>   

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

> There are some ways around this, in order of bestness:
>
> - make no authentication necessary (ie no pairing) (dangerous)
>
>   

No.

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

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

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

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

Cheers,

Martin



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