Re: Advertising api, bluez sends empty scan response

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> wrote:
> Hi,
>
> On Thu, Jul 9, 2015 at 3:15 PM, dogan yazar <doganyazar@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux