From: dogan yazar <doganyazar@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: Advertising api, bluez sends empty scan response
Date: Thu, 9 Jul 2015 17:20:27 +0200 [thread overview]
Message-ID: <CANzaTi4dRy_bLKc5BNPdyK2wVm6crq8bS8UaSrecwZ6gLqY7HQ@mail.gmail.com> (raw)
In-Reply-To: <CABBYNZJwwEnyNw-D1i38xJjPsmujz+C_E5t3NqXB-G8rM8N_SQ@mail.gmail.com>
Hi Luiz,
I tried with 2 BT 4.0 dongles both of which have the same problem. And
instead of running example-advertisement, if I run the following
commands 2 commands manually, it works fine and I can discover and
connect to my device:
hcitool -i hci0 cmd 0x08 0x0008 3 02 01 05
hciconfig hci0 leadv
So I only have problem with the dbus advertising api. Copying the
commands and output from btmon below. example-advertisement does not
seem to set and advertisement data at all.
//Run example-advertisement
< HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1
[hci0] 7.258091
Advertising: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4 [hci0] 7.259431
LE Set Advertise Enable (0x08|0x000a) ncmd 1
Status: Success (0x00)
< HCI Command: LE Set Advertising Parameters (0x08|0x0006) plen 15
[hci0] 7.259540
Min advertising interval: 1280.000 msec (0x0800)
Max advertising interval: 1280.000 msec (0x0800)
Type: Connectable undirected - ADV_IND (0x00)
Own address type: Public (0x00)
Direct address type: Public (0x00)
Direct address: 00:00:00:00:00:00 (OUI 00-00-00)
Channel map: 37, 38, 39 (0x07)
Filter policy: Allow Scan Request from Any, Allow Connect
Request from Any (0x00)
> HCI Event: Command Complete (0x0e) plen 4 [hci0] 7.260346
LE Set Advertising Parameters (0x08|0x0006) ncmd 1
Status: Success (0x00)
< HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1
[hci0] 7.260444
Advertising: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4 [hci0] 7.261344
LE Set Advertise Enable (0x08|0x000a) ncmd 1
Status: Success (0x00)
//hcitool -i hci0 cmd 0x08 0x0008 3 02 01 05
< HCI Command: LE Set Advertising Data (0x08|0x0008) plen 4
[hci0] 288.328182
invalid packet size
03 02 01 05 ....
> HCI Event: Command Complete (0x0e) plen 4 [hci0] 288.329444
LE Set Advertising Data (0x08|0x0008) ncmd 1
Status: Success (0x00)
//hciconfig hci0 leadv
< HCI Command: LE Set Advertising Parameters (0x08|0x0006) plen 15
[hci0] 343.872012
Min advertising interval: 1280.000 msec (0x0800)
Max advertising interval: 1280.000 msec (0x0800)
Type: Connectable undirected - ADV_IND (0x00)
Own address type: Public (0x00)
Direct address type: Public (0x00)
Direct address: 00:00:00:00:00:00 (OUI 00-00-00)
Channel map: 37, 38, 39 (0x07)
Filter policy: Allow Scan Request from Any, Allow Connect
Request from Any (0x00)
> HCI Event: Command Complete (0x0e) plen 4 [hci0] 343.872852
LE Set Advertising Parameters (0x08|0x0006) ncmd 1
Status: Success (0x00)
< HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1
[hci0] 343.880238
Advertising: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4 [hci0] 343.880842
LE Set Advertise Enable (0x08|0x000a) ncmd 1
Status: Success (0x00)
On Thu, Jul 9, 2015 at 2:45 PM, Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
> Hi,
>
> On Thu, Jul 9, 2015 at 3:15 PM, dogan yazar <doganyazar@gmail.com> wrote:
>> Hello,
>> I am using Bluez 5.32 on kernel 4.1.
>>
>> When I run advertisement-example, bluez successfully sends
>> advertisement but then as an answer to scan request it sends an empty
>> scan response.
>>
>> Any idea what can be the problem?
>
> Could you please add the trace, iirc BlueZ only set the scan data so
> it is up to the controller to generate the scan response not the host
> stack so perhaps there is something wrong with your controller.
>
>
> --
> Luiz Augusto von Dentz
next prev parent reply other threads:[~2015-07-09 15:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-09 12:15 Advertising api, bluez sends empty scan response dogan yazar
2015-07-09 12:45 ` Luiz Augusto von Dentz
2015-07-09 15:20 ` dogan yazar [this message]
2015-07-09 15:32 ` dogan yazar
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=CANzaTi4dRy_bLKc5BNPdyK2wVm6crq8bS8UaSrecwZ6gLqY7HQ@mail.gmail.com \
--to=doganyazar@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/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.