public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] pand D-Bus service
@ 2005-07-08 18:37 Claudio Takahasi
  2005-07-08 19:08 ` Marcel Holtmann
  0 siblings, 1 reply; 7+ messages in thread
From: Claudio Takahasi @ 2005-07-08 18:37 UTC (permalink / raw)
  To: bluez-devel

Hi Marcel,

We exchanged some emails last month about D-Bus services
for pand. I implemented some D-Bus services, but ...
How will be the relationship between the pand and the "metaserver"?
It is not clear for me how the other daemons will
interact with the current bluez-utils daemons and tools
(pand, hidd, dund, rfcomm, ...).
Could you explain me how the D-Bus services will be organized?


The current services implemented for pand are:
- daemon start/stop
- connect/disconnect
- search
- listen start/stop
- udhcp integration for local link address assigment
- automatic bridge creation (using libbridge)

The udhcp doesn't support local link address resolution
at the moment. However, there is a patch submited to busybox
community that make possible assign IP address to bluetooth
interfaces.


Regards,
Claudio.


-------------------------------------------------------
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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Bluez-devel] pand D-Bus service
  2005-07-08 18:37 [Bluez-devel] pand D-Bus service Claudio Takahasi
@ 2005-07-08 19:08 ` Marcel Holtmann
  2005-07-11 18:54   ` Claudio Takahasi
  0 siblings, 1 reply; 7+ messages in thread
From: Marcel Holtmann @ 2005-07-08 19:08 UTC (permalink / raw)
  To: bluez-devel

Hi Claudio,

> We exchanged some emails last month about D-Bus services
> for pand. I implemented some D-Bus services, but ...
> How will be the relationship between the pand and the "metaserver"?
> It is not clear for me how the other daemons will
> interact with the current bluez-utils daemons and tools
> (pand, hidd, dund, rfcomm, ...).

forget about the metaserver. This is something KDE specific at the
moment.

> Could you explain me how the D-Bus services will be organized?

I am not 100% sure at the moment. Need to play with it a little bit
more.

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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Bluez-devel] pand D-Bus service
  2005-07-08 19:08 ` Marcel Holtmann
@ 2005-07-11 18:54   ` Claudio Takahasi
  2005-07-11 19:27     ` Marcel Holtmann
  0 siblings, 1 reply; 7+ messages in thread
From: Claudio Takahasi @ 2005-07-11 18:54 UTC (permalink / raw)
  To: bluez-devel

Hi Marcel,

According with your emails, bluetoothd shall provide=20
methods for settings and send signals.
I finished the D-Bus services for pand, now we need
define how organize these services.=20

In my opinion the bluetoothd should be responsible for
provide all D-Bus services, including pand, hidd, cip, ...
Create D-Bus services for each daemon will require=20
monitor a lot of dbus connections. It's easier and more
efficient create "profile objects" for each profile inside
bluetoothd. Buetoothd can monitor different interfaces and=20
objects.

Currently, my D-Bus pand implementation is providing:
  -adapters: show local bluetooth adapters
  -connect:connect to a bluetooth device
  -connections: show active connections
  -disconnect: kill connections
  -enable-bridge: enable automatic bridge creation on listening
  -find: search for a service
  -listen: start/stop listen for bluetooth connections
  -role: switch the role MASTER|SLAVE
  -udhcp:enable UDHCP on listen or connect
  -init: initialize the bluez pan daemon (pand)
  -kill: kill the pand


If you see the code of D-Bus hcid, the D-Bus message control functions
are similar. The best approach is move all to daemon directory.


What is your opinion?

Regards,
Claudio.


On 7/8/05, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Claudio,
>=20
> > We exchanged some emails last month about D-Bus services
> > for pand. I implemented some D-Bus services, but ...
> > How will be the relationship between the pand and the "metaserver"?
> > It is not clear for me how the other daemons will
> > interact with the current bluez-utils daemons and tools
> > (pand, hidd, dund, rfcomm, ...).
>=20
> forget about the metaserver. This is something KDE specific at the
> moment.
>=20
> > Could you explain me how the D-Bus services will be organized?
>=20
> I am not 100% sure at the moment. Need to play with it a little bit
> more.
>=20
> Regards
>=20
> Marcel
>=20
>=20
>=20
>=20
> -------------------------------------------------------
> This SF.Net email is sponsored by the 'Do More With Dual!' webinar happen=
ing
> 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,
> AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
> 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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Bluez-devel] pand D-Bus service
  2005-07-11 18:54   ` Claudio Takahasi
@ 2005-07-11 19:27     ` Marcel Holtmann
  2005-07-11 20:16       ` Claudio Takahasi
  0 siblings, 1 reply; 7+ messages in thread
From: Marcel Holtmann @ 2005-07-11 19:27 UTC (permalink / raw)
  To: bluez-devel

Hi Claudio,

> According with your emails, bluetoothd shall provide 
> methods for settings and send signals.
> I finished the D-Bus services for pand, now we need
> define how organize these services. 
> 
> In my opinion the bluetoothd should be responsible for
> provide all D-Bus services, including pand, hidd, cip, ...
> Create D-Bus services for each daemon will require 
> monitor a lot of dbus connections. It's easier and more
> efficient create "profile objects" for each profile inside
> bluetoothd. Buetoothd can monitor different interfaces and 
> objects.

this is my idea and then you can write a simple Python script and use
all Bluetooth stuff over D-Bus. This way it should be possible to
implement some graphical tools for using Bluetooth.

> Currently, my D-Bus pand implementation is providing:
>   -adapters: show local bluetooth adapters
>   -connect:connect to a bluetooth device
>   -connections: show active connections
>   -disconnect: kill connections
>   -enable-bridge: enable automatic bridge creation on listening
>   -find: search for a service
>   -listen: start/stop listen for bluetooth connections
>   -role: switch the role MASTER|SLAVE
>   -udhcp:enable UDHCP on listen or connect
>   -init: initialize the bluez pan daemon (pand)
>   -kill: kill the pand
> 
> 
> If you see the code of D-Bus hcid, the D-Bus message control functions
> are similar. The best approach is move all to daemon directory.

The bluetoothd should handle every of these things. However the main
focus at the moment is device configuration and the handling of security
related stuff. I am not 100% sure about the interface, but in general I
like to use something similar to Hal.

Adding interfaces for PAN, HID etc. is not so important for me. Once we
have the core stuff running, the should be really easy then.

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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Bluez-devel] pand D-Bus service
  2005-07-11 19:27     ` Marcel Holtmann
@ 2005-07-11 20:16       ` Claudio Takahasi
  2005-07-11 21:26         ` Marcel Holtmann
  0 siblings, 1 reply; 7+ messages in thread
From: Claudio Takahasi @ 2005-07-11 20:16 UTC (permalink / raw)
  To: bluez-devel

Hi Marcel,

My project goal is provide D-Bus support for pand=20
including automatic bridge creation and integration=20
with udhcp.

Setup the bt adapter is a dependency for me. bluetoothd is
the daemon that was missing for provide  adapter configuration,=20
periodic inquiry and link setup. Some services(list adapters,=20
search, role switch) are being provided by pand D-Bus.=20
I know that is a incorrect approach, but they are required.

I am running behind the schedule, there are a lot projects
(UPnP app, games) that require this feature for setup PANs.=20
Is it possible integrate the D-Bus services for pand?

After that can help you moving all code to bluetoothd.

If you what I can help you developing bluetoothd?

Regarding security, what are exactly the points that need
by improved or developed?

Regards,
Claudio.

On 7/11/05, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Claudio,
>=20
> > According with your emails, bluetoothd shall provide
> > methods for settings and send signals.
> > I finished the D-Bus services for pand, now we need
> > define how organize these services.
> >
> > In my opinion the bluetoothd should be responsible for
> > provide all D-Bus services, including pand, hidd, cip, ...
> > Create D-Bus services for each daemon will require
> > monitor a lot of dbus connections. It's easier and more
> > efficient create "profile objects" for each profile inside
> > bluetoothd. Buetoothd can monitor different interfaces and
> > objects.
>=20
> this is my idea and then you can write a simple Python script and use
> all Bluetooth stuff over D-Bus. This way it should be possible to
> implement some graphical tools for using Bluetooth.
>=20
> > Currently, my D-Bus pand implementation is providing:
> >   -adapters: show local bluetooth adapters
> >   -connect:connect to a bluetooth device
> >   -connections: show active connections
> >   -disconnect: kill connections
> >   -enable-bridge: enable automatic bridge creation on listening
> >   -find: search for a service
> >   -listen: start/stop listen for bluetooth connections
> >   -role: switch the role MASTER|SLAVE
> >   -udhcp:enable UDHCP on listen or connect
> >   -init: initialize the bluez pan daemon (pand)
> >   -kill: kill the pand
> >
> >
> > If you see the code of D-Bus hcid, the D-Bus message control functions
> > are similar. The best approach is move all to daemon directory.
>=20
> The bluetoothd should handle every of these things. However the main
> focus at the moment is device configuration and the handling of security
> related stuff. I am not 100% sure about the interface, but in general I
> like to use something similar to Hal.
>=20
> Adding interfaces for PAN, HID etc. is not so important for me. Once we
> have the core stuff running, the should be really easy then.
>=20
> Regards
>=20
> Marcel
>=20
>=20
>=20
>=20
> -------------------------------------------------------
> This SF.Net email is sponsored by the 'Do More With Dual!' webinar happen=
ing
> 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,
> AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
> 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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Bluez-devel] pand D-Bus service
  2005-07-11 20:16       ` Claudio Takahasi
@ 2005-07-11 21:26         ` Marcel Holtmann
  2005-07-12 17:07           ` Claudio Takahasi
  0 siblings, 1 reply; 7+ messages in thread
From: Marcel Holtmann @ 2005-07-11 21:26 UTC (permalink / raw)
  To: bluez-devel

Hi Claudio,

> My project goal is provide D-Bus support for pand 
> including automatic bridge creation and integration 
> with udhcp.
> 
> Setup the bt adapter is a dependency for me. bluetoothd is
> the daemon that was missing for provide  adapter configuration, 
> periodic inquiry and link setup. Some services(list adapters, 
> search, role switch) are being provided by pand D-Bus. 
> I know that is a incorrect approach, but they are required.
> 
> I am running behind the schedule, there are a lot projects
> (UPnP app, games) that require this feature for setup PANs. 
> Is it possible integrate the D-Bus services for pand?

as long as you don't introduce too much dependencies, there should be no
problem to include it. Simple send new versions to the mailing list and
when I have more time, I review them.

> After that can help you moving all code to bluetoothd.

I am going to develop it from scratch. I still have to solve some basic
problem with the new kernel interface.

> If you what I can help you developing bluetoothd?

Any help is always welcome. I will commit all code and compile it by
default, but don't install it.

> Regarding security, what are exactly the points that need
> by improved or developed?

The PIN code and link key handling for the kernel security manager.

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
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Bluez-devel] pand D-Bus service
  2005-07-11 21:26         ` Marcel Holtmann
@ 2005-07-12 17:07           ` Claudio Takahasi
  0 siblings, 0 replies; 7+ messages in thread
From: Claudio Takahasi @ 2005-07-12 17:07 UTC (permalink / raw)
  To: bluez-devel

[-- Attachment #1: Type: text/plain, Size: 2769 bytes --]

Hi Marcel,

The latest patch is available in the address below:

http://www.indt.org.br/maemo/zeroconf/bluez/bluez-dbus-patch-00.04
http://www.indt.org.br/maemo/zeroconf/bluez/libbluezdbus-0.2.tar.gz
Dependencies: dbus, libbdrige, udhcp (under conditional flags)

libbluezdbus-0.2.tar.gz is the library to hide D-Bus message 
details(d-bus connection, message exchange, ...). Inside this
library there is a test application (sample/client).

For more information read the RELEASE_NOTES file attached.

My next action is implement periodic inquiry. This feature should be 
provided by bluetoothd. Before integrate this code we have to define
the object path and interface name properly.

Regards,
Claudio.

On 7/11/05, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Claudio,
> 
> > My project goal is provide D-Bus support for pand
> > including automatic bridge creation and integration
> > with udhcp.
> >
> > Setup the bt adapter is a dependency for me. bluetoothd is
> > the daemon that was missing for provide  adapter configuration,
> > periodic inquiry and link setup. Some services(list adapters,
> > search, role switch) are being provided by pand D-Bus.
> > I know that is a incorrect approach, but they are required.
> >
> > I am running behind the schedule, there are a lot projects
> > (UPnP app, games) that require this feature for setup PANs.
> > Is it possible integrate the D-Bus services for pand?
> 
> as long as you don't introduce too much dependencies, there should be no
> problem to include it. Simple send new versions to the mailing list and
> when I have more time, I review them.
> 
> > After that can help you moving all code to bluetoothd.
> 
> I am going to develop it from scratch. I still have to solve some basic
> problem with the new kernel interface.
> 
> > If you what I can help you developing bluetoothd?
> 
> Any help is always welcome. I will commit all code and compile it by
> default, but don't install it.
> 
> > Regarding security, what are exactly the points that need
> > by improved or developed?
> 
> The PIN code and link key handling for the kernel security manager.
> 
> 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
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>

[-- Attachment #2: RELEASE_NOTES --]
[-- Type: application/octet-stream, Size: 4215 bytes --]


D-BUS service Release Notes for PAN daemon of bluez-utils

bluez-utils version: 2.18

***** Added features:
Initial version. Added the initial D-Bus services
for bluez pand. The following services are provided:
- daemon start/stop
- connect/disconnect
- search
- listen start/stop
- udhcp integration for local link address assigment.
  See additional comment at end of this document.
- automatic bridge creation. 
  See additional comment at end of this document.

  
***** Fixed Bugs:

bug #1 type: defect
The activate service is not working in the system bus
fixed version: bluez-dbus-patch-00.04

bug #4:  type: enhancement
Automatic bridge creation
- Enable automatic bridge creation on listen service
fixed version: bluez-dbus-patch-00.04

bug #10: type: enhancement
UDHCP integration. Call udhcp daemon for the
bridge (panX) interface.
fixed version: bluez-dbus-patch-00.04

**** Known Bugs:

bug #2 type: defect
the search service is blocking, the pand D-BUS service 
must be changed. A callback function should be used.
fixed version:

bug #3: type: enhancement
Add signal support
 - signal for notify disconnection
 - signal for notify new device found
fixed version:
 

bug #5: type: enhancement
Periodic inquiry
fixed version:

bug #6: type: enhancement
Develop a better UI for the client app
fixed version:

bug #7: type: enhancement
Add a parameter to search services on specific 
device class (desktop only, mobile phones only, ...)
fixed version:

bug #8: type: enhancement
Add D-BUS service for dund
fixed version:

bug #9: type: enhancement
Add D-BUS service for hidd
fixed version:

bug #11: type: enhancement
Makefile must be changed to install
all D-Bus configuration files
fixed version:

bug #12: type: defect
bnepX interfaces must be removed when
the daemon exits.
fixed version:


***** Additional Comments:

1. How use link local address daemon(UDHCP with Zeroconf support)?
There is patch UDHCP version with Zeroconf support
http://www.indt.org.br/maemo/zeroconf/udhcpc/
  - run-udhcp script
  this script must be copied to /etc/bluetooth/pan
  check if there is execution permission

2. Bridge comments
No matter the device service(NAP,PANU, GN) only one bridge interface 
pan0 will be created on each device. Incomming and outgoing connections
will be added to the same bridge


3. D-Bus start service 
In order enable start pand using a dbus client it is necessary
perform configurations.
  - security policy file the directory /etc/dbus-1/system.d/
  Copy the file panz.conf to the directory /etc/dbus-1/system.d/

	<!-- This configuration file specifies the required security policies
	for bluez-pand to work. -->
	
	<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
	"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
	<busconfig>
	
	<!-- ../system.conf have denied everything, so we just punch some holes -->
	
	<policy context="default">
	<allow own="org.bluez.pand"/>
	
	<allow send_destination="org.bluez.pand"/>
	<allow receive_sender="org.bluez.pand"/>
	
	<allow send_path="/org/bluez/pand"/>
	</policy>
	
	</busconfig>  
  
  - check service file dir
  open the D-Bus system.conf file and check
  if the is a entry for servicedir:
  "<servicedir>/usr/share/dbus-1/services/system</servicedir>"
  
  - panz.service
  copy this file to the system service directory "<servicedir>"
  # Service description file
	[D-BUS Service]
	Name=org.bluez.pand
	Exec=/etc/bluetooth/pan/run-pand.sh

  - run-pand.sh 
  this script shoult be copied to /etc/bluetooth/pan directory 
  add execution permission
	#!/bin/sh
	pand --dbus
	
	
HOWTO setup DBUS environment

1. checking dbus-daemon
   type: $ps -ef | grep dbus
   "dbus-daemon --system"  should be displayed
   
2. check pand dbus service policy file (panz.conf)
   The file panz.conf must be located at: /etc/dbus-1/system.d/
   
3. check pand service file (panz.service)
   Check the <servicedir> attribute in the system.conf 
   suggestion: /usr/share/dbus-1/services/system
   
4. check the run-pand.sh
   Check if this script is located at /etc/bluetooth/pan/
   
5. Client can initialize the pand service using
   D-BUS start method or typing "pand --dbus" on
   a root terminal.
   

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-07-12 17:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-08 18:37 [Bluez-devel] pand D-Bus service Claudio Takahasi
2005-07-08 19:08 ` Marcel Holtmann
2005-07-11 18:54   ` Claudio Takahasi
2005-07-11 19:27     ` Marcel Holtmann
2005-07-11 20:16       ` Claudio Takahasi
2005-07-11 21:26         ` Marcel Holtmann
2005-07-12 17:07           ` Claudio Takahasi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox