linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "sayandasgupta12@gmail.com" <sayandasgupta12@gmail.com>
To: Bluez mailing list <linux-bluetooth@vger.kernel.org>
Subject: BT slave and BLE peripheral simultaneous discovery issue
Date: Thu, 28 Mar 2019 00:25:08 +0530	[thread overview]
Message-ID: <CAF6QkFJ60hg3qCwEaak9Kyg42qVXBxMietqzAaqAwpHLV9iuSw@mail.gmail.com> (raw)

Hello,

I am currently using blueZ5.43 on my device.
My device is currently running on linux-3.10 kernel.
We are currently using Both BT classic and ble.
We are presenlty using SPP profile by running the rfcomm utilty.
We are playing the slave role in SPP and listening to any SPP incoming
connection.
Similarly we have written some custom GATT service, which we added to
the list of core gatt_services which are registered when the
bluetoothd comes up.
For other devices to connect to our SPP slave we are doing "hciconfig
hci0 piscan".
Also for other devices to connect to our GATT service we are doing BLE
advertising.
In the advertising data we are setting the "Complete Local Name" as
"XXXXXXXXX_XXXXXX"(just putting wild characters instead of actual name
we used in our case).
We set the device name as "XXXXXXXXX_XXXXXX_BT" in
/etc/bluetooth/bluetooth.conf and the bluetoothd sets the device name
the same when it comes up.

We are running the bluetoothd with --compat option so that the sdptool
adds the SPP profile.

With this setup when we are discovering the device from any other
device (Like windows 10 machine or from Android device).

We are seeing sometimes the device shows up with "XXXXXXXXX_XXXXXX_BT"
and sometimes the device shows up with "XXXXXXXXX_XXXXXX" and this
continues to happen with only one visible at a time.

if we try to connect and pair with "XXXXXXXXX_XXXXXX" it sends a GATT
Connect request and subsequently pairs and does GATT discovery but
doesn't discover SPP.

if we try to connect and pair with "XXXXXXXXX_XXXXXX_BT" it sends a
accept connection request, and subsequenlty pairs and does SDP
discovery and the SPP shows up on a particular BT serial port

Based on the above points following are my question:

1)Why scanning of the device is showing separate entries for BLE and BT classic.
2)Is there a way to make our device visible to outside world, where it
will only appear once in the scanned list of the other devices and
discover both GATT as well as SPP profile?

Any suggestions would be helpful.

Thanks.

                 reply	other threads:[~2019-03-27 18:55 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=CAF6QkFJ60hg3qCwEaak9Kyg42qVXBxMietqzAaqAwpHLV9iuSw@mail.gmail.com \
    --to=sayandasgupta12@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 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).