All of lore.kernel.org
 help / color / mirror / Atom feed
From: Flávio <flavio.henriques@gmail.com>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] dd - device descriptor HELP :)
Date: Fri, 11 Feb 2005 20:10:15 +0000	[thread overview]
Message-ID: <de33c8be050211121066edf6c1@mail.gmail.com> (raw)
In-Reply-To: <1108149073.18099.50.camel@pegasus>

Hi Marcel, sorry if i wasn=B4t specific!
Ok, this is the important part of my program:
i give 2 arguments in the line command (example: program hci0 bdaddr)
***************************************************************************=
*****************************
       int ptype =3D HCI_DM1 | HCI_DM3 | HCI_DM5 | HCI_DH1 | HCI_DH3 |
HCI_DH5; protocol
       uint8_t role=3D 0x01;

=09str2ba(argv[2], &bdaddr);
=09dev_id =3D atoi ( argv[1] + 3 );     // hciX (X=3Ddev_id)
=09printf("dev_id=3D%i\n",dev_id);
=09dd =3D hci_open_dev(dev_id);     // device descriptor (dd)
=09if (dd < 0) {
=09=09perror("HCI device open failed");
=09=09exit(1);
=09}
=09printf("dd=3D%i\n",dd);
=09if (hci_create_connection(dd, &bdaddr, htobs(ptype),0, role, &handle,
25000) < 0)
=09=09perror("");
***************************************************************************=
*****************************

I have 2 dongles in my computer (hci0 and hci1) when i try to connect
with the 2 at the "same time" to a third bluetooth test (isn=B4t in my
computer), give me an error of connection!
I tryied debugging and think that the problem is because the device
discriptor that hci_open_device returns is the same even the dev_id is
diferente!
In my test the dev_id was 0 and 1, and the function in cause return
the same device descriptor!
The device descriptor shouldn=B4t be different(for different dev_id)?
Note that when i connect with only one (example hci0), the program
works well,the problem is when i try the second connection(example
hci1). Both (hci0 and hci1)is in master mode!
Why isn=B4t work?

One more thing, in the hci_create_connection the "role" argument is
oX01, what is purpuse and the values that sould have?

The last argument of hci_create_connection is diferent depending of
the situations how can i know the values that sould be used, what is
purpuse?

I hope that this time i was more specific!=20
Thanks for the time!
Regards Fl=E1vio



On Fri, 11 Feb 2005 20:11:13 +0100, Marcel Holtmann <marcel@holtmann.org> w=
rote:
> Hi Flavio,
>=20
> > I have two USB dongles connected to my pc. Using both of them in
> > MASTER mode, when i do one connection to another bluetooth device (i
> > was testing with a cell phone) for both dongles (hci1 and hci0) the
> > device descriptor for both connections is the same!!! Shouldn't they
> > be different?
> > And, apparently, because of this, when i try to set up the second
> > connection (connet my hci1 to the cell phone, when the hci0 is
> > allready conneted), it fails.
> > function used: dd =3D hci_open_dev(dev_id);
>=20
> what are you doing? I don't understand what's your problem. Be more
> specific. Show more code or commands.
>=20
> Regards
>=20
> Marcel
>=20
> -------------------------------------------------------
> 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=3D6595&alloc_id=3D14396&op=3Dclick
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>=20


--=20
Cumprimentos de Fl=E1vio!


-------------------------------------------------------
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-02-11 20:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-11 15:17 [Bluez-devel] dd - device descriptor HELP :) Flávio
2005-02-11 19:11 ` Marcel Holtmann
2005-02-11 20:10   ` Flávio [this message]
2005-02-11 20:54     ` Marcel Holtmann
2005-02-11 21:58       ` Flávio
2005-02-11 22:17         ` 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=de33c8be050211121066edf6c1@mail.gmail.com \
    --to=flavio.henriques@gmail.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 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.