This adds support for advertise.rsi command which can be used to request
the generation of RSI and include it as part of advertising data:
[bluetooth]# advertise.rsi --help
Show/Enable/Disable RSI to be advertised
Usage:
rsi [on/off]
[bluetooth]# advertise.rsi
RSI: on
[bluetooth]# advertise on
...
Advertising object registered
Tx Power: off
Name: off
Appearance: off
Discoverable: on
RSI: on
[bluetooth]#
This adds advertise.discoverable command which can be used to set it
own instance:
[bluetooth]# advertise.discoverable on
[bluetooth]# advertise on
@ MGMT Command: Add Advertising (0x003e) plen 14
Instance: 1
Flags: 0x00000001
Switch into Connectable mode
Duration: 0
Timeout: 0
Advertising data length: 3
Flags: 0x02
LE General Discoverable Mode
Scan response length: 0
< HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32
Length: 3
Flags: 0x02
LE General Discoverable Mode
This adds data command to advertise menu which can be used to set
an arbitrary/profile specific advertising type and data:
[bluetooth]# data 0x26 0x01 0x01 0x00
This adds the following command which can be used to control the
advertisement intervals:
[bluetooth]# set-advertise-duration 4
[bluetooth]# set-advertise-timeout 4
[bluetooth]# advertise on
[CHG] Controller B8:8A:60:D8:17:D7 SupportedInstances: 0x04
[CHG] Controller B8:8A:60:D8:17:D7 ActiveInstances: 0x01
Advertising object registered
[CHG] Controller B8:8A:60:D8:17:D7 SupportedInstances: 0x05
[CHG] Controller B8:8A:60:D8:17:D7 ActiveInstances: 0x00
This allows bluetoothd to detect changes done by the user without
having to rely on advertise command to unregister and register again:
bluetooth]# set-advertise-name blah
[bluetooth]# advertise on
@ MGMT Command: Add Advertising (0x003e) plen 17
Instance: 1
Flags: 0x00000003
Switch into Connectable mode
Advertise as Discoverable
Duration: 0
Timeout: 0
Advertising data length: 0
Scan response length: 6
Name (complete): blah
[bluetooth]# set-advertise-name bleh
@ MGMT Command: Add Advertising (0x003e) plen 17
Instance: 1
Flags: 0x00000003
Switch into Connectable mode
Advertise as Discoverable
Duration: 0
Timeout: 0
Advertising data length: 0
Scan response length: 6
Name (complete): bleh
set-advertise-appearance enables the use of adapter's appearance in the
scan response:
[bluetooth]# set-advertise-appearance on
[bluetooth]# advertise on
@ MGMT Command: Add Advertising (0x003e) plen 11
Instance: 1
Flags: 0x00000023
Switch into Connectable mode
Advertise as Discoverable
Add Appearance field to Scan Response
Duration: 0
Timeout: 0
Advertising data length: 0
Scan response length: 0
set-advertise-name enables the use of adapter's name/alias in the
scan response:
[bluetooth]# set-advertise-name on
[bluetooth]# advertise on
@ MGMT Command: Add Advertising (0x003e) plen 11
Instance: 1
Flags: 0x00000043
Switch into Connectable mode
Advertise as Discoverable
Add Local Name in Scan Response
Duration: 0
Timeout: 0
Advertising data length: 0
Scan response length: 0