linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vieren Frank <F.Vieren@televic.com>
To: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: BlueZ - HCI adapter address via ioctl(hciSocket, HCIGETDEVINFO, &devInfo) doesn't match address via DBus for Adapter1.address
Date: Fri, 16 Nov 2018 10:37:51 +0000	[thread overview]
Message-ID: <DB7PR07MB57856A83E042E478FF972A1E9ADD0@DB7PR07MB5785.eurprd07.prod.outlook.com> (raw)

Hallo,

Recently I have been started exploring the BLE world of hardware and software.

In my quest to find the best SW framework to address BLE hardware I have been confronted with this issue as described here : https://bugreports.qt.io/browse/QTBUG-71727 when trying to use the QT BLE SW stack in use with Nordic BLE nRF52832 hardware.

To summarize my findings:
- When the public device address of the Nordic HW is NOT set, meaning in Linux the hcitool dev or hciconfig tooling will show the ZERO device address meaning 00:00:00:00:00:00 assigned to the HCI adapter/controller. The bluetoothctl tool will show the "random" address different from zero's.
- When running in this case(setup) the QT heartrate-server applic (QT v5.11 on Linux Ubuntu 18), the QT application fails to find the proper HCI adapter as it compares the address found by reading out the HCIdevice address via ioctl (resulting in 00:00:00:00:00:00) and the address retrieved from the BlueZ adapter (DBus) that corresponds to the random address created by Nordic (also the address shown via bluetoothctl). 

So my question is after I have set the "public device address" via the hcitool cmd 0x3f 0x006 BD_ADDRESS, the random address is no longer the random address set by Nordic it has changed into the public address (although when looking via DBUS at the address for the Adapter1, the address type is still set as random) I configured and the QT application will succeed as both addresses will match.

Any idea what is happening in this process.

Thanks in advance,
Best regards,
Frank

                 reply	other threads:[~2018-11-16 10:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=DB7PR07MB57856A83E042E478FF972A1E9ADD0@DB7PR07MB5785.eurprd07.prod.outlook.com \
    --to=f.vieren@televic.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).