From: "Brad Midgley" <bmidgley@gmail.com>
To: "BlueZ users" <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] Question about bluetooth simultaneous connections
Date: Wed, 5 Mar 2008 07:03:45 -0700 [thread overview]
Message-ID: <d89ddf300803050603k17a30359g173ab08f0756ff49@mail.gmail.com> (raw)
In-Reply-To: <2cb4fa160803050333j22a9bc9et68f30c2664d34061@mail.gmail.com>
Mohomed, you'll get closer to 7 if you try to keep your device master
on its connections. Something like calling a fn after estabishing
connections:
static void make_master(bdaddr_t bdaddr)
{
uint8_t role = 0; // 0 means master
int dd, dev_id;
dev_id = hci_for_each_dev(HCI_UP, find_conn, (long) &bdaddr);
if (dev_id < 0) {
fprintf(stderr, "make_master: Not connected.\n");
return;
}
dd = hci_open_dev(dev_id);
if (dd < 0) {
perror("HCI device open failed");
return;
}
if (hci_switch_role(dd, &bdaddr, role, 10000) < 0) {
perror("Switch role request failed");
}
close(dd);
}
--
Brad
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
next prev parent reply other threads:[~2008-03-05 14:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-05 11:33 [Bluez-users] Question about bluetooth simultaneous connections Mohamed kash
2008-03-05 11:41 ` Mohamed kash
2008-03-05 14:03 ` Brad Midgley [this message]
2008-03-07 18:41 ` Marcel Holtmann
2008-03-10 10:24 ` manuwela kanade
2008-03-10 12:30 ` Marcel Holtmann
2008-03-10 17:20 ` manuwela kanade
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=d89ddf300803050603k17a30359g173ab08f0756ff49@mail.gmail.com \
--to=bmidgley@gmail.com \
--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