Commit Graph

19 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
070c78c426 client/advertising: Add support for advertise.rsi command
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]#
2023-04-05 17:00:00 -07:00
Luiz Augusto von Dentz
4e7780d0eb client/advertising: Add support for setting min/max intervals
This adds support for setting MinInterval/MaxInterval.
2021-05-13 13:26:13 -07:00
Tedd Ho-Jeong An
f22f166d6e client: Add SPDX License Identifier
This patch adds SPDX License Identifier and removes the license text.

-------------------------------------
       License            COUNT
-------------------------------------
 GPL-2.0-or-later     :      11

License: GPL-2.0-or-later
   client/adv_monitor.c
   client/adv_monitor.h
   client/advertising.h
   client/display.c
   client/main.c
   client/display.h
   client/agent.h
   client/gatt.c
   client/agent.c
   client/advertising.c
   client/gatt.h
2020-09-21 16:19:33 -07:00
Luiz Augusto von Dentz
bd0808bf01 client: Add advertise.secondary command
This adds advertose.secondary command which can be used to set a
secondary channel to advertise.
2019-02-21 14:08:52 +02:00
Luiz Augusto von Dentz
806276fe54 client: Add advertise.discoverable-timeout command
This adds advertise.discoverable-timeout command which can be used to
limit the amount of time the advertisement is discoverable:

[bluetooth]# advertise.discoverable on
[bluetooth]# advertise.discoverable-timeout 10
[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
@ MGMT Event: Advertising Added (0x0023) plen 1
        Instance: 1
@ MGMT Event: Command Complete (0x0001) plen 4
      Add Advertising (0x003e) plen 1
        Status: Success (0x00)
        Instance: 1
@ MGMT Command: Add Advertising (0x003e) plen 14
        Instance: 1
        Flags: 0x00000001
          Switch into Connectable mode
        Duration: 0
        Timeout: 0
        Advertising data length: 3
        Flags: 0x00
        Scan response length: 0
2018-05-24 11:09:31 +03:00
Luiz Augusto von Dentz
4f68e5f1fe client: Add advertise.discoverable command
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
2018-05-24 11:09:30 +03:00
Luiz Augusto von Dentz
72c9b97f5e client: Add support for setting advertising Data property
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
2018-05-02 12:01:41 +03:00
ERAMOTO Masaya
4d04b9f573 client: Introduce ad_disable_{uuids,service,manufacturer} 2018-02-19 12:21:11 +02:00
Luiz Augusto von Dentz
5c6ef1c396 client: Rename set-timeout to timeout
Make the command return the current value if no parameters:

[bluetooth]# timeout 1
[bluetooth]# timeout
Timeout: 1 sec
2018-01-19 11:44:09 -02:00
Luiz Augusto von Dentz
f309255a99 client: Rename set-duration to duration
Make the command return the current value if no parameters:

[bluetooth]# duration 1
[bluetooth]# duration
Duration: 1 sec
2018-01-19 11:44:09 -02:00
Luiz Augusto von Dentz
aebb7e1973 client: Rename set-appearance to appearance
Make the command return the current value if no parameters:

[bluetooth]# appearance 0x0001
[bluetooth]# appearance
Appearance: Unknown (0x0001)
2018-01-19 11:44:09 -02:00
Luiz Augusto von Dentz
0c33c99102 client: Rename set-tx-power to tx-power
Make the command return the current value if no parameters:

[bluetooth]# tx-power on
[bluetooth]# tx-power
Tx Power: on
2018-01-19 11:44:09 -02:00
Luiz Augusto von Dentz
0fb2aff316 shared/shell: Use wordexp to parse arguments
This ensures the arguments are parsed properly.
2017-11-17 16:00:19 +02:00
Luiz Augusto von Dentz
068e0ba214 client: Add set-advertise-{duration, timeout}
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
2017-11-02 16:03:41 +02:00
Luiz Augusto von Dentz
a41a625b1d client: Emit PropertiesChanged if advertising changes
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
2017-08-16 13:59:00 +03:00
Luiz Augusto von Dentz
5c3a39e642 client: Enable set-advertise-appearance to set Appearance
This enables set-advertise-appearance to use Appearance property:

[bluetooth]# set-advertise-appearance 128
[bluetooth]# advertise on

@ MGMT Command: Add Advertising (0x003e) plen 15
        Instance: 1
        Flags: 0x00000003
          Switch into Connectable mode
          Advertise as Discoverable
        Duration: 0
        Timeout: 0
        Advertising data length: 4
        Appearance: Computer (0x0080)
        Scan response length: 0
2017-08-10 16:32:09 +03:00
Luiz Augusto von Dentz
177eccc145 client: Enable set-advertise-name to set LocalName
This enables set-advertise-name to use LocalName property:

[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
2017-08-10 16:32:07 +03:00
Luiz Augusto von Dentz
172e68c59f client: Add set-advertise-name and set-advertise-appearance
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
2017-08-10 16:31:42 +03:00
Luiz Augusto von Dentz
3695bd3106 build: Fix missing file
client/main.c:46:25: fatal error: advertising.h: No such file or directory
2016-08-16 15:30:27 +03:00