Linux bluetooth development
 help / color / mirror / Atom feed
From: Frederic Danis <frederic.danis@palmsource.com>
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] Problem to really close RFComm socket
Date: Fri, 08 Apr 2005 18:56:27 +0200	[thread overview]
Message-ID: <4256B7BB.3090800@palmsource.com> (raw)

Hello,

I am trying to use RFComm sockets, but I have a problem when I close the 
socket, it does not close RFComm or ACL connection.
So, if I try to reconnect I got an error 0x10. I used hcidump and 
nothing happens when close is called.
The only way to really close is to stop the app.

what I use is :
        laddr.rc_family = AF_BLUETOOTH;
        laddr.rc_bdaddr = *BDADDR_ANY;
        laddr.rc_channel = 0;
       
        if (bind(rfcSocket, (struct sockaddr *)&laddr, sizeof(laddr)) < 0)
            return -1;
      
        raddr.rc_family = AF_BLUETOOTH;
        raddr.rc_bdaddr = SESSION(btAddr);
        raddr.rc_channel = channel;
        if (connect(rfcSocket, (struct sockaddr *)&raddr, sizeof(raddr)) 
< 0)
            return -1;

       ........

       close(rfcSocket);

I think I have forgot something, but what ?

Regards
Fred


-------------------------------------------------------
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

             reply	other threads:[~2005-04-08 16:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-08 16:56 Frederic Danis [this message]
2005-04-08 17:28 ` [Bluez-devel] Problem to really close RFComm socket 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=4256B7BB.3090800@palmsource.com \
    --to=frederic.danis@palmsource.com \
    --cc=bluez-devel@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