public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ Mailing List <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] what API to use to disconnect an rfcomm connection
Date: Mon, 13 Dec 2004 09:11:30 +0100	[thread overview]
Message-ID: <1102925490.8750.93.camel@pegasus> (raw)
In-Reply-To: <200412122338.11557.wim.delvaux@adaptiveplanet.com>

Hi Wim,

>  if I run the command rfcomm 0 xxxxx 1 under a linux shell,
>  the rfcomm program starts up and (if run in background) runs 
>  as a connection daemon between a device file /dev/xxx and a RFCOMM
>  connection to - say - a telephone.
> 
>  On top of that rfcomm device file (/dev/xxx) you can run a pppd and
>  hence create a GPRS connection over that phone.
> 
>  now suppose I want to disconnect from that GPRS connection.  First I need
>  to terminate the ppp connection.  This is easy : just kill pppd.
> 
>  Next I need to disconnect from the phone. I.e. terminate the serial 
> connection that the rfcomm daemon is managing.

you should use "rfcomm bind 0 ..." and simply open /dev/rfcomm0. If the
last user of /dev/rfcomm0 is gone and nobody else is using the ACL link
between these devices it will disconnect. These means kill the pppd
terminates the RFCOMM connection and in the end the ACL link.

>  I could kill the 'appropriate' rfcomm daemon.  However since the PAND
>  daemon serves a very similar purpose and you can call PAND with -k 
>  to terminate a certain NAP/PANU - BNEP connection without having
>  to kill that PAND I was wondering if there is a similar call for RFCOMM.
> 
>  The source for PAND shows that calling
> 
>   ioctl(ctl, bnepconndel, .... ) 
> 
>  terminates a certain BNEP connection.
> 
>  Does RFCOMM have a similar API e.g.
>   iotcl( ctl, rfcommconndel, ... ) ?

the BNEP and RFCOMM have actually nothing in common. Their design it
quite different. If you wan't something similar then you must play with
dund.

Regards

Marcel




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

      reply	other threads:[~2004-12-13  8:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-11  1:13 [Bluez-users] what API to use to disconnect an rfcomm connection wim delvaux
2004-12-11  9:08 ` Marcel Holtmann
2004-12-11 12:14   ` wim delvaux
2004-12-11 12:34     ` Marcel Holtmann
2004-12-12 22:38       ` wim delvaux
2004-12-13  8:11         ` Marcel Holtmann [this message]

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=1102925490.8750.93.camel@pegasus \
    --to=marcel@holtmann.org \
    --cc=bluez-users@lists.sourceforge.net \
    /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