All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] Regarding a2recv
Date: Mon, 09 May 2005 03:03:47 +0200	[thread overview]
Message-ID: <1115600627.8949.93.camel@pegasus> (raw)
In-Reply-To: <20050509025805.331c34c7.henryk@ploetzli.ch>

Hi Henryk,

> Am Mon, 09 May 2005 02:01:36 +0200 schrieb Marcel Holtmann:
> 
> > I suspect that it is waiting for a role switch to happen.
> 
> Either that isn't it or I'm doing it wrong. There should be two
> principal ways to archieve this, right? 
> 
> a) hciconfig hci0 lm master
> If I do this I don't get a complete connection at all. hcidump shows
> > HCI Event: Connect Request (0x04) plen 10
> < HCI Command: Accept Connection Request (0x01|0x0009) plen 7
>     bdaddr 00:08:F4:35:05:3C role 0x00
>     Role: Master
> > HCI Event: Command Status (0x0f) plen 4
> > HCI Event: Role Change (0x12) plen 8
> > HCI Event: Connect Complete (0x03) plen 11
> but nothing shows up on a2recv. 
> 
> b) (I got this from the bthid code)
> getsockopt(fd, SOL_L2CAP, L2CAP_LM, &opt, &len)
> opt |= L2CAP_LM_MASTER;
> setsockopt(fd, SOL_L2CAP, L2CAP_LM, &opt, sizeof(opt))
> 
> I'm not sure on which fd I should apply this. If I do it on the streamfd
> right after it has been established the behaviour is just as normal
> (e.g. 6 second hang, then disconnect).
> 
> If I do it with the listening socket right in the beginning I get the
> same as with hciconfig above. (I swear I got a "Role change not allowed"
> message from kdebluetoothd somewhere in between, but I can't reproduce
> that.)

you must do it on the HCI level at the correct time. Look at the
function hci_switch_role() for more details.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2005-05-09  1:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-05 12:45 [Bluez-devel] Regarding a2recv Mayank Batra
2005-05-05 13:14 ` Marcel Holtmann
2005-05-05 14:40 ` Brad Midgley
2005-05-06  4:05 ` Henryk Plötz
2005-05-08 12:50   ` Mayank Batra
2005-05-08 22:54     ` Henryk Plötz
2005-05-09  0:01       ` Marcel Holtmann
2005-05-09  0:58         ` Henryk Plötz
2005-05-09  1:03           ` Marcel Holtmann [this message]
2005-05-09  1:35             ` Henryk Plötz
2005-05-09  1:44               ` Marcel Holtmann
2005-05-09  4:29               ` Brad Midgley
2005-05-09 12:48                 ` Henryk Plötz
2005-05-09 12:58                   ` Marcel Holtmann
2005-05-09 16:25                   ` Brad Midgley
2005-05-09  4:29       ` Brad Midgley
2005-05-09 12:38         ` Henryk Plötz
2005-05-09 21:31           ` Brad Midgley
2005-05-10  7:20       ` Mayank Batra

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=1115600627.8949.93.camel@pegasus \
    --to=marcel@holtmann.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.