Commit Graph

5 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
da3cd9ad24 client: Add set-advertise-tx-power command
This adds set-advertise-tx-power which can be used include TX power
in the advertisement data:

set-advertise-manufacturer <on/off>
[bluetooth]# set-advertise-tx-power on
[bluetooth]# advertise on

@ Advertising Added: 1
< HCI Command: LE Set Aidvertising Data (0x08|0x0008) plen 32
        Length: 6
        Flags: 0x02
          LE General Discoverable Mode
        TX power: 9 dBm
2016-08-16 11:16:03 +03:00
Luiz Augusto von Dentz
c7e97d116a client: Add set-advertise-manufacturer command
This adds set-advertise-manufacturer which can be used set manfacturer
spefic data to be advertised:

set-advertise-manufacturer [id][data=[xx xx ...]
[bluetooth]# set-advertise-manufacturer 0xffff 0x00 0x01 0x02 0x03
[bluetooth]# advertise on

@ Advertising Added: 1
< HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32
        Length: 11
        Flags: 0x02
          LE General Discoverable Mode
        Company: internal use (65535)
          Data: 00010203
2016-08-16 11:16:03 +03:00
Luiz Augusto von Dentz
820a6da585 client: Add set-advertise-service command
This adds set-advertise-service which can be used set UUID data to be
advertised:

set-advertise-service [uuid][data=[xx xx ...]
[bluetooth]# set-advertise-service 180D 0xff 0xff
[bluetooth]# advertise on

@ Advertising Added: 1
< HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32
        Length: 9
        Flags: 0x02
          LE General Discoverable Mode
        Service Data (UUID 0x180d): ffff
2016-08-16 11:16:03 +03:00
Luiz Augusto von Dentz
74433d3976 client: Add set-advertise-uuids command
This adds set-advertise-uuids which can be used set UUIDs to be
advertised:

set-advertise-uuids [uuid1 uuid2...]
[bluetooth]# set-advertise-uuids 180D 180F
[bluetooth]# advertise on

@ Advertising Added: 1
< HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32
        Length: 9
        Flags: 0x02
          LE General Discoverable Mode
        16-bit Service UUIDs (complete): 2 entries
          Heart Rate (0x180d)
          Battery Service (0x180f)
2016-08-16 11:16:03 +03:00
Luiz Augusto von Dentz
6c9e45f965 client: Add advertise command
This adds advertise command which uses org.bluez.LEAdvertisingManager1 to
add an advertising instance:

[bluetooth]# advertise
broadcast   off         on          peripheral
[bluetooth]# advertise on
Advertising object registered

@ Advertising Added: 1
< HCI Command: LE Set Advertising Data (0x08|0x0008) plen 32
        Length: 3
        Flags: 0x02
          LE General Discoverable Mode

[bluetooth]# advertise off
Advertising object unregistered

@ Advertising Removed: 1
< HCI Command: LE Set Advertise Enable (0x08|0x000a) plen 1
        Advertising: Disabled (0x00)
2016-08-16 11:16:03 +03:00