bluez/lib
Luiz Augusto von Dentz 0da5c68413 advertising: Fix attempting to set scan_rsp
BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 4, Part E page 2450

  • If extended advertising PDU types are being used (bit 4 = 0) then:
  The advertisement shall not be both connectable and scannable.

So instead this attempts to set name as part of Advertising Data rather
then setting it as Scan Response:

bluetoothctl> advertise.secondary 2M
bluetoothctl> advertise.name Intel-3
bluetoothctl> advertise on

< HCI Command: LE Set Extended Advertising Parameters (0x08|0x0036) plen 25
        Handle: 0x01
        Properties: 0x0001
          Connectable
        Min advertising interval: 1280.000 msec (0x0800)
        Max advertising interval: 1280.000 msec (0x0800)
        Channel map: 37, 38, 39 (0x07)
        Own address type: Public (0x00)
        Peer address type: Public (0x00)
        Peer address: 00:00:00:00:00:00 (OUI 00-00-00)
        Filter policy: Allow Scan Request from Any, Allow Connect Request from Any (0x00)
        TX power: Host has no preference (0x7f)
        Primary PHY: LE 1M (0x01)
        Secondary max skip: 0x00
        Secondary PHY: LE 2M (0x02)
        SID: 0x00
        Scan request notifications: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 5
      LE Set Extended Advertising Parameters (0x08|0x0036) ncmd 1
        Status: Success (0x00)
        TX power (selected): 7 dbm (0x07)
< HCI Command: LE Set Extended Advertising Data (0x08|0x0037) plen 4
        Handle: 0x01
        Operation: Complete extended advertising data (0x03)
        Fragment preference: Minimize fragmentation (0x01)
        Data length: 0x00
@ MGMT Event: Command Complete (0x0001) plen 7
      Add Extended Advertising Parameters (0x0054) plen 4
        Status: Success (0x00)
        Instance: 1
        TX power: 7 dbm (0x07)
        Available adv data len: 31
        Available scan rsp data len: 31
> HCI Event: Command Complete (0x0e) plen 4
      LE Set Extended Advertising Data (0x08|0x0037) ncmd 1
        Status: Success (0x00)
@ MGMT Command: Add Extended Advertising Data (0x0055) plen 23
        Instance: 1
        Advertising data length: 12
        Name (complete): Intel-3
        Flags: 0x06
          LE General Discoverable Mode
          BR/EDR Not Supported
        Scan response length: 0
< HCI Command: LE Set Extended Advertising Data (0x08|0x0037) plen 16
        Handle: 0x01
        Operation: Complete extended advertising data (0x03)
        Fragment preference: Minimize fragmentation (0x01)
        Data length: 0x0c
        Name (complete): Intel-3
        Flags: 0x06
          LE General Discoverable Mode
          BR/EDR Not Supported
> HCI Event: Command Complete (0x0e) plen 4
      LE Set Extended Advertising Data (0x08|0x0037) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Extended Scan Response Data (0x08|0x0038) plen 4
        Handle: 0x01
        Operation: Complete scan response data (0x03)
        Fragment preference: Minimize fragmentation (0x01)
        Data length: 0x00
> HCI Event: Command Complete (0x0e) plen 4
      LE Set Extended Scan Response Data (0x08|0x0038) ncmd 1
        Status: Success (0x00)
< HCI Command: LE Set Extended Advertising Enable (0x08|0x0039) plen 6
        Extended advertising: Enabled (0x01)
        Number of sets: 1 (0x01)
        Entry 0
          Handle: 0x01
          Duration: 0 ms (0x00)
          Max ext adv events: 0
> HCI Event: Command Complete (0x0e) plen 4
      LE Set Extended Advertising Enable (0x08|0x0039) ncmd 2
        Status: Success (0x00)
@ MGMT Event: Command Complete (0x0001) plen 4
      Add Extended Advertising Data (0x0055) plen 1
        Status: Success (0x00)
        Instance: 1
2022-06-14 13:29:09 -07:00
..
a2mp.h lib: Add SPDX License Identifier 2020-09-21 16:19:34 -07:00
amp.h lib: Add SPDX License Identifier 2020-09-21 16:19:34 -07:00
bluetooth.c lib: Replace malloc/memset(..0..) with bt_malloc0 2020-10-07 15:56:21 -07:00
bluetooth.h monitor/att: Add decoding support for ASE Sink/Source 2022-05-26 13:57:50 -07:00
bluez.pc.in build: Move bluez.pc into the library directory 2012-12-19 18:27:14 +01:00
bnep.h lib: Add SPDX License Identifier 2020-09-21 16:19:34 -07:00
cmtp.h lib: Add SPDX License Identifier 2020-09-21 16:19:34 -07:00
hci_lib.h lib: Add SPDX License Identifier 2020-09-21 16:19:34 -07:00
hci.c lib: fix hci_strtolm crash 2022-02-15 13:31:42 -08:00
hci.h lib: Fix HCI_MAX_ACL_SIZE 2021-09-22 14:32:38 -07:00
hidp.h lib: Add SPDX License Identifier 2020-09-21 16:19:34 -07:00
l2cap.h lib: Add SPDX License Identifier 2020-09-21 16:19:34 -07:00
mgmt.h advertising: Fix attempting to set scan_rsp 2022-06-14 13:29:09 -07:00
rfcomm.h lib: Add SPDX License Identifier 2020-09-21 16:19:34 -07:00
sco.h lib: Add SPDX License Identifier 2020-09-21 16:19:34 -07:00
sdp_lib.h lib: Add SPDX License Identifier 2020-09-21 16:19:34 -07:00
sdp.c lib: Fix the unchecked return value 2020-11-24 13:03:47 -08:00
sdp.h lib: Add SPDX License Identifier 2020-09-21 16:19:34 -07:00
uuid.c uuid: Fix crashing if a NULL string is passed to bt_string_to_uuid 2022-02-09 16:03:45 -08:00
uuid.h gatt: Add support for Central Address Resolution characteristic 2021-07-28 13:44:44 -07:00