linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: jcaden@libresoft.es
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: Problems with bt_io_listen
Date: Thu, 25 Mar 2010 17:22:27 +0200	[thread overview]
Message-ID: <2d5a2c101003250822g34187992m8509e17e825f50c8@mail.gmail.com> (raw)
In-Reply-To: <201003251545.52988.jcaden@libresoft.es>

Hi,

On Thu, Mar 25, 2010 at 4:45 PM, José Antonio Santos Cadenas
<jcaden@libresoft.es> wrote:
> Hi all,
>
> We are developing an implementation of HDP and MCAP for bluez. We are triying
> to perform many connections between two devices but when we make the second
> connection it is not created correctly.
>
> We are using a defer connection (we passed a confirm callback to the
> bt_io_listen function) and we think that we are missing something but  we
> can't find what. If we used the connection callback (not defer) all the
> connections are done successfully.
>
> We are listening with the following code:
>
> static void confirm_cb(GIOChannel *chan, gpointer user_data)
> {
>        ...
>        node->chan = g_io_channel_ref(chan);
>        ...
>        /* All is ok */
>        return;
> drop:
>        /* Connection refused */
>        g_io_channel_shutdown(chan, TRUE, NULL);
> }

Im not really sure what is the problem but maybe it is the missing
bt_io_accept, but of course it can be that you just hide it in those
...

> ....
> chan = bt_io_listen(BT_IO_L2CAP, NULL, confirm_cb, NULL,
>                                NULL, &gerr,
>                                BT_IO_OPT_SOURCE_BDADDR, &src,
>                                BT_IO_OPT_PSM, 0x1001,
>                                BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
>                                BT_IO_OPT_INVALID);
> ...

The listen part at least seems ok.


-- 
Luiz Augusto von Dentz
Computer Engineer

  reply	other threads:[~2010-03-25 15:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-25 14:45 Problems with bt_io_listen José Antonio Santos Cadenas
2010-03-25 15:22 ` Luiz Augusto von Dentz [this message]
2010-03-25 16:13   ` sancane

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=2d5a2c101003250822g34187992m8509e17e825f50c8@mail.gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=jcaden@libresoft.es \
    --cc=linux-bluetooth@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).