Skip to contentSkip to conversation

Bluetooth MIME types and URIs

Bluez-devel Marcel Holtmann 3 participants 15 messages Jul 7, 2005 – Jul 8, 2005 Bluetooth drivers

lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

Hi Folks,

I am working on a Gnome VFS method for Bluetooth and we need to find a common way for using Bluetooth URIs and their related MIME types. At the moment I am open for any proposals. So please comment on this topic.

Regards

Marcel

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#1 lore raw
Quoted 5 lines · Marcel Holtmann

Hi Folks,

I am working on a Gnome VFS method for Bluetooth and we need to find a common way for using Bluetooth URIs and their related MIME types. At the moment I am open for any proposals. So please comment on this topic.

What is this VFS module supposed to do? Device discovery, service discovery= =2E.?
Oh, wait... did you say Gnome? You are using a graphical desktop? Is your t= ext=20
terminal broken? *g*

In kdebluetooth we have three ioslaves (which I assume is roughly the same = as=20
a gnome VFS module):
bluetooth:/ simply do an inquiry and list the devices found sdp://[xx:xx:xx:xx:xx:xx]/ lists the services of a given device =46or conveniance it=C2=B4s also possible to replace the [<bdaddr>] with th= e device=20
name (which is looked up in kdebluetooth=C2=B4s persistant name cache). The [xx:xx...] syntax is inspired by the syntax used for IPv6 addresses in= =20
URLs (RFC 2732).
The third ioslave is for a the OBEX file transfer profile, so it=C2=B4s not=
really=20
relevant here.

=46or the mimetypes of the devices listed by the bluetooth ioslave we use=20 different types for each device class. The mimetypes are called=20 =C2=A8bluetooth/computer-device-class=C2=A8 for instance. afaik the subclas= s should=20
start with x-, and I=C2=B4m also not sure if the class string =C2=A8bluetoo= th=C2=A8 is ok,=20
but it works and no one complained...
We could have used a single mimetype for all classes and hardcode the icon.= =20
Since there are no custom actions for special device classes and since the= =20
device classes all known in advance, it doesn=C2=B4t really matter how it= =C2=B4s done.
=46or services (listed by the sdp-ioslave) we use mimetypes like=20 =C2=A8bluetooth/handsfree-profile=C2=A8. For each mimetype file we have a c= orresponding=20
desktop file which maps a list of UIDs to a mimetype, so new profiles can b= e=20
installed by third party applications (there aren=C2=B4t any so far, but=20 anyway... ;)
By using different mimetypes for each profile, the user can change the=20 association of bluetooth services with applications. Sometimes it=C2=B4s a = bit=20
nasty if you want to open a handsfree service with a generic terminal=20 program, that depends only on rfcomm for instance. At least in KDE it seems= =20
to be impossible to assign two mimetypes to an item. The other solution wou= ld=20
be a hierarchy among the mimetypes (rfcomm<-handsfree for instance).

Another option would be to use a single mimetype (associated with a helper= =20
application) for all services and do the service<->application association= =20
without mimetypes.

When the user finally clicks a service listed by the sdp ioslave, an=20 application must be started and it must be provided with everything it need= s=20
to know to connect to the given service.
Since in kdebluetooth we chose to start applications directly without the=20 helper mentioned above, we can only pass an URL to the application. This UR= L=20
must contain not only the bluetooth address, but also the rfcomm (or l2cap= =20
etc.) channel given in the service record.=20
In kdebluetooth this is encoded like that:
sdp://[00:e0:03:32:00:00]/params?name=3Dfred%27s%206230&rfcommchannel=3D1 The name of the device was =C2=A8Fred=C2=B4s 6230=C2=A8 in this example. Th= is scheme would=20
allow to append other parameters, for instance for l2cap-based services. It would also be possible to encode the complete sdp record of the service= =20
into the URL, but we didn=C2=B4t have any need for it.
Since KDE ships with a URL class, it is pretty easy to extract the device=20 address and the rfcommchannel from such an URL. Gnome surely has an=20 equivalent to KDE=C2=B4s KURL, but for plain C/C++ apps the quoting might m= ake it=20
more difficult than necessary.

There are several things we didn=C2=B4t implement, like.. =2D browse groups
=2D searching for a given UID instead of browsing everything

In kdebluetooth the ioslaves are used only directly by the user. Applicatio= ns=20
could also us it internally to search for devices/services, but we chose to= =20
use BlueZ directly - with some C++-wrappers around it of course, so that it= =20
looks less scary to people not hacking the kernel all day long.

Now this was just a short overview over the approach of kdebluetooth. The=20 design was mostly driven by our own needs and the limited degrees of freedo= m=20
that the ioslave framework offers. Squeezing bluetooth into an infrastructu= re=20
that was once created to browse a file systems make some things more=20 complicated than necessary. KDE developers tend to put everything and his=20 mother into an ioslave, because it=C2=B4s so simple to start, integrates so=
nicely=20
with the desktop and all the UI comes for free. The problems start when you= =20
realize that this UI isn=C2=B4t really best for your application. But anyway, it would certainly be good to agree on a common scheme if you=20 introduce equivalents to our ioslaves in gnome.
If you have kdebluetooth installed you can try =C2=A8kioclient -U ls 'bluet= ooth:/'=C2=A8=20
etc. in case I forgot some details about the URLs we are using.

regards
=46red

=2D-=20
=46red Schaettgen
[email protected]

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

author maintainer
#2 lore raw

Hi Fred,

Quoted 1 line
Quoted 1 line

I am working on a Gnome VFS method for Bluetooth and we need to find =

a

Quoted 1 line
Quoted 1 line

common way for using Bluetooth URIs and their related MIME types. At =

the

Quoted 3 lines
Quoted 1 line

moment I am open for any proposals. So please comment on this topic.

=20
What is this VFS module supposed to do? Device discovery, service disco=

very..?

all these tasks are done inside bluetoothd (needs to be written) and the VFS module is used for displaying them. The communication will be done via D-Bus.

An after-talk beer session at the LinuxTag with one of the D-Bus guys convinced me that there is no other way that makes sense. I have a rough design on how these things will interact, but only a bare minimum is implemented at the moment. The kernel needs an extra event mechanism for all this stuff and I have to write bluetoothd of course. The basic idea looks like this:

	kernel <-> bluetoothd <-> applications

The Nautilus integration is the next logical step and this means a Bluetooth Gnome VFS module. In general I wanna integrate Bluetooth into the desktop without writing any new applications. My idea is to make it mostly invisible for the user that they are using Bluetooth.

Quoted 1 line

Oh, wait... did you say Gnome? You are using a graphical desktop? Is yo=

ur text=20

Quoted 1 line

terminal broken? *g*

I hope not ;)

Quoted 1 line

In kdebluetooth we have three ioslaves (which I assume is roughly the s=

ame as=20

Quoted 4 lines

a gnome VFS module):
bluetooth:/ simply do an inquiry and list the devices found sdp://[xx:xx:xx:xx:xx:xx]/ lists the services of a given device For conveniance it=B4s also possible to replace the [<bdaddr>] with the=

device=20

Quoted 2 lines

name (which is looked up in kdebluetooth=B4s persistant name cache). The [xx:xx...] syntax is inspired by the syntax used for IPv6 addresses=

in=20

Quoted 2 lines

URLs (RFC 2732).
The third ioslave is for a the OBEX file transfer profile, so it=B4s no=

t really=20

Quoted 1 line

relevant here.

The IO slaves and the Gnome VFS are almost the same.

Another way is to strip the colon from the device address. This method was used in the ESDP and JSR-82 specifications. I used the latter method in the URIs for the CUPS backend.

Main question is how we deal with different local devices. We need a method to specify an optional source. No specification really deals with multiple Bluetooth devices attached to the same host.

Quoted 1 line

For the mimetypes of the devices listed by the bluetooth ioslave we use=

=20

Quoted 2 lines

different types for each device class. The mimetypes are called=20 =A8bluetooth/computer-device-class=A8 for instance. afaik the subclass =

should=20

Quoted 1 line

start with x-, and I=B4m also not sure if the class string =A8bluetooth=

=A8 is ok,=20

Quoted 2 lines

but it works and no one complained...
We could have used a single mimetype for all classes and hardcode the i=

con.=20

Quoted 1 line

Since there are no custom actions for special device classes and since =

the=20

Quoted 1 line

device classes all known in advance, it doesn=B4t really matter how it=B4=

s done.

Quoted 2 lines

For services (listed by the sdp-ioslave) we use mimetypes like=20 =A8bluetooth/handsfree-profile=A8. For each mimetype file we have a cor=

responding=20

Quoted 1 line

desktop file which maps a list of UIDs to a mimetype, so new profiles c=

an be=20

Quoted 4 lines

installed by third party applications (there aren=B4t any so far, but=20 anyway... ;)
By using different mimetypes for each profile, the user can change the=20 association of bluetooth services with applications. Sometimes it=B4s a=

bit=20

Quoted 2 lines

nasty if you want to open a handsfree service with a generic terminal=20 program, that depends only on rfcomm for instance. At least in KDE it s=

eems=20

Quoted 1 line

to be impossible to assign two mimetypes to an item. The other solution=

would=20

Quoted 3 lines

be a hierarchy among the mimetypes (rfcomm<-handsfree for instance). =20
Another option would be to use a single mimetype (associated with a hel=

per=20

Quoted 1 line

application) for all services and do the service<->application associat=

ion=20

Quoted 1 line

without mimetypes.

I think we need at least two different MIME types. One for devices and one for the service records. Having different types for every UUID is also a good idea. Thoughts?

Actually I have no ideas for their string representation. Does anybody know a reference for this?

Quoted 2 lines

When the user finally clicks a service listed by the sdp ioslave, an=20 application must be started and it must be provided with everything it =

needs=20

Quoted 2 lines

to know to connect to the given service.
Since in kdebluetooth we chose to start applications directly without t=

he=20

Quoted 1 line

helper mentioned above, we can only pass an URL to the application. Thi=

s URL=20

Quoted 1 line

must contain not only the bluetooth address, but also the rfcomm (or l2=

cap=20

Quoted 3 lines

etc.) channel given in the service record.=20
In kdebluetooth this is encoded like that:
sdp://[00:e0:03:32:00:00]/params?name=3Dfred%27s%206230&rfcommchannel=3D=

1

Quoted 1 line

The name of the device was =A8Fred=B4s 6230=A8 in this example. This sc=

heme would=20

Quoted 2 lines

allow to append other parameters, for instance for l2cap-based services. It would also be possible to encode the complete sdp record of the serv=

ice=20

Quoted 2 lines

into the URL, but we didn=B4t have any need for it.
Since KDE ships with a URL class, it is pretty easy to extract the devi=

ce=20

Quoted 2 lines

address and the rfcommchannel from such an URL. Gnome surely has an=20 equivalent to KDE=B4s KURL, but for plain C/C++ apps the quoting might =

make it=20

Quoted 1 line

more difficult than necessary.

For these kind of things it would be great to go along with the JSR-82 specification and their ideas of a Bluetooth URI. However I am not 100% sure about that at the moment, because some of the JSR-82 stuff is crap.

Quoted 3 lines

There are several things we didn=B4t implement, like..
- browse groups
- searching for a given UID instead of browsing everything

I don't think that these stuff is needed for the graphical interfaces of Bluetooth. If people want that, then they should use the command line.

Quoted 1 line

In kdebluetooth the ioslaves are used only directly by the user. Applic=

ations=20

Quoted 1 line

could also us it internally to search for devices/services, but we chos=

e to=20

Quoted 1 line

use BlueZ directly - with some C++-wrappers around it of course, so tha=

t it=20

Quoted 1 line

looks less scary to people not hacking the kernel all day long.

My current idea is to present that via D-Bus and then use whenever possible Python as programming language. Not that I am a really good Python programmer, but it seems reasonable to me.

Quoted 1 line

Now this was just a short overview over the approach of kdebluetooth. T=

he=20

Quoted 1 line

design was mostly driven by our own needs and the limited degrees of fr=

eedom=20

Quoted 1 line

that the ioslave framework offers. Squeezing bluetooth into an infrastr=

ucture=20

Quoted 2 lines

that was once created to browse a file systems make some things more=20 complicated than necessary. KDE developers tend to put everything and h=

is=20

Quoted 1 line

mother into an ioslave, because it=B4s so simple to start, integrates s=

o nicely=20

Quoted 1 line

with the desktop and all the UI comes for free. The problems start when=

you=20

Quoted 2 lines

realize that this UI isn=B4t really best for your application. But anyway, it would certainly be good to agree on a common scheme if y=

ou=20

Quoted 2 lines

introduce equivalents to our ioslaves in gnome.
If you have kdebluetooth installed you can try =A8kioclient -U ls 'blue=

tooth:/'=A8=20

Quoted 1 line

etc. in case I forgot some details about the URLs we are using.

Last time I played with the KDE-Bluetooth thing it was working great and the version included in SuSE 9.3 is really usable. However we need some kind of standard between Gnome and KDE (and every other desktop). At the moment my mind is totally open for anything. The more feedback the better.

Regards

Marcel

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#3 lore raw

On Thursday, 7. July 2005 20:13, Marcel Holtmann wrote:
=2E..

Quoted 9 lines
Quoted 2 lines

What is this VFS module supposed to do? Device discovery, service discovery..?

all these tasks are done inside bluetoothd (needs to be written) and the VFS module is used for displaying them. The communication will be done via D-Bus.

An after-talk beer session at the LinuxTag with one of the D-Bus guys convinced me that there is no other way that makes sense.

Indeed. That=B4s also more or less what we are doing. Well, the ioslaves do=
the=20
inquiry and sdp requests on their own, but the name cache is accessed via=20 DCOP. I wouldn=B4t mind if BlueZ could do part of the work. Qt support for = dbus=20
wasn=B4t all that good last time I checked, but this will certainly change = if=20
KDE4 starts using dbus more than just removable media.

Quoted 5 lines

I have a rough=20
design on how these things will interact, but only a bare minimum is implemented at the moment. The kernel needs an extra event mechanism for all this stuff and I have to write bluetoothd of course. The basic idea looks like this:

What is that extra event mechanism good for? Can=B4t you monitor everything=
that=20
is needed without new extensions?
Oh, btw. is there a way to get the number of transfered packets/bytes? =20

=2E..

Quoted 2 lines
Quoted 2 lines

The [xx:xx...] syntax is inspired by the syntax used for IPv6 addresses in URLs (RFC 2732).

=2E..

Quoted 3 lines

Another way is to strip the colon from the device address. This method was used in the ESDP and JSR-82 specifications. I used the latter method in the URIs for the CUPS backend.

Ok, someone flip a coin please ;)

Quoted 3 lines

Main question is how we deal with different local devices. We need a method to specify an optional source. No specification really deals with multiple Bluetooth devices attached to the same host.

We could simply append the device number to the device address and default = to=20
the first usable device if that suffix is missing. Like [xx:xx:xx:xx:xx:xx.= 2]=20
for instance. =20
But remember that you are targeting desktop users now. We support several=20 devices only by setting a special environment variable/command line paramet= er=20
and before that we=B4ve had about one complaint in total regarding missing= =20
support for multiple adapters. A workaround for special needs is obviously= =20
enough, no need to complicate the UI for the vast majority with just a sing= le=20
adapter.

=2E..
[mimetypes used by kde=B4s ioslaves]
=2E..

Quoted 3 lines

I think we need at least two different MIME types. One for devices and one for the service records. Having different types for every UUID is also a good idea. Thoughts?

Sure, when I said =A8one mimetype=A8 I was talking just about the sdp iosla= ve=20
which does the services. Do you want to use one VFS module for everything? = We=20
used to have one kioslave for both device discovery and service listing, bu= t=20
it=B4s cleaner if it=B4s separated in my eyes.
If you have one mimetype per UUID, then which one do you pick for the file= =20
item? Or can you assign several mimetypes to one item with gnome=B4s VFS? That=B4s one of the points where doing bluetooth with kioslaves looked like=
a=20
not so good idea.

Quoted 2 lines

Actually I have no ideas for their string representation. Does anybody know a reference for this?

String representation of what? Mime types? This might help in that case:
http://www.iana.org/assignments/media-types/
I never bothered reading it though.

=2E..

Quoted 3 lines

For these kind of things it would be great to go along with the JSR-82 specification and their ideas of a Bluetooth URI. However I am not 100% sure about that at the moment, because some of the JSR-82 stuff is crap.

If it does all we need - fine. How would a JSR-82 style URL look like to=20 access some service of a device?

Quoted 5 lines

Last time I played with the KDE-Bluetooth thing it was working great and the version included in SuSE 9.3 is really usable. However we need some kind of standard between Gnome and KDE (and every other desktop). At the moment my mind is totally open for anything. The more feedback the better.

The metaserver feature of kbluetoothd really shouldn=B4t be KDE-specific in=
my=20
eyes. It=B4s extremly helpful to implement new services, which can then be= =20
controlled in a consistent and secure fashion. It proved to work very well= =20
for us in all the time, but having it implemented in BlueZ (with KDE and=20 Gnome providing just a GUI for it) it might even used by third parties. It= =B4s=20
hard to sell if it=B4s tied to KDE.

Another service that might be worth sharing is the device discovery. This i= s a=20
service offered by kbluetoothd which searches for nearby devices regularly = =20
and starts scripts when devices come and go. It totally sucks UI-wise, but = it=20
is good for many interesting applications. And if you have more than one=20 application where each one polls for new devices, then it makes a lot of=20 sense to have just a central service doing that on behalf of them. The biggest problem is how to deal with devices that are not discoverable. = In=20
kbluetoothd the user (or applications via DCOP) can configure a list of=20 devices that are paged to find out if they are around. But those connection= =20
attempts don=B4t do any good when you try to use the adapter for something = else=20
meanwhile.

Will the bluetoothd run in the user session or as root? Maybe it should be= =20
able to do both, just like the dbus daemon itself. If bluetoothd contains a= =20
metaserver eventually it should be possible to have it launch applications= =20
with a GUI, like kbluetoothd is doing now. But we can=B4t start system serv= ices=20
on demand, even though this can be desirable too.=20

=46red

=2D-=20
=46red Schaettgen
[email protected]

-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

author maintainer
#4 lore raw

Hi Fred,

Quoted 4 lines
Quoted 2 lines

An after-talk beer session at the LinuxTag with one of the D-Bus guys convinced me that there is no other way that makes sense.

=20
Indeed. That=B4s also more or less what we are doing. Well, the ioslave=

s do the=20

Quoted 1 line

inquiry and sdp requests on their own, but the name cache is accessed v=

ia=20

Quoted 1 line

DCOP. I wouldn=B4t mind if BlueZ could do part of the work. Qt support =

for dbus=20

Quoted 1 line

wasn=B4t all that good last time I checked, but this will certainly cha=

nge if=20

Quoted 1 line

KDE4 starts using dbus more than just removable media.

I will move the device and service discovery into bluetoothd and also the name cache. Actually hcid already maintains a name cache, but at the moment you can access it only via the filesystem.

Quoted 3 lines
Quoted 3 lines

I have a rough=20
design on how these things will interact, but only a bare minimum is implemented at the moment. The kernel needs an extra event mechanism =

for

Quoted 1 line
Quoted 1 line

all this stuff and I have to write bluetoothd of course. The basic id=

ea

Quoted 3 lines
Quoted 1 line

looks like this:

=20
What is that extra event mechanism good for? Can=B4t you monitor everyt=

hing that=20

Quoted 1 line

is needed without new extensions?

But you need to do everything twice. Inside the kernel and then again in userspace. The kernel needs to keep track of a lot of stuff anyway and so I don't wanna redo that in userspace.

The best example is the Inquiry Result with RSSI event. Some vendor got it wrong and so I had to implement a workaround in the kernel, in hcid and in hcidump. The hcidump part will never go away, because I need to keep it separate to be able to detect errors, but the kernel and hcid (bluetoothd in the future) shouldn't need to do that twice.

Quoted 1 line

Oh, btw. is there a way to get the number of transfered packets/bytes? =

=20

The "struct hci_dev_info" contain them. Check hciconfig for an example.

Quoted 1 line
Quoted 1 line
Quoted 1 line

The [xx:xx...] syntax is inspired by the syntax used for IPv6 addre=

sses

Quoted 3 lines
Quoted 1 line
Quoted 1 line

in URLs (RFC 2732).

...

Quoted 1 line

Another way is to strip the colon from the device address. This metho=

d

Quoted 1 line
Quoted 1 line

was used in the ESDP and JSR-82 specifications. I used the latter met=

hod

Quoted 3 lines
Quoted 1 line

in the URIs for the CUPS backend.

=20
Ok, someone flip a coin please ;)

I checked the RFC 2732 and I think both are fine. Maybe it is a good idea to also support both.

Quoted 2 lines
Quoted 2 lines

Main question is how we deal with different local devices. We need a method to specify an optional source. No specification really deals w=

ith

Quoted 3 lines
Quoted 1 line

multiple Bluetooth devices attached to the same host.

=20
We could simply append the device number to the device address and defa=

ult to=20

Quoted 1 line

the first usable device if that suffix is missing. Like [xx:xx:xx:xx:xx=

:xx.2]=20

Quoted 1 line

for instance. =20

I don't like it. My thoughts were something like:

	hci0@aabbccddeeff or 112233445566@aabbccddeeff

But actually I must admit I am not really convinced.

Quoted 1 line

But remember that you are targeting desktop users now. We support sever=

al=20

Quoted 1 line

devices only by setting a special environment variable/command line par=

ameter=20

Quoted 1 line

and before that we=B4ve had about one complaint in total regarding miss=

ing=20

Quoted 1 line

support for multiple adapters. A workaround for special needs is obviou=

sly=20

Quoted 1 line

enough, no need to complicate the UI for the vast majority with just a =

single=20

Quoted 1 line

adapter.

This is no argument for me. We always will have the special case where only one adapter exists and BDADDR_ANY is enough, but this is Linux and we do it the right way and support everything possible. You need to redo your thinking. Multiple adapters is the normal case and only one adapter is a special case.

And if I start using graphical toys for Bluetooth then they must support it, because for me the normal case is three attached adapters ;)

Quoted 1 line
Quoted 1 line

I think we need at least two different MIME types. One for devices an=

d

Quoted 4 lines
Quoted 2 lines

one for the service records. Having different types for every UUID is also a good idea. Thoughts?

=20
Sure, when I said =A8one mimetype=A8 I was talking just about the sdp i=

oslave=20

Quoted 1 line

which does the services. Do you want to use one VFS module for everythi=

ng? We=20

Quoted 1 line

used to have one kioslave for both device discovery and service listing=

, but=20

Quoted 2 lines

it=B4s cleaner if it=B4s separated in my eyes.
If you have one mimetype per UUID, then which one do you pick for the f=

ile=20

Quoted 1 line

item? Or can you assign several mimetypes to one item with gnome=B4s VF=

S?

Quoted 1 line

That=B4s one of the points where doing bluetooth with kioslaves looked =

like a=20

Quoted 1 line

not so good idea.

I don't see the advantage of having two different VFS modules for device and service discovery. And since both are only presenting stuff that can be retrieved from bluetoothd they won't be highly complex.

Since Nautilus is supporting "Open with" it might be possible to assign multiple applications to one MIME type. This also means that we need different MIME types for each service/profile.

Quoted 1 line
Quoted 1 line

Actually I have no ideas for their string representation. Does anybod=

y

Quoted 3 lines
Quoted 1 line

know a reference for this?

=20
String representation of what? Mime types? This might help in that case=

:

Quoted 2 lines

http://www.iana.org/assignments/media-types/
I never bothered reading it though.

It was a long time ago when I read the RFC 2046. However after looking through it, I think we must use the application main type with the x- subtype. What about stuff like this:

application/x-bt.device
application/x-bt.service

application/x-bt.handsfree

On the other hand I remembered that the BIP already needed special MIME types and it seems they are using x-bt/img-listing and so on for it.

Quoted 1 line
Quoted 1 line

For these kind of things it would be great to go along with the JSR-8=

2

Quoted 1 line
Quoted 1 line

specification and their ideas of a Bluetooth URI. However I am not 10=

0%

Quoted 1 line
Quoted 1 line

sure about that at the moment, because some of the JSR-82 stuff is cr=

ap.

Quoted 2 lines

=20
If it does all we need - fine. How would a JSR-82 style URL look like t=

o=20

Quoted 1 line

access some service of a device?

They only define btspp:, btl2cap: and btgoep: and it is mostly used for protocol transports. As I said, some of it is crap.

Quoted 1 line
Quoted 1 line

Last time I played with the KDE-Bluetooth thing it was working great =

and

Quoted 1 line
Quoted 1 line

the version included in SuSE 9.3 is really usable. However we need so=

me

Quoted 1 line
Quoted 1 line

kind of standard between Gnome and KDE (and every other desktop). At =

the

Quoted 4 lines
Quoted 2 lines

moment my mind is totally open for anything. The more feedback the better.

=20
The metaserver feature of kbluetoothd really shouldn=B4t be KDE-specifi=

c in my=20

Quoted 1 line

eyes. It=B4s extremly helpful to implement new services, which can then=

be=20

Quoted 1 line

controlled in a consistent and secure fashion. It proved to work very w=

ell=20

Quoted 1 line

for us in all the time, but having it implemented in BlueZ (with KDE an=

d=20

Quoted 1 line

Gnome providing just a GUI for it) it might even used by third parties.=

It=B4s=20

Quoted 1 line

hard to sell if it=B4s tied to KDE.

Before talking about any metaserver, I need to resolve some other basic issues like authentication, authorization etc.

Quoted 1 line

Another service that might be worth sharing is the device discovery. Th=

is is a=20

Quoted 1 line

service offered by kbluetoothd which searches for nearby devices regula=

rly =20

Quoted 1 line

and starts scripts when devices come and go. It totally sucks UI-wise, =

but it=20

Quoted 1 line

is good for many interesting applications. And if you have more than on=

e=20

Quoted 1 line

application where each one polls for new devices, then it makes a lot o=

f=20

Quoted 2 lines

sense to have just a central service doing that on behalf of them. The biggest problem is how to deal with devices that are not discoverab=

le. In=20

Quoted 1 line

kbluetoothd the user (or applications via DCOP) can configure a list of=

=20

Quoted 1 line

devices that are paged to find out if they are around. But those connec=

tion=20

Quoted 1 line

attempts don=B4t do any good when you try to use the adapter for someth=

ing else=20

Quoted 1 line

meanwhile.

The inquiries in background is something I don't really like about it, because for some devices this is simply disturbing and if you play music over A2DP you might kill the audio stream with it. However I wanna move that all into bluetoothd (including somekind of SDP cache).

Quoted 1 line

Will the bluetoothd run in the user session or as root? Maybe it should=

be=20

Quoted 1 line

able to do both, just like the dbus daemon itself. If bluetoothd contai=

ns a=20

Quoted 1 line

metaserver eventually it should be possible to have it launch applicati=

ons=20

Quoted 1 line

with a GUI, like kbluetoothd is doing now. But we can=B4t start system =

services=20

Quoted 1 line

on demand, even though this can be desirable too.=20

It will be root only, because otherwise it can't listen for kernel events. We also need one central daemon to deal with all the stuff and so a session version makes no sense. However there is also no need it, because it will communicate only over D-Bus and this can be made session aware. The D-Bus also have somekind of activation mechanism that should make it possible to start application, but I never looked at that. Right now there are other things with higher priority.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#5 lore raw

Hi folks,

I am not complete aware of all subjects under discussion, but I would like comment some points ...

Quoted 6 lines · Marcel Holtmann

Hi Fred,
=20

Quoted 4 lines
Quoted 2 lines

An after-talk beer session at the LinuxTag with one of the D-Bus guys convinced me that there is no other way that makes sense.

Indeed. That=B4s also more or less what we are doing. Well, the ioslave=

s do the

Quoted 1 line
Quoted 1 line

inquiry and sdp requests on their own, but the name cache is accessed v=

ia

Quoted 1 line
Quoted 1 line

DCOP. I wouldn=B4t mind if BlueZ could do part of the work. Qt support =

for dbus

Quoted 1 line
Quoted 1 line

wasn=B4t all that good last time I checked, but this will certainly cha=

nge if

Quoted 9 lines
Quoted 1 line

KDE4 starts using dbus more than just removable media.

=20
I will move the device and service discovery into bluetoothd and also the name cache. Actually hcid already maintains a name cache, but at the moment you can access it only via the filesystem.
=20

Quoted 3 lines
Quoted 3 lines

I have a rough
design on how these things will interact, but only a bare minimum is implemented at the moment. The kernel needs an extra event mechanism =

for

Quoted 1 line
Quoted 1 line
Quoted 1 line

all this stuff and I have to write bluetoothd of course. The basic id=

ea

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

looks like this:

What is that extra event mechanism good for? Can=B4t you monitor everyt=

hing that

Quoted 12 lines
Quoted 1 line

is needed without new extensions?

=20
But you need to do everything twice. Inside the kernel and then again in userspace. The kernel needs to keep track of a lot of stuff anyway and so I don't wanna redo that in userspace.
=20
The best example is the Inquiry Result with RSSI event. Some vendor got it wrong and so I had to implement a workaround in the kernel, in hcid and in hcidump. The hcidump part will never go away, because I need to keep it separate to be able to detect errors, but the kernel and hcid (bluetoothd in the future) shouldn't need to do that twice. =20

Quoted 5 lines
Quoted 1 line

Oh, btw. is there a way to get the number of transfered packets/bytes?

=20
The "struct hci_dev_info" contain them. Check hciconfig for an example. =20

Quoted 1 line
Quoted 1 line
Quoted 1 line

The [xx:xx...] syntax is inspired by the syntax used for IPv6 addre=

sses

Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line

in URLs (RFC 2732).

...

Quoted 1 line

Another way is to strip the colon from the device address. This metho=

d

Quoted 1 line
Quoted 1 line
Quoted 1 line

was used in the ESDP and JSR-82 specifications. I used the latter met=

hod

Quoted 9 lines
Quoted 3 lines
Quoted 1 line

in the URIs for the CUPS backend.

Ok, someone flip a coin please ;)

=20
I checked the RFC 2732 and I think both are fine. Maybe it is a good idea to also support both.
=20

Quoted 2 lines
Quoted 2 lines

Main question is how we deal with different local devices. We need a method to specify an optional source. No specification really deals w=

ith

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

multiple Bluetooth devices attached to the same host.

We could simply append the device number to the device address and defa=

ult to

Quoted 1 line
Quoted 1 line

the first usable device if that suffix is missing. Like [xx:xx:xx:xx:xx=

:xx.2]

Quoted 9 lines
Quoted 1 line

for instance.

=20
I don't like it. My thoughts were something like:
=20

        hci0@aabbccddeeff or 112233445566@aabbccddeeff

=20
But actually I must admit I am not really convinced. =20

Quoted 1 line

But remember that you are targeting desktop users now. We support sever=

al

Quoted 1 line
Quoted 1 line

devices only by setting a special environment variable/command line par=

ameter

Quoted 1 line
Quoted 1 line

and before that we=B4ve had about one complaint in total regarding miss=

ing

Quoted 1 line
Quoted 1 line

support for multiple adapters. A workaround for special needs is obviou=

sly

Quoted 1 line
Quoted 1 line

enough, no need to complicate the UI for the vast majority with just a =

single

Quoted 12 lines
Quoted 1 line

adapter.

=20
This is no argument for me. We always will have the special case where only one adapter exists and BDADDR_ANY is enough, but this is Linux and we do it the right way and support everything possible. You need to redo your thinking. Multiple adapters is the normal case and only one adapter is a special case.
=20
And if I start using graphical toys for Bluetooth then they must support it, because for me the normal case is three attached adapters ;) =20

Quoted 1 line
Quoted 1 line

I think we need at least two different MIME types. One for devices an=

d

Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

one for the service records. Having different types for every UUID is also a good idea. Thoughts?

Sure, when I said =A8one mimetype=A8 I was talking just about the sdp i=

oslave

Quoted 1 line
Quoted 1 line

which does the services. Do you want to use one VFS module for everythi=

ng? We

Quoted 1 line
Quoted 1 line

used to have one kioslave for both device discovery and service listing=

, but

Quoted 2 lines
Quoted 2 lines

it=B4s cleaner if it=B4s separated in my eyes.
If you have one mimetype per UUID, then which one do you pick for the f=

ile

Quoted 1 line
Quoted 1 line

item? Or can you assign several mimetypes to one item with gnome=B4s VF=

S?

Quoted 1 line
Quoted 1 line

That=B4s one of the points where doing bluetooth with kioslaves looked =

like a

Quoted 11 lines
Quoted 1 line

not so good idea.

=20
I don't see the advantage of having two different VFS modules for device and service discovery. And since both are only presenting stuff that can be retrieved from bluetoothd they won't be highly complex. =20
Since Nautilus is supporting "Open with" it might be possible to assign multiple applications to one MIME type. This also means that we need different MIME types for each service/profile.
=20

Quoted 1 line
Quoted 1 line

Actually I have no ideas for their string representation. Does anybod=

y

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

know a reference for this?

String representation of what? Mime types? This might help in that case=

:

Quoted 16 lines
Quoted 2 lines

http://www.iana.org/assignments/media-types/
I never bothered reading it though.

=20
It was a long time ago when I read the RFC 2046. However after looking through it, I think we must use the application main type with the x- subtype. What about stuff like this:
=20
application/x-bt.device
application/x-bt.service
=20
application/x-bt.handsfree
=20
On the other hand I remembered that the BIP already needed special MIME types and it seems they are using x-bt/img-listing and so on for it. =20

Quoted 1 line
Quoted 1 line

For these kind of things it would be great to go along with the JSR-8=

2

Quoted 1 line
Quoted 1 line
Quoted 1 line

specification and their ideas of a Bluetooth URI. However I am not 10=

0%

Quoted 1 line
Quoted 1 line
Quoted 1 line

sure about that at the moment, because some of the JSR-82 stuff is cr=

ap.

Quoted 2 lines
Quoted 2 lines

If it does all we need - fine. How would a JSR-82 style URL look like t=

o

Quoted 6 lines
Quoted 1 line

access some service of a device?

=20
They only define btspp:, btl2cap: and btgoep: and it is mostly used for protocol transports. As I said, some of it is crap.
=20

Quoted 1 line
Quoted 1 line

Last time I played with the KDE-Bluetooth thing it was working great =

and

Quoted 1 line
Quoted 1 line
Quoted 1 line

the version included in SuSE 9.3 is really usable. However we need so=

me

Quoted 1 line
Quoted 1 line
Quoted 1 line

kind of standard between Gnome and KDE (and every other desktop). At =

the

Quoted 4 lines
Quoted 4 lines
Quoted 2 lines

moment my mind is totally open for anything. The more feedback the better.

The metaserver feature of kbluetoothd really shouldn=B4t be KDE-specifi=

c in my

Quoted 1 line
Quoted 1 line

eyes. It=B4s extremly helpful to implement new services, which can then=

be

Quoted 1 line
Quoted 1 line

controlled in a consistent and secure fashion. It proved to work very w=

ell

Quoted 1 line
Quoted 1 line

for us in all the time, but having it implemented in BlueZ (with KDE an=

d

Quoted 1 line
Quoted 1 line

Gnome providing just a GUI for it) it might even used by third parties.=

It=B4s

Quoted 4 lines
Quoted 1 line

hard to sell if it=B4s tied to KDE.

=20
Before talking about any metaserver, I need to resolve some other basic issues like authentication, authorization etc.

[Claudio Takahasi]
I am not understaning how the metaserver will work. How the current bluez= =20
daemons (pand, dund, hidd, rfcomm, ... ) must work with this metaserver. Could you write more details about the architecture of the metaserver and how it will interact with the bluez daemons?

Quoted 2 lines

=20

Quoted 1 line

Another service that might be worth sharing is the device discovery. Th=

is is a

Quoted 1 line
Quoted 1 line

service offered by kbluetoothd which searches for nearby devices regula=

rly

Quoted 1 line
Quoted 1 line

and starts scripts when devices come and go. It totally sucks UI-wise, =

but it

Quoted 1 line
Quoted 1 line

is good for many interesting applications. And if you have more than on=

e

Quoted 1 line
Quoted 1 line

application where each one polls for new devices, then it makes a lot o=

f

Quoted 2 lines
Quoted 2 lines

sense to have just a central service doing that on behalf of them. The biggest problem is how to deal with devices that are not discoverab=

le. In

Quoted 2 lines
Quoted 2 lines

kbluetoothd the user (or applications via DCOP) can configure a list of devices that are paged to find out if they are around. But those connec=

tion

Quoted 1 line
Quoted 1 line

attempts don=B4t do any good when you try to use the adapter for someth=

ing else

Quoted 8 lines
Quoted 1 line

meanwhile.

=20
The inquiries in background is something I don't really like about it, because for some devices this is simply disturbing and if you play music over A2DP you might kill the audio stream with it. However I wanna move that all into bluetoothd (including somekind of SDP cache). =20

Quoted 1 line

Will the bluetoothd run in the user session or as root? Maybe it should=

be

Quoted 1 line
Quoted 1 line

able to do both, just like the dbus daemon itself. If bluetoothd contai=

ns a

Quoted 1 line
Quoted 1 line

metaserver eventually it should be possible to have it launch applicati=

ons

Quoted 1 line
Quoted 1 line

with a GUI, like kbluetoothd is doing now. But we can=B4t start system =

services

Quoted 14 lines
Quoted 1 line

on demand, even though this can be desirable too.

=20
It will be root only, because otherwise it can't listen for kernel events. We also need one central daemon to deal with all the stuff and so a session version makes no sense. However there is also no need it, because it will communicate only over D-Bus and this can be made session aware. The D-Bus also have somekind of activation mechanism that should make it possible to start application, but I never looked at that. Right now there are other things with higher priority.
=20
Regards
=20
Marcel
=20

[Claudio Takahasi]
Basically two bus type are available: system and session. System bus is not able to start applications with user interfaces because the dbus-daemon is running with root permissions.
I already implemented D-Bus service for pand including daemon initiation and it is working fine.
Use DBUS for request BlueZ services will be nice because it's=20 possible handle security issues and concurrency.
DBus signal can be used to notify all D-BUS registered applications about new devices, new services, connection problems, ...

D-Bus is under development and some changes can occur, but it's possible develop some workarround to make the application compliant with Dbus 0.34, 0.33 and 0.23.

Regarding MIME types and Gnome VFS I am not familiar enough to send comments.... sorry.

Regards,
Claudio

Quoted 5 lines

=20
=20
=20
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happen=

ing

Quoted 2 lines

July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by H=

P,

Quoted 6 lines

AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#11 lore raw
In reply to Marcel Holtmann

On Friday, 8. July 2005 08:38, Marcel Holtmann wrote:
=2E..

Quoted 3 lines

I don't see the advantage of having two different VFS modules for device and service discovery. And since both are only presenting stuff that can be retrieved from bluetoothd they won't be highly complex.

This one VFS module is just doing two different things, so it cleaner to=20 separate it. If you want those modules to show virtual folder for various=20 purposes (recently seen devices, paired devices, hierarchical browse groups= ,=20
whatever), then you have a clean namespace available for both parts. It=B4s no big advantage, but it=B4s not more difficult either. And it=B4s t= he status=20
quo for kdebluetooth.

Quoted 3 lines

Since Nautilus is supporting "Open with" it might be possible to assign multiple applications to one MIME type. This also means that we need different MIME types for each service/profile.

AFAIK =A8Open with...=A8 is just good for opening a file with a given mimet= ype=20
with another application that supports the same mimetype (like different te= xt=20
editors).

=2E..

Quoted 11 lines

It was a long time ago when I read the RFC 2046. However after looking through it, I think we must use the application main type with the x- subtype. What about stuff like this:

application/x-bt.device
application/x-bt.service

application/x-bt.handsfree

On the other hand I remembered that the BIP already needed special MIME types and it seems they are using x-bt/img-listing and so on for it.

I really don=B4t care much.
But I wonder if this isn=B4t actually an abuse of mimetypes. Aren=B4t mimet= ypes=20
supposed to declare the format of a file? Yet we are not talking about file= =20
contents at all here. Instead we associate a mimetype with a certain URL=20 format.
At the moment, an item with the mimetype =A8bluetooth/obex-push-profile=A8 = can=20
only live inside the sdp kioslave.
Maybe a more correct way would in fact be to have a helper application=20 associated with the type application/x-bt.service, which gets the informati= on=20
what device to connect to not from the URL, but from the URL contents.=20 application/x-bt.service could simply be a file that contains the whole=20 service record as xml, similar to the service record files for the=20 metaserver. The applications would have to parse this xml file, which isn= =B4t=20
very lightweight, but it gives all available information and we don=B4t hav= e to=20
worry how to squezze everything into an URL.

The only drawback I see here is that the user can=B4t change the=20 service<->application association with the UI of the desktop. This UI is=20 about associating mimetypes with applications, but we would have our own=20 UID<->application mapping then. It=B4s more work for us, but it appears to = be a=20
better and more flexible design.

Instead of handling a given mimetype, application would have to install a=20 bluetooth specific registration file instead. We could even let the helper= =20
application (let=B4s call it service dispatcher) open the connection and pa= ss a=20
file descriptor to the application, just the the metaserver, but for outgoi= ng=20
connection. This could be nice for very simple applications. =A8Real=A8=20 application should get the bdaddr and rfcomm channel etc. from the service= =20
dispatcher though, so they can reconnect themselves.

=2E..

Quoted 7 lines

It will be root only, because otherwise it can't listen for kernel events. We also need one central daemon to deal with all the stuff and so a session version makes no sense. However there is also no need it, because it will communicate only over D-Bus and this can be made session aware. The D-Bus also have somekind of activation mechanism that should make it possible to start application, but I never looked at that. Right now there are other things with higher priority.

Oh, I didn=B4t know that. The pin helper isn=B4t started via dbus currently= , or is=20
it?

=46red

=2D-=20
=46red Schaettgen
[email protected]

-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

author maintainer
#12 lore raw

Hi Fred,

Quoted 1 line
Quoted 1 line

I don't see the advantage of having two different VFS modules for dev=

ice

Quoted 1 line
Quoted 1 line

and service discovery. And since both are only presenting stuff that =

can

Quoted 3 lines
Quoted 1 line

be retrieved from bluetoothd they won't be highly complex.

=20
This one VFS module is just doing two different things, so it cleaner t=

o=20

Quoted 1 line

separate it. If you want those modules to show virtual folder for vario=

us=20

Quoted 1 line

purposes (recently seen devices, paired devices, hierarchical browse gr=

oups,=20

Quoted 2 lines

whatever), then you have a clean namespace available for both parts. It=B4s no big advantage, but it=B4s not more difficult either. And it=B4=

s the status=20

Quoted 1 line

quo for kdebluetooth.

actually my plan was not to do that much inside the VFS module. My plan is to leave some stuff for other people, because I am not really an UI programmer ;)

Quoted 1 line
Quoted 1 line

Since Nautilus is supporting "Open with" it might be possible to assi=

gn

Quoted 4 lines
Quoted 2 lines

multiple applications to one MIME type. This also means that we need different MIME types for each service/profile.

=20
AFAIK =A8Open with...=A8 is just good for opening a file with a given m=

imetype=20

Quoted 1 line

with another application that supports the same mimetype (like differen=

t text=20

Quoted 1 line

editors).

What is the difference. You have multiple applications dealing with the MIME type for handsfree and one is default. I think that is what you was asking for.

Quoted 1 line
Quoted 1 line

It was a long time ago when I read the RFC 2046. However after lookin=

g

Quoted 9 lines
Quoted 9 lines

through it, I think we must use the application main type with the x- subtype. What about stuff like this:

application/x-bt.device
application/x-bt.service

application/x-bt.handsfree

On the other hand I remembered that the BIP already needed special MI=

ME

Quoted 3 lines
Quoted 1 line

types and it seems they are using x-bt/img-listing and so on for it.

=20
I really don=B4t care much.

I actually like to get opinion on it.

Quoted 1 line

But I wonder if this isn=B4t actually an abuse of mimetypes. Aren=B4t m=

imetypes=20

Quoted 1 line

supposed to declare the format of a file? Yet we are not talking about =

file=20

Quoted 1 line

contents at all here. Instead we associate a mimetype with a certain UR=

L=20

Quoted 1 line

format.

In general yes, but they always have been misused.

Quoted 1 line

At the moment, an item with the mimetype =A8bluetooth/obex-push-profile=

=A8 can=20

Quoted 3 lines

only live inside the sdp kioslave.
Maybe a more correct way would in fact be to have a helper application=20 associated with the type application/x-bt.service, which gets the infor=

mation=20

Quoted 2 lines

what device to connect to not from the URL, but from the URL contents.=20 application/x-bt.service could simply be a file that contains the whole=

=20

Quoted 2 lines

service record as xml, similar to the service record files for the=20 metaserver. The applications would have to parse this xml file, which i=

sn=B4t=20

Quoted 1 line

very lightweight, but it gives all available information and we don=B4t=

have to=20

Quoted 1 line

worry how to squezze everything into an URL.

I am not really happy with adding somekind of XML overhead.

Quoted 2 lines

The only drawback I see here is that the user can=B4t change the=20 service<->application association with the UI of the desktop. This UI i=

s=20

Quoted 1 line

about associating mimetypes with applications, but we would have our ow=

n=20

Quoted 1 line

UID<->application mapping then. It=B4s more work for us, but it appears=

to be a=20

Quoted 3 lines

better and more flexible design.
=20
Instead of handling a given mimetype, application would have to install=

a=20

Quoted 1 line

bluetooth specific registration file instead. We could even let the hel=

per=20

Quoted 1 line

application (let=B4s call it service dispatcher) open the connection an=

d pass a=20

Quoted 1 line

file descriptor to the application, just the the metaserver, but for ou=

tgoing=20

Quoted 1 line

connection. This could be nice for very simple applications. =A8Real=A8=

=20

Quoted 1 line

application should get the bdaddr and rfcomm channel etc. from the serv=

ice=20

Quoted 1 line

dispatcher though, so they can reconnect themselves.

Too far in the future for me, because I am still working on the basis.

Quoted 2 lines
Quoted 2 lines

It will be root only, because otherwise it can't listen for kernel events. We also need one central daemon to deal with all the stuff an=

d

Quoted 1 line
Quoted 1 line

so a session version makes no sense. However there is also no need it=

,

Quoted 1 line
Quoted 1 line

because it will communicate only over D-Bus and this can be made sess=

ion

Quoted 1 line
Quoted 1 line

aware. The D-Bus also have somekind of activation mechanism that shou=

ld

Quoted 1 line
Quoted 1 line

make it possible to start application, but I never looked at that. Ri=

ght

Quoted 3 lines
Quoted 1 line

now there are other things with higher priority.

=20
Oh, I didn=B4t know that. The pin helper isn=B4t started via dbus curre=

ntly, or is=20

Quoted 1 line

it?

The current PIN helper can't do that, because it is D-Bus 0.23 based and back then the activation service was no available. I am not fully happy with switching over to D-Bus 0.34 at the moment. This might leave some distributions behind and they may change parts of the API anyway.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

author maintainer
#6 lore raw
In reply to Claudio Takahasi

Hi Claudio,

Quoted 3 lines

Basically two bus type are available: system and session. System bus is not able to start applications with user interfaces because the dbus-daemon is running with root permissions.

why is activation not working with the system bus. However we might have to use system and session bus at the same time.

Quoted 2 lines

Use DBUS for request BlueZ services will be nice because it's possible handle security issues and concurrency.

This is the basic idea and it is the reason for putting everything inside bluetoothd and designing a new kernel interface.

Quoted 2 lines

DBus signal can be used to notify all D-BUS registered applications about new devices, new services, connection problems, ...

The new InquiryResult and RemoteName signals are implemented in hcid for testing. Start "dbus-monitor --system" and call "hcitool scan".

Quoted 3 lines

D-Bus is under development and some changes can occur, but it's possible develop some workarround to make the application compliant with Dbus 0.34, 0.33 and 0.23.

I already did that, but I am not very happy with it. I actually really like to see the 1.0 release of their API.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#13 lore raw
In reply to Marcel Holtmann

On Friday, 8. July 2005 16:43, Marcel Holtmann wrote:
...

Quoted 20 lines
Quoted 4 lines

But I wonder if this isn´t actually an abuse of mimetypes. Aren´t mimetypes supposed to declare the format of a file? Yet we are not talking about file contents at all here. Instead we associate a mimetype with a certain URL format.

In general yes, but they always have been misused.

Quoted 10 lines

At the moment, an item with the mimetype ¨bluetooth/obex-push-profile¨ can only live inside the sdp kioslave.
Maybe a more correct way would in fact be to have a helper application associated with the type application/x-bt.service, which gets the information what device to connect to not from the URL, but from the URL contents. application/x-bt.service could simply be a file that contains the whole service record as xml, similar to the service record files for the metaserver. The applications would have to parse this xml file, which isn´t very lightweight, but it gives all available information and we don´t have to worry how to squezze everything into an URL.

Quoted 1 line

I am not really happy with adding somekind of XML overhead.

But it´s the most natural format for a hierarchical data structure like the service records. The computational overhead would be neglectable and it only has to be implemented in the service dispatcher, not in each application started by it. We can put everything we know in the xml structure without much effort. Extending the url format might become more troublesome at some point.
We could also go without the service dispatcher and still use distinct mimetypes for each service, but let the application read the needed information from the data the url points to and not from the URL itself. We didn´t have to standardize on a URL format then, but just on the mimetypes and the service description format, be it xml or anything else. In KDE it would allow for a kfile plugin which displays additional properties of services in konqueror besides the name.
Or we could do both - putting just the most relevant information into the URL (bdaddr+channel) and the complete service record, device adress + name and everything else we know about a service into the file contents as xml similar to sdp registration files we use (see attachment).

Fred

Signature · 2 lines
Fred Schaettgen
[email protected]

<sdprecord>
<attributes>

<!-- Service name -->
<attribute id='0x0100'>
<str>Obex Push Server</str>
</attribute>

<!-- Service description -->
<attribute id='0x0101'>
<str>KDE OBEX Object Push Service</str>
</attribute>

<!-- Supported formats list -->
<attribute id='0x0303'>
<seq>
<uint val='0xFF' size='8'/><!-- anything -->
<uint val='0x01' size='8'/><!-- vCard 2.1 -->
<uint val='0x02' size='8'/><!-- vCard 3.0 -->
<uint val='0x03' size='8'/><!-- vCal 1.0 -->
<uint val='0x04' size='8'/><!-- iCal 2.0 -->
<uint val='0x05' size='8'/><!-- vNotes -->
<uint val='0x06' size='8'/><!-- vMessage -->
</seq>
</attribute>

<!-- Service class ID list -->
<attribute id='0x0001'>
<seq>
<uuid val='0x1105' size='16'/>
</seq>
</attribute>

<!-- Protocol descriptor list -->
<attribute id='0x0004'>
<seq>
<seq><uuid val='256' size='16'/></seq>
<seq><uuid val='3' size='16'/>
<uint valref='rfcommchannel' size='8'/></seq>
<seq><uuid val='0x0008' size='16'/></seq>
</seq>
</attribute>

<!-- Browse group list-->
<attribute id='0x0005'>
<seq>
<uuid val='0x1002' size='16'/>
</seq>
</attribute>

<!-- Bluetooth profile descriptor list -->
<attribute id='0x0009'>
<seq>
<seq><uuid val='0x1105' size='16'/>
<uint val='0x0100' size='16'/></seq>
</seq>
</attribute>

</attributes>
</sdprecord>

#7 lore raw
In reply to Marcel Holtmann

Hi Marcel,

Quoted 8 lines · Marcel Holtmann

Hi Claudio,
=20

Quoted 3 lines

Basically two bus type are available: system and session. System bus is not able to start applications with user interfaces because the dbus-daemon is running with root permissions.

=20
why is activation not working with the system bus. However we might have to use system and session bus at the same time.

No, It is working fine. I tested in D-Bus 0.23, 0.33 and 0.34.
I developed the D-Bus service for pand and it's possible start this daemon using system Bus because there no graphical interface involved. System bus is intended to be common for all user sessions and=20 session bus is restricted to the current user session.
If you need start a program that has graphical interface the activate reque= st
should be sent to the session bus instance.

Quoted 6 lines

=20

Quoted 2 lines

Use DBUS for request BlueZ services will be nice because it's possible handle security issues and concurrency.

=20
This is the basic idea and it is the reason for putting everything inside bluetoothd and designing a new kernel interface.

I see a new repository in the CVS(Bluehood). I think that this daemon will be the metaserver, is that correct?

Quoted 2 lines

=20

Quoted 1 line

DBus signal can be used to notify all D-BUS registered applications abo=

ut

Quoted 4 lines
Quoted 1 line

new devices, new services, connection problems, ...

=20
The new InquiryResult and RemoteName signals are implemented in hcid for testing. Start "dbus-monitor --system" and call "hcitool scan".

I didn't find this code in the bluez-utils-2.18 code. Where is it? Could you send me the CVS branch or the code?
I found references in the kbluetoothd(neighbourmonitor.cpp), but there is n= o=20
D-Bus messages involved.

Quoted 4 lines

=20

Quoted 3 lines

D-Bus is under development and some changes can occur, but it's possible develop some workarround to make the application compliant with Dbus 0.34, 0.33 and 0.23.

Quoted 13 lines

=20
I already did that, but I am not very happy with it. I actually really like to see the 1.0 release of their API.
=20
Regards
=20
Marcel
=20
=20
=20
=20
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happen=

ing

Quoted 2 lines

July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by H=

P,

Quoted 6 lines

AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

author maintainer
#8 lore raw

Hi Claudio,

Quoted 2 lines

I see a new repository in the CVS(Bluehood). I think that this daemon will be the metaserver, is that correct?

actually that is quite old and has nothing to do with it. The new bluetoothd will be inside utils/daemon/.

Quoted 6 lines
Quoted 2 lines

The new InquiryResult and RemoteName signals are implemented in hcid for testing. Start "dbus-monitor --system" and call "hcitool scan".

I didn't find this code in the bluez-utils-2.18 code. Where is it? Could you send me the CVS branch or the code?
I found references in the kbluetoothd(neighbourmonitor.cpp), but there is no D-Bus messages involved.

You are mixing things here. The KDE Bluetooth stuff has nothing to do with it at the moment. The code is inside the CVS and will be part of the 2.19 release.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

author maintainer
#14 lore raw
In reply to Fred Schaettgen

Hi Fred,

Quoted 1 line
Quoted 1 line
Quoted 1 line

At the moment, an item with the mimetype =A8bluetooth/obex-push-pro=

file=A8

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

can only live inside the sdp kioslave.
Maybe a more correct way would in fact be to have a helper applicat=

ion

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

associated with the type application/x-bt.service, which gets the information what device to connect to not from the URL, but from th=

e URL

Quoted 1 line
Quoted 1 line
Quoted 1 line

contents. application/x-bt.service could simply be a file that cont=

ains

Quoted 1 line
Quoted 1 line
Quoted 1 line

the whole service record as xml, similar to the service record file=

s for

Quoted 1 line
Quoted 1 line
Quoted 1 line

the metaserver. The applications would have to parse this xml file,=

which

Quoted 1 line
Quoted 1 line
Quoted 1 line

isn=B4t very lightweight, but it gives all available information an=

d we

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

don=B4t have to worry how to squezze everything into an URL.

I am not really happy with adding somekind of XML overhead.

=20
But it=B4s the most natural format for a hierarchical data structure li=

ke the=20

Quoted 1 line

service records. The computational overhead would be neglectable and it=

only=20

Quoted 1 line

has to be implemented in the service dispatcher, not in each applicatio=

n=20

Quoted 1 line

started by it. We can put everything we know in the xml structure witho=

ut=20

Quoted 1 line

much effort. Extending the url format might become more troublesome at =

some=20

Quoted 5 lines

point.=20
We could also go without the service dispatcher and still use distinct=20 mimetypes for each service, but let the application read the needed=20 information from the data the url points to and not from the URL itself. We didn=B4t have to standardize on a URL format then, but just on the m=

imetypes=20

Quoted 2 lines

and the service description format, be it xml or anything else.=20 In KDE it would allow for a kfile plugin which displays additional prop=

erties=20

Quoted 2 lines

of services in konqueror besides the name.=20
Or we could do both - putting just the most relevant information into t=

he URL=20

Quoted 1 line

(bdaddr+channel) and the complete service record, device adress + name =

and=20

Quoted 1 line

everything else we know about a service into the file contents as xml s=

imilar=20

Quoted 1 line

to sdp registration files we use (see attachment).

actually right now, I don't tend in either direction.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#9 lore raw
In reply to Marcel Holtmann

Hi Marcel,

Quoted 7 lines · Marcel Holtmann

Hi Claudio,
=20

Quoted 2 lines

I see a new repository in the CVS(Bluehood). I think that this daemon will be the metaserver, is that correct?

=20
actually that is quite old and has nothing to do with it. The new bluetoothd will be inside utils/daemon/.

[Claudio Takahasi]
Which D-Bus services will be provided by bluetoothd?=20
Please fix me if it is wrong or add more details to clarify=20 my clouds.
- periodic inquiry?
- service discovery? Currenlty, All daemons(dund, pand, hidd )=20 have search option. In my opinion a parametrized search
should be provided only by bluetoothd
- signal lost notifications?
- link configuration?
- adapter status: enable/disable authentication, encryption, pscan, iscan ?

Are there plans to implement D-Bus services for=20 the others bluez-utils daemons?

Regards,
Claudio.

Quoted 2 lines

=20

Quoted 1 line
Quoted 1 line

The new InquiryResult and RemoteName signals are implemented in hcid =

for

Quoted 2 lines
Quoted 2 lines
Quoted 1 line

testing. Start "dbus-monitor --system" and call "hcitool scan".

I didn't find this code in the bluez-utils-2.18 code. Where is it? Cou=

ld

Quoted 2 lines
Quoted 2 lines

you send me the CVS branch or the code?
I found references in the kbluetoothd(neighbourmonitor.cpp), but there =

is no

Quoted 15 lines
Quoted 1 line

D-Bus messages involved.

=20
You are mixing things here. The KDE Bluetooth stuff has nothing to do with it at the moment. The code is inside the CVS and will be part of the 2.19 release.
=20
Regards
=20
Marcel
=20
=20
=20
=20
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happen=

ing

Quoted 2 lines

July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by H=

P,

Quoted 6 lines

AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

author maintainer
#10 lore raw

Hi Claudio,

Quoted 10 lines

Which D-Bus services will be provided by bluetoothd?
Please fix me if it is wrong or add more details to clarify
my clouds.
- periodic inquiry?
- service discovery? Currenlty, All daemons(dund, pand, hidd ) have search option. In my opinion a parametrized search
should be provided only by bluetoothd
- signal lost notifications?
- link configuration?
- adapter status: enable/disable authentication, encryption, pscan, iscan ?

actually my idea is to do everthing inside bluetoothd and then send signals via D-Bus and provides methods for settings etc.

Quoted 2 lines

Are there plans to implement D-Bus services for
the others bluez-utils daemons?

If this works out, then I like to integrate HID, PAN and CIP into it and provide methods for it.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel