Linux bluetooth development
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: wim delvaux <wim.delvaux@adaptiveplanet.com>
Cc: BlueZ Mailing List <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] killing a persisted pand session
Date: Sun, 07 Mar 2004 02:50:59 +0100	[thread overview]
Message-ID: <1078624259.2807.14.camel@pegasus> (raw)
In-Reply-To: <200403070242.16684.wim.delvaux@adaptiveplanet.com>

Hi Wim,

> 	I was wondering WHY pand is kept running after the BNEP is set up.
> 	For the persist option I can understand since i presume pand monitors the
> 	connection it had to establish and if it 'downs' it restarts it.  However if
> 	this feature is NOT requested (i.e. no --presist is given), then WHY is pand 
> still alive after the setup of the connection.

if you don't use --presist the "pand --connect" process exit after the
full BNEP connection is established. Try "--nodetach" to see it.

> 	The reason for this question is that I was trying to determine a fail safe
> 	integration into hotplug/interfaces.  Seems that if you pand -k the bnep
> 	module is deactivated and ifdown does no longer work properly (and hence
> 	the dhcp server is not stopped properly and does not RELEASE its lease)

If the BNEP connection is deleted you get a remove event from net.agent
hotplug script. If you have problems with DHCP put a bridge interface
above your bnep0 interface.

> 	I have noticed something else here.  I am testing BT between my Ipaq and
> 	a usb BT dongle.  When I suspend my Ipaq the pand on my desktop (the one that
> 	is listening) blocks on an ioctl after it receives the connection request. (I 
> checked with strace on that listening pand)
> 
> 	The iotcl that blocks is the one in bnep_connadd.  Because of this blocking 
> (for I do not know what reason) the connection is not established (no IP is 
> set up)
> 
> static int bnep_connadd(int sk, uint16_t role, char *dev)
> {
>         struct bnep_connadd_req req;
> 
>         strcpy(req.device, dev);
>         req.sock = sk;
>         req.role = role;
>         /* THIS IS THE ONE THAT BLOCKS */
>         if (ioctl(ctl, bnepconnadd, &req))
>                 return -1;
>         strcpy(dev, req.device);
>         return 0;
> }
> 	Do you know what that ioctl is supposed to do and why it blocks on something

This ioctl gives the control of your incoming connection to the kernel
BNEP module, but I don't know why it can block.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

  reply	other threads:[~2004-03-07  1:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-06 23:58 [Bluez-users] killing a persisted pand session wim delvaux
2004-03-07  1:17 ` Marcel Holtmann
2004-03-07  1:21   ` wim delvaux
2004-03-07  1:33     ` Marcel Holtmann
2004-03-07  1:42       ` wim delvaux
2004-03-07  1:50         ` Marcel Holtmann [this message]
2004-03-07  1:44       ` wim delvaux
2004-03-07  1:55         ` Marcel Holtmann
2004-03-07  2:07           ` wim delvaux
2004-03-07  1:45       ` wim delvaux
2004-03-07  1:57         ` Marcel Holtmann
2004-03-07  2:10           ` wim delvaux
2004-03-07  2:37             ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1078624259.2807.14.camel@pegasus \
    --to=marcel@holtmann.org \
    --cc=bluez-users@lists.sourceforge.net \
    --cc=wim.delvaux@adaptiveplanet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox