All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Fulko Hew <fulko.hew@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: Help with LE Create Connection
Date: Mon, 23 Apr 2018 19:02:25 +0200	[thread overview]
Message-ID: <8B5DE5B9-93AD-4385-932C-880F08BE8F4E@holtmann.org> (raw)
In-Reply-To: <CAGuV3hM+GPfDQf5C6-Ug8R+QPe-xo361TgVTem2HjWjnZ0To2Q@mail.gmail.com>

Hi Fulko,

> I'm doing my first Bluetooth app, and I have a specific question and a
> general question:
> 
> 1/ Where can I find documentation on the BlueZ API?
>   I've searched and haven't found anything yet.
> 
> 2/ I've captured a trace of an existing conversation off of my Android phone,
>   and I'm trying to re-create it via my own app using BlueZ.
>   I've gotten to the point of trying to do an LE Create Connection
> via hci_le_create_conn()
>   and my first stumbling block is the value of the 'peer address type'.
>   From my investigation, I need to use the 'public' address type
> which according to
>   the spec, and Wireshark is a value of 0x00, but bluetooth.h defines
> 'public' as 0x01
>   (as per the following extract).  Can anyone explain it to me?
> 
>   #define BDADDR_BREDR           0x00
>   #define BDADDR_LE_PUBLIC       0x01
>   #define BDADDR_LE_RANDOM       0x02

why not use the bluetoothd D-Bus GATT APIs for your application. It will create all needed connections. Manually doing HCI is the wrong approach since that is owned by the kernel.

Regards

Marcel


      reply	other threads:[~2018-04-23 17:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAGuV3hPxvhDbsO1TZLcQwtQuAWrm5TqQrH=zG3UrFsvjfZOeFA@mail.gmail.com>
2018-04-21  2:01 ` Fwd: Help with LE Create Connection Fulko Hew
2018-04-23 17:02   ` Marcel Holtmann [this message]

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=8B5DE5B9-93AD-4385-932C-880F08BE8F4E@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=fulko.hew@gmail.com \
    --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 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.