Re: [Bluez-devel] Kernel Module

Marcel Holtmann
2007-02-26T11:44:43Z

Hi Yunus,

> >> >> I want to write a kernel module and use some bluez commands those
> >> >> included in the kernel.
> >> >>
> >> >> I will use it some experimental cases.
> >> >>
> >> >> Is it possible to use bluez commands in kernel modules? If so, how can
> I
> >> >> do it?
> >>
> >> >of course it is possible, but for what strange reason you might wanna
> >> >find yourself writing a kernel module. Explain what you are planning to
> >> >do and I might can give you a more detailed answer. I am not psychic.
> >>
> >> There is a Project called ULLA (http://ulla.sourceforge.net) and I am
> >> writing a simple bluetooth LLA fot it. ULLA collects link layer
> information
> >> (802.11x, bluetooth, zigbee etc.) to application layer programmes.
> >>
> >> I will take Bd Addrs and user friendly names fo nearby devices and give
> it
> >> to ULLA Core.
> >>
> >> My program will be a kernel module, because I will collect link layer
> >> information. ULLA calls these link layer information collecting modules
> to
> >> Link Provider (LP).
>
> >the architecture with the kernel module is totally crap. The data
> >collection has to be done in userspace and all these information are
> >provided over D-Bus.
>
> We talked about this kernel-module problem with you a couple of weeks ago in
> irc #bluez channel. You advice me to work in userspace everytime. My work
> contains only some querying functuonality, for example bd address, user
> friendly name etc. I do not want the whole bluez functuonality in my
> project. I have to do in in kernel-space.

and why does nobody believe me that it is a bad idea to have such stuff
inside the kernel. You have to have the BlueZ userspace part anyway,
because otherwise the adapter is not useful. However feel free to change
the kernel and invent all things again. The D-Bus API actually provides
a prefect interface for your needs. You might wanna run the example
bluetooth-proximity tool to see what I mean. It is only an UI using
D-Bus only.