Re: Question about bluetooth simultaneous connections
"Brad Midgley" <[email protected]>
| Newsgroups | gmane.linux.bluez.user |
|---|---|
| Message-ID | <[email protected]> |
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/