Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Apr 2009 14:37:00 -0800
From:      Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
To:        Bruce Simpson <bms@incunabulum.net>
Cc:        "freebsd-bluetooth@freebsd.org" <freebsd-bluetooth@freebsd.org>, "alexei@raylab.com" <alexei@raylab.com>
Subject:   Re: libhci update
Message-ID:  <bb4a86c70904091537x1c6ec085r877d847268b38d3e@mail.gmail.com>
In-Reply-To: <49DE6D42.6000004@incunabulum.net>
References:  <49D92E26.2030508@incunabulum.net> <bb4a86c70904061358l3983ed51m11265859a833f202@mail.gmail.com> <49DD40E2.5030403@incunabulum.net> <1239264003.862926.638.nullmailer@galant.ukfsn.org> <bb4a86c70904091013l2d7c2b77ic7f6988e6e7709f2@mail.gmail.com> <49DE4E2F.2000805@incunabulum.net> <bb4a86c70904091337x7061ab5uf57bbaff1d5f3197@mail.gmail.com> <49DE6D42.6000004@incunabulum.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--001636164aa7ee85e0046726e214
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On Thu, Apr 9, 2009 at 1:48 PM, Bruce Simpson <bms@incunabulum.net> wrote:

[...]

>>> I would hope to do the same for libsdp.
>>
>> well, here is where things might get a bit tricky because of sdpd(8).
>> depending on what you want to do, you might need to bring both libsdp
>> and sdpd (or whatever it is called these days) from bluez.
>
> Yup, that's pretty scary because there are significant differences.
>
> If you look at all the APIs, they all end up building on-the-wire-records to
> advertise Bluetooth
> services via SDP -- be that L2CAP PSM's, RFCOMM channels, or anything else.

oh, no :) please do not open this can of worms :) Iain knows its a
very touchy subject with me :) i dislike *intensely* the fact that sdp
records have to be built in on-the-wire format. i just dont get why
any application has to know about uuid's, sequences and other low
level sdp stuff just to register the damn service. that is why i went
an extreme route (a bit too extreme perhaps :) and introduced
"pre-cooked" sdp records that are constructed on the fly. application
only transfers minimum information required to register the service.
the downside, of course, is that its not very flexible. in fact, its
pretty damn rigid. which means that if you want to introduce new
profile, you have to change sdp parts as well.

Iain and i beat this horse to death, imo. we think there is really no
good way around this and we can only improve api to be more user
friendly and require less typing, but the records, unfortunately,
would have to be in on-the-wire format (or something pretty damn close
to it).

> it is irksome that the SDP APIs between OSes differ so radically.
>
> So I'd make a radical suggestion here: can we change the existing BSD-space
> applications
> and daemons to use a different name e.g. libbtsdp for the base system?

yes, we can. i was actually thinking to merge add the sdp stuff into
libbluetooth. and while i'm at it, move bluetooth.h and sdp.h into
include/bluetooth/ where it belongs. i just want to get hci stuff out
the way first.

> That would be a big help for BlueZ compatibility... yes, it sucks, but it's
> a hackish fix to the
> namespace collision between these two radically different sets of libraries.

if we fix our sdp first to be more like bluez (i.e. use on-the-wire
format) then we can add compat bluez sdp library that would simply
translate bluez call to bsd calls. same route as with libhci.

[....]

>> i will try to clean up my patches and send them out one more time. i'd
>> like to get Iain's comments before putting them into the base. mfc can
>> be done quickly as well (if needed).
>
> OK. That would be great. I can look at such diffs too if need be. :-)
> I don't believe an MFC will be too difficult as long as we're in the 7.2
> slush.

thanks! i have attached the latest diff. its pretty much the same as
previous one, except i added documentation.

> [ioctls]
>>
>> let me know what is missing and i will add it :)
>
> What's the easiest way to get the unit number?
> ...

hci nodes do not really have unit numbers. they have names. hci nodes
are named as "device+unit+hci". device + unit comes from driver for a
particular device. in 99% of the cases it will be "ubtX", i.e. usb
dongle, but we also support h4 devices (currently broken due to new
tty) and btccc - 3com pccard.

so just enumerate all the radios (i.e. list all the hci nodes - there
is an ioctl for that) and unit will be the number before "hci" part of
the name. however, that will only work if if have devices of the same
type in the system (i.e. all the radios are bluetooth dongles).
otherwise, if, say, you have 3com pccard and bluetooth dongle, then
you will have btccc0hci and ubt0hci nodes both having 0 unit number.

>>  that is the thing. bd_addr is the only "unique" (it can't be easily
>> changed, but it still can be done) thing about bluetooth device. but
>> in order to get it, you need to address the device somehow. devname is
>> better, but still does not solve the problem as you pointed out it can
>> change.
>
> It would be nice to have a 'device name' registry or be able to
> renumber/rename the Bluetooth
> dongles in a manner similar to that of what folk end up doing for FreeBSD
> using ifconfig(8).

i'm not quite follow why is that needed?

[....]

>> why do you care so much about devid? i assume whatever it is you are
>> building, it will have multiple radios, right? are you planning to
>> setup different radios in different way?
>
> Because... (bad English ;o))
> yes we do want to use multiple radios -- inquiry is an expensive operation
> -- and also,
> BlueCove/JSR-82, PyBlueZ and the other high level language stuff currently
> wants to use
> dev_id as the unique endpoint identifier. :-(
>
> They do provide APIs to lookup dev_id from the MAC address, but if that is
> used as-is,
> any port would still have to maintain the kludge. It is irritating, but that
> is what has unfolded.

just a stupid idea - "hash" devname into devid? where "hash" does not
necessarily means use some real hash function :) could be partitioning
function (as in my previously posted code).

how wide is devid, you mentioned that it could be as narrow as unit16
and as wide as int? is that correct?

thanks,
max

--001636164aa7ee85e0046726e214
Content-Type: text/plain; charset=US-ASCII; name="bluetooth.hci.diff.txt"
Content-Disposition: attachment; filename="bluetooth.hci.diff.txt"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ftc01ckq0

SW5kZXg6IGhjaS5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGhjaS5jCShyZXZpc2lvbiAxOTA4NzApCisrKyBo
Y2kuYwkod29ya2luZyBjb3B5KQpAQCAtMzAsMTUgKzMwLDQyMSBAQAogICogJEZyZWVCU0QkCiAg
Ki8KIAorI2luY2x1ZGUgPGFzc2VydC5oPgogI2luY2x1ZGUgPGJsdWV0b290aC5oPgogI2luY2x1
ZGUgPHN0ZGlvLmg+CiAjaW5jbHVkZSA8c3RkbGliLmg+CiAjaW5jbHVkZSA8c3RyaW5nLmg+CiAj
aW5jbHVkZSA8dW5pc3RkLmg+CiAKK3N0YXRpYyBpbnQgICAgYnRfZGV2YW55X2NiKGludCBzLCBz
dHJ1Y3QgYnRfZGV2aW5mbyBjb25zdCAqZGksIHZvaWQgKnhkZXZuYW1lKTsKIHN0YXRpYyB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j
Yl90ICpjYiwgdm9pZCAqYXJnKTsKIApJbmRleDogTWFrZWZpbGUKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gTWFr
ZWZpbGUJKHJldmlzaW9uIDE5MDg3MCkKKysrIE1ha2VmaWxlCSh3b3JraW5nIGNvcHkpCkBAIC0z
Myw2ICszMywxMyBAQAogTUxJTktTKz0JYmx1ZXRvb3RoLjMgYnRfZGV2aW5mby4zCiBNTElOS1Mr
PQlibHVldG9vdGguMyBidF9kZXZlbnVtLjMKIAorTUxJTktTKz0JYmx1ZXRvb3RoLjMgYnRfZGV2
b3Blbi4zCitNTElOS1MrPQlibHVldG9vdGguMyBidF9kZXZjbG9zZS4zCitNTElOS1MrPQlibHVl
dG9vdGguMyBidF9kZXZzZW5kLjMKK01MSU5LUys9CWJsdWV0b290aC4zIGJ0X2RldnJlcS4zCitN
TElOS1MrPQlibHVldG9vdGguMyBidF9kZXZmaWx0ZXIuMworTUxJTktTKz0JYmx1ZXRvb3RoLjMg
YnRfZGV2aW5xdWlyeS4zCisKIE1MSU5LUys9CWJsdWV0b290aC4zIGJkYWRkcl9zYW1lLjMKIE1M
SU5LUys9CWJsdWV0b290aC4zIGJkYWRkcl9hbnkuMwogTUxJTktTKz0JYmx1ZXRvb3RoLjMgYmRh
ZGRyX2NvcHkuMwo=
--001636164aa7ee85e0046726e214--



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