public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-users] Only one pand-daemon?
@ 2007-07-02 21:49 Mats Erik Andersson
  2007-07-03  3:33 ` Marcel Holtmann
  0 siblings, 1 reply; 8+ messages in thread
From: Mats Erik Andersson @ 2007-07-02 21:49 UTC (permalink / raw)
  To: Bluez-users

Hello all,

I am facing the problem that I cannot start more than
one listening pand-daemon, in spite of using two usb-dongles.
The second call with 'pand --listen -e bdaddr ...' immediately
ends with return value zero and no traces in any log file.
I am running Bluez-utils 3.7 on Debian Etch. Slowly I am 
beginning to think that it could be DBUS that haunts me, but I
have just begun studying the source code of pand to make sure.
Any pointers are welcome.!


Best regards,	Mats Erik Andersson


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* Re: [Bluez-users] Only one pand-daemon?
  2007-07-02 21:49 [Bluez-users] Only one pand-daemon? Mats Erik Andersson
@ 2007-07-03  3:33 ` Marcel Holtmann
  2007-07-03 11:39   ` Mats Erik Andersson
  0 siblings, 1 reply; 8+ messages in thread
From: Marcel Holtmann @ 2007-07-03  3:33 UTC (permalink / raw)
  To: BlueZ users

Hi Mats,

> I am facing the problem that I cannot start more than
> one listening pand-daemon, in spite of using two usb-dongles.
> The second call with 'pand --listen -e bdaddr ...' immediately
> ends with return value zero and no traces in any log file.
> I am running Bluez-utils 3.7 on Debian Etch. Slowly I am 
> beginning to think that it could be DBUS that haunts me, but I
> have just begun studying the source code of pand to make sure.

I have no idea why you actually need two pand, but you can call pand
with -i hciX to bind it to a specific adapter.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* Re: [Bluez-users] Only one pand-daemon?
  2007-07-03  3:33 ` Marcel Holtmann
@ 2007-07-03 11:39   ` Mats Erik Andersson
  2007-07-04  1:48     ` Marcel Holtmann
  0 siblings, 1 reply; 8+ messages in thread
From: Mats Erik Andersson @ 2007-07-03 11:39 UTC (permalink / raw)
  To: BlueZ users

Dear Marcel and all other fellows,

tis 2007-07-03 klockan 05:33 +0200 skrev Marcel Holtmann:
> Hi Mats,
> 
> > I am facing the problem that I cannot start more than
> > one listening pand-daemon, in spite of using two usb-dongles.
> > The second call with 'pand --listen -e bdaddr ...' immediately
> > ends with return value zero and no traces in any log file.
> > I am running Bluez-utils 3.7 on Debiif test "$PAND_ENABLED" != "0"; then
  
> an Etch. Slowly I am 
> > beginning to think that it could be DBUS that haunts me, but I
> > have just begun studying the source code of pand to make sure.
> 
> I have no idea why you actually need two pand, but you can call pand
> with -i hciX to bind it to a specific adapter.


I need more than one Bluetooth radio, i.e. usb-dongle, each providing
a NAP service, since I am not content with only seven clients in one
piconet. Hence my belief was that I could simply start one pand-daemon
for each dongle and have my system up and running.

To that end I made an alteration to /etc/init.d/bluetooth to 
contain (within start_pand()) essentially

HCIDEVICES="0 1"
HCIBDADDR=(bdaddr0 bdaddr1)  # in numerical values!

if test "$PAND_ENABLED" != "0"; then
  for nr in $HCIDEVICES; do
    start-stop-daemon --start --quiet --exec $PAND_DAEMON -- \
         $PAND_OPTIONS --devup /etc/bluetooth/pan/dev-up \
         --ethernet "bnep$nr%d" --device ${HCIBDADDR[$nr]} \
         --pidfile /var/run/pand.${nr}.pid
    /usr/local/sbin/passkey-agent Buhh ${HCIBDADDR[$nr]} &
  done
  log_progress_msg "pand"
fi


The outcome is that only hci0 is serviced by pand and that it
configures bnep00 at first call. There is no trace of a service
for hci1, neither in the process list, in syslog, nor does it
respond to "pand --connect bdadd1" from a remote machine.

Do you disagree to a need of servicing more than one piconet
from a single machine, or is this not even implemented in the
present day BlueZ-stack? Again, my server runs kernel 2.6.18
with Debian Etch and hence Bluez-utils 3.7. Have the later
issues of Bluez-utils diversified in the above respect?

Best regards,   Mats E A

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* Re: [Bluez-users] Only one pand-daemon?
  2007-07-03 11:39   ` Mats Erik Andersson
@ 2007-07-04  1:48     ` Marcel Holtmann
  2007-07-04 13:43       ` [Bluez-users] dbus problem, Was: " Mats Erik Andersson
  0 siblings, 1 reply; 8+ messages in thread
From: Marcel Holtmann @ 2007-07-04  1:48 UTC (permalink / raw)
  To: BlueZ users

Hi Mats,

> > > I am facing the problem that I cannot start more than
> > > one listening pand-daemon, in spite of using two usb-dongles.
> > > The second call with 'pand --listen -e bdaddr ...' immediately
> > > ends with return value zero and no traces in any log file.
> > > I am running Bluez-utils 3.7 on Debiif test "$PAND_ENABLED" != "0"; then
>   
> > an Etch. Slowly I am 
> > > beginning to think that it could be DBUS that haunts me, but I
> > > have just begun studying the source code of pand to make sure.
> > 
> > I have no idea why you actually need two pand, but you can call pand
> > with -i hciX to bind it to a specific adapter.
> 
> 
> I need more than one Bluetooth radio, i.e. usb-dongle, each providing
> a NAP service, since I am not content with only seven clients in one
> piconet. Hence my belief was that I could simply start one pand-daemon
> for each dongle and have my system up and running.

by default pand listens on all attached dongles. So that should work out
of the box.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* [Bluez-users]  dbus problem,   Was:  Only one pand-daemon?
  2007-07-04  1:48     ` Marcel Holtmann
@ 2007-07-04 13:43       ` Mats Erik Andersson
  2007-07-05  8:10         ` Marcel Holtmann
  0 siblings, 1 reply; 8+ messages in thread
From: Mats Erik Andersson @ 2007-07-04 13:43 UTC (permalink / raw)
  To: BlueZ users

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

Dear Marcel,

I did find one solution to this:

ons 2007-07-04 klockan 03:48 +0200 skrev Marcel Holtmann:
> Hi Mats,
> 
> > > > I am facing the problem that I cannot start more than
> > > > one listening pand-daemon, in spite of using two usb-dongles.

> > > > beginning to think that it could be DBUS that haunts me, but I
> > > > have just begun studying the source code of pand to make sure.
> > > 
> > 
> > I need more than one Bluetooth radio, i.e. usb-dongle, each providing
> > a NAP service, since I am not content with only seven clients in one
> > piconet. Hence my belief was that I could simply start one pand-daemon
> > for each dongle and have my system up and running.
> 
> by default pand listens on all attached dongles. So that should work out
> of the box.
> 

I made an addition to the dbus-configuration in bluez-hcid.conf by
inserting paths for hci0 and hci1 for root and console like this:

<policy user="root">
   <allow own="org.bluez"/>
   <allow send_path="/org/bluez/hci0"/>
   <allow send_path="/org/bluez/hci1"/>
</policy>

After that a single listening PAN daemon is receptive on both
usb-dongles. My full configuration is attached here. It was already
previously expanded, but it was the four lines with 'hci#' that brought
the magic. I myself and probably other bluez-users, would improve our
knowledge, could you be so kind as to commenting on what additions
that could/should be eliminated from my configuration file. Please!

Best regards,    Mats E A

[-- Attachment #2: bluez-hcid.conf.dbus --]
[-- Type: text/plain, Size: 936 bytes --]

<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

 <policy user="root">
   <allow own="org.bluez"/>
   <allow send_path="/org/bluez/hci0"/>
   <allow send_path="/org/bluez/hci1"/>
 </policy>

 <policy at_console="true">
   <allow send_destination="org.bluez.Adapter"/>
   <allow receive_sender="org.bluez.Adapter"/>

   <allow send_path="/org/bluez/Adapter"/>
   <allow send_path="/org/bluez/hci0"/>
   <allow send_path="/org/bluez/hci1"/>

   <allow send_destination="org.bluez.Manager"/>
   <allow receive_sender="org.bluez.Manager"/>

   <allow send_path="/org/bluez/Manager"/>

   <allow send_destination="org.bluez.PasskeyAgent"/>
   <allow receive_sender="org.bluez.PasskeyAgent"/>

   <allow send_path="/org/bluez/PasskeyAgent"/>

   <allow send_destination="org.bluez.Security"/>
   <allow receive_sender="org.bluez.Security"/>
 </policy>

</busconfig>

[-- Attachment #3: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* Re: [Bluez-users] dbus problem,   Was:  Only one pand-daemon?
  2007-07-04 13:43       ` [Bluez-users] dbus problem, Was: " Mats Erik Andersson
@ 2007-07-05  8:10         ` Marcel Holtmann
  2007-07-06  9:53           ` [Bluez-users] dbus problem for pand service Mats Erik Andersson
  0 siblings, 1 reply; 8+ messages in thread
From: Marcel Holtmann @ 2007-07-05  8:10 UTC (permalink / raw)
  To: BlueZ users

Hi Mats,

> > by default pand listens on all attached dongles. So that should work out
> > of the box.
> > 
> 
> I made an addition to the dbus-configuration in bluez-hcid.conf by
> inserting paths for hci0 and hci1 for root and console like this:
> 
> <policy user="root">
>    <allow own="org.bluez"/>
>    <allow send_path="/org/bluez/hci0"/>
>    <allow send_path="/org/bluez/hci1"/>
> </policy>
> 
> After that a single listening PAN daemon is receptive on both
> usb-dongles. My full configuration is attached here. It was already
> previously expanded, but it was the four lines with 'hci#' that brought
> the magic. I myself and probably other bluez-users, would improve our
> knowledge, could you be so kind as to commenting on what additions
> that could/should be eliminated from my configuration file. Please!

that is non-sense. The pand is not interacting with D-Bus at all. Some
other changes must have made this working for you.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* Re: [Bluez-users] dbus problem for pand service
  2007-07-05  8:10         ` Marcel Holtmann
@ 2007-07-06  9:53           ` Mats Erik Andersson
  2007-07-11  9:54             ` Marcel Holtmann
  0 siblings, 1 reply; 8+ messages in thread
From: Mats Erik Andersson @ 2007-07-06  9:53 UTC (permalink / raw)
  To: BlueZ users

Hi Marcel,

tor 2007-07-05 klockan 10:10 +0200 skrev Marcel Holtmann:
> Hi Mats,
> =

> > > by default pand listens on all attached dongles. So that should work =
out
> > > of the box.
> > > =

> > =

> > I made an addition to the dbus-configuration in bluez-hcid.conf by
> > inserting paths for hci0 and hci1 for root and console like this:
> > =

> > After that a single listening PAN daemon is receptive on both
> > usb-dongles.

> that is non-sense. The pand is not interacting with D-Bus at all. Some
> other changes must have made this working for you.


a harsh word to call it 'non-sense' (zum st=FCtzig machen!). True, pand
does not by itself call upon dbus, but the servicing daemon hcid does
depend on dbus and all the more does passkey-agent for the
authentications of pin codes depend in dbus. The standard code
passkey-agent.c even contains

if (use_default) {
       path =3D "/org/bluez";
       method =3D "RegisterDefaultPasskeyAgent";
} else {
       path =3D "/org/bluez/hci0";
       method =3D "RegisterPasskeyAgent";
}

and the corresponding part for unregistering. It seems to me that =

thus it is absolutely essential to use 'passkey-agent -d OpenUp'
to activate more than one dongle, since individual agents always
tie themselfs to hci0. I do not understand all details yet, but the
above code snippet shows that I will develop my own tailored
passkey-agent for my own application. That is the natural state of
affairs in our trade. Right! One always learn most by the mistakes
and by scrutinizing our source code. =


Regards     Mats E A


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

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

* Re: [Bluez-users] dbus problem for pand service
  2007-07-06  9:53           ` [Bluez-users] dbus problem for pand service Mats Erik Andersson
@ 2007-07-11  9:54             ` Marcel Holtmann
  0 siblings, 0 replies; 8+ messages in thread
From: Marcel Holtmann @ 2007-07-11  9:54 UTC (permalink / raw)
  To: BlueZ users

SGkgTWF0cywKCj4gPiA+ID4gYnkgZGVmYXVsdCBwYW5kIGxpc3RlbnMgb24gYWxsIGF0dGFjaGVk
IGRvbmdsZXMuIFNvIHRoYXQgc2hvdWxkIHdvcmsgb3V0Cj4gPiA+ID4gb2YgdGhlIGJveC4KPiA+
ID4gPiAKPiA+ID4gCj4gPiA+IEkgbWFkZSBhbiBhZGRpdGlvbiB0byB0aGUgZGJ1cy1jb25maWd1
cmF0aW9uIGluIGJsdWV6LWhjaWQuY29uZiBieQo+ID4gPiBpbnNlcnRpbmcgcGF0aHMgZm9yIGhj
aTAgYW5kIGhjaTEgZm9yIHJvb3QgYW5kIGNvbnNvbGUgbGlrZSB0aGlzOgo+ID4gPiAKPiA+ID4g
QWZ0ZXIgdGhhdCBhIHNpbmdsZSBsaXN0ZW5pbmcgUEFOIGRhZW1vbiBpcyByZWNlcHRpdmUgb24g
Ym90aAo+ID4gPiB1c2ItZG9uZ2xlcy4KPiAKPiA+IHRoYXQgaXMgbm9uLXNlbnNlLiBUaGUgcGFu
ZCBpcyBub3QgaW50ZXJhY3Rpbmcgd2l0aCBELUJ1cyBhdCBhbGwuIFNvbWUKPiA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X19fCkJsdWV6LXVzZXJzIG1haWxpbmcgbGlzdApCbHVlei11c2Vyc0Bs
aXN0cy5zb3VyY2Vmb3JnZS5uZXQKaHR0cHM6Ly9saXN0cy5zb3VyY2Vmb3JnZS5uZXQvbGlzdHMv
bGlzdGluZm8vYmx1ZXotdXNlcnMK

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

end of thread, other threads:[~2007-07-11  9:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-02 21:49 [Bluez-users] Only one pand-daemon? Mats Erik Andersson
2007-07-03  3:33 ` Marcel Holtmann
2007-07-03 11:39   ` Mats Erik Andersson
2007-07-04  1:48     ` Marcel Holtmann
2007-07-04 13:43       ` [Bluez-users] dbus problem, Was: " Mats Erik Andersson
2007-07-05  8:10         ` Marcel Holtmann
2007-07-06  9:53           ` [Bluez-users] dbus problem for pand service Mats Erik Andersson
2007-07-11  9:54             ` Marcel Holtmann

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