Commit Graph

350 Commits

Author SHA1 Message Date
Łukasz Rymanowski
1c2271575d client: Fix possible stack corruption
DBUS_TYPE_BOOLEAN is 'int', which does not have to be the same size as
'bool'.
On architecture where bool is smaller than in, getting prepare-authorize
will corrupt the stack
2020-05-11 15:26:55 +02:00
Luiz Augusto von Dentz
397cbeb864 client: Make advertise instances default to discoverable
The more common case is that advertisements are discoverable not the
other way around.
2020-04-07 12:52:23 -07:00
Luiz Augusto von Dentz
4ec7da4037 client: Add scan.pattern command
This uses the new Pattern filter:

[bluetooth]# scan.pattern Living
[bluetooth]# scan on
SetDiscoveryFilter success
Discovery started
[CHG] Controller XX:XX:XX:XX:XX:XX Discovering: yes
[NEW] Device XX:XX:XX:XX:XX:XX Living Room TV
2020-02-19 16:25:04 -08:00
Syam Sidhardhan
a64d370949 client: Fix memory leak 2019-12-08 06:08:46 +02:00
Ronan Pigott
d45b4ac3ec client/main: add help option for available args
This option exists to facilitate external completion of commands that
have specially defined arguments. It effectively adds two new commands
to bluetoothctl with the following output:

$ bluetoothctl agent help
on
off
DisplayOnly
DisplayYesNo
KeyboardDisplay
KeyboardOnly
NoInputNoOutput

$ bluetoothctl advertise help
on
off
peripheral
broadcast

Shell completion scripts can then parse this output to provide
completions for those commands.
2019-09-06 10:57:10 +03:00
Luiz Augusto von Dentz
19329b3f68 client: Fix not able to select attributes if parent exists
When selecting attributes by UUID the code was not checking attributes
that are not a children of the current selected attribute.
2019-08-20 16:47:29 +03:00
Luiz Augusto von Dentz
31d7430759 client: Allow UUID 16 bits on select-attribute
This allow passing UUIDs on 16 bits format.
2019-08-20 16:47:29 +03:00
Luiz Augusto von Dentz
b723fafbbe client: Fix crash when setting advertising.discoverable on
DBUS_TYPE_BOOLEAN expect a pointer to dbus_bool_t not bool.
2019-05-10 14:58:09 +03:00
Luiz Augusto von Dentz
bbfaae247f client: Fix build with older version on libdbus
This fixes the following error when building with older version of
D-Bus:

client/gatt.c:2973: undefined reference to `dbus_message_iter_get_element_count'
2019-02-26 19:24:40 +02:00
Luiz Augusto von Dentz
d705d726c6 client: Print AdvertisingManager properties on command 'show'
This outputs the AdvertisingManager properties command 'show':

bluetoothctl> show
...
Advertising Features:
	ActiveInstances: 0x00
	SupportedInstances: 0x05
	SupportedIncludes: tx-power
	SupportedIncludes: appearance
	SupportedIncludes: local-name
2019-02-21 14:08:57 +02: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
64438092cb client: Fix uninitialized error
trusted should be initialized with false since the property may not be
available.
2019-02-13 17:09:13 +02:00
Luiz Augusto von Dentz
15cbd14aaa client: Improve logging of GATT operations
This prints the UUID along with attribute path and also print the
hexdump when payload is available.
2019-02-13 17:09:13 +02:00
Luiz Augusto von Dentz
f12dc48511 client: Forward notifications from cloned attributes
Notifications come in a form of 'Value' property changes thus this
copies the values to the local attribute so they are in sync.
2019-02-13 17:09:13 +02:00
Luiz Augusto von Dentz
40ebc70dae client: Remove cloned services if the proxy is removed
This unregister the cloned services if the proxy is removed since they
would no longer be accessible.
2019-02-13 17:09:13 +02:00
Luiz Augusto von Dentz
8ba5b4fb21 client: Proxy calls to StartNotify/StopNotify
This uses the proxies created by clone command to forward the
subscriptions to the cloned services.
2019-02-13 17:09:13 +02:00
Luiz Augusto von Dentz
32232aba53 client: Proxy calls to ReadValue and WriteValue
This uses the proxies created by clone command to forward the requests
to the cloned services.
2019-02-13 17:09:13 +02:00
Luiz Augusto von Dentz
183d47c176 client: Add gatt.clone command
This adds clone command to gatt submenu which can be use to clone
services as follow:

Clone all services from the connected device:
> gatt.clone

Clone a given service
> gatt.select-attribute <attribute/uuid>
> gatt.clone

In either case there is a prompt to confirm since this may add a lot of
service the user must confim before proceding.

Then finally:

> gatt.register-application
2019-02-13 17:09:13 +02:00
Luiz Augusto von Dentz
db15160d5c client: Add type to write command
This enables setting the write type as optional third parameter:

write <data=xx xx ...> [offset] [type]

The type can be used to force a specific procedure to be used, for
example to force reliable writes one can enter:

> write 00 0 reliable
2019-02-11 11:29:21 +02:00
Luiz Augusto von Dentz
b52543ae3d client: Don't expose pointer value in attribute path
Instead use the position in the list to create a unique path:

[bluetooth]# register-service 0x1820
[NEW] Primary Service (Handle 0x0000)
	/org/bluez/app/service0
	0x1820
	Internet Protocol Support
2019-01-31 14:10:56 +02:00
Luiz Augusto von Dentz
d5cb29ce5a client: Enable list-attributes to print local attributes
This enable passing "local" to list-attributes to print the attributes
registered locally:

> list-attributes local
Primary Service (Handle 0x0400)
	/org/bluez/app/service0x74ccb0
	0x1820
	Internet Protocol Support
2019-01-31 14:10:54 +02:00
Luiz Augusto von Dentz
918f6f932b client: Enable setting attribute handles
This emulates application setting their attribute handles.
2019-01-31 14:10:51 +02:00
Luiz Augusto von Dentz
ae63206ff8 client: Enable Handle property for GATT attributes
This enable bluetoothd to write back the actual value of attribute
handles.
2019-01-31 14:10:50 +02:00
Marcel Holtmann
261948090e build: Move declaration of _GNU_SOURCE back into individual source files 2018-12-06 21:28:18 +01:00
Luiz Augusto von Dentz
91df85690c client: Switch from write to sendmsg for Acquire*
Use sendmsg with MSG_NOSIGNAL to prevent crashes involving SIGPIPE.
2018-11-20 11:28:29 +02:00
Luiz Augusto von Dentz
847dcb2a6c client: Fix not resetting filters on scan.clear
If call to SetDiscoveryFilter comes with any value set the daemon will
not attempt to clear the filters, instead the client is suppose to send
an empty dict.
2018-08-01 14:55:40 +03:00
Luiz Augusto von Dentz
151a80b6ac client: Commit changes to scan filter if active
This detects if the command scan has been triggered and if so commit
changes to filter immediately so they take effect in the current
session.
2018-08-01 14:55:40 +03:00
Luiz Augusto von Dentz
9a57d90628 client: Add scan.clear discoverable
This implements scan.clear for discoverable filter.
2018-08-01 14:55:39 +03:00
Luiz Augusto von Dentz
170ff3b81f client: Add scan.discoverable command
This adds discoverable command to scan menu which can be used to set
if adapter should become discoverable while scanning:

[bluetooth]# scan.discoverable on
[bluetooth]# scan on
SetDiscoveryFilter success
[CHG] Controller XX:XX:XX:XX:XX:XX Discoverable: yes
Discovery started
[CHG] Controller XX:XX:XX:XX:XX:XX Discovering: yes
[bluetooth]# scan off
Discovery stopped
[CHG] Controller XX:XX:XX:XX:XX:XX Discoverable: no
2018-08-01 14:55:39 +03:00
Luiz Augusto von Dentz
ee863d9d5d client: Make show command print DiscoverableTimeout
Controller XX:XX:XX:XX:XX:XX (public)
	Name: Vudentz's T460s
	Alias: Intel-1
	Class: 0x004c010c
	Powered: yes
	Discoverable: no
	DiscoverableTimeout: 0x00000000
	Pairable: yes
	UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)
	UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
	UUID: SIM Access                (0000112d-0000-1000-8000-00805f9b34fb)
	UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
	UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
	UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
	UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
	Modalias: usb:v1D6Bp0246d0532
	Discovering: no
2018-07-30 09:36:27 +03:00
Luiz Augusto von Dentz
2796d545e8 client: Add discoverable-timeout command
This adds discoverable-timeout command which can be used to get/set
DiscoverableTimeout property:

[bluetooth]# discoverable-timeout 180
Changing discoverable-timeout 180 succeeded
2018-07-30 09:36:23 +03:00
Grzegorz Kolodziejczyk
1e32752f38 client: Don't require authorization for trusted devices
This patch adds possibility to ommit authorization request from trusted
devices.
2018-05-29 14:06:34 +03:00
Grzegorz Kolodziejczyk
822f082063 client: Add authorized property handling to characteristic attribute
This patch adds handling of characteristic prepare write authorized
property to bluetoothctl.
2018-05-28 16:29:11 +03: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
e8f51b980c client: Print AD Data and Discoverable once registered
This prints both Data and Discoverable if advertise command succeeds:

[bluetooth]# advertise.data 0x26 0x01 0x00
[bluetooth]# advertise.discoverable on
[bluetooth]# advertise on
Advertising object registered
Data Type: 0x26
  01 00                                            ..
Tx Power: off
Name: off
Apperance: off
Discoverable: on
2018-05-24 11:09:30 +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
8cfef5aa0c client: Fix use of g_free
g_free shall only be used with pointer allocated with g_* functions.
2018-05-21 11:35:06 +03:00
Avichal Agarwal
8f970c44e6 client/gatt : Add support for Included Service
included service support implemented at service registration
2018-05-21 11:30:05 +03:00
Nagaraj D R
454fdfb541 Fix possible invalid memory access
Uninitialized data is read from local variable 'addr'
2018-05-21 11:28:43 +03:00
Grzegorz Kolodziejczyk
d2277dfa5f client: Define maximum attribute value length as initial value
Initial registered attribute value is set as maximal attribute length.
2018-05-21 11:09:30 +03:00
Grzegorz Kolodziejczyk
48dd3a49fb client: Add missing duplicated string free
This patch free duplicated strings in read, write attribute callbacks.
2018-05-21 11:09:29 +03:00
Luiz Augusto von Dentz
884fe6c82c client: Make info command print Advertising{Flags,Data} 2018-05-02 12:01:50 +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
Grzegorz Kolodziejczyk
7f9dcb3c45 client: Add support for optional gatt write offset parameter
This patch extends missing optional gatt write offset parameter.
2018-04-26 15:53:38 +03:00
Grzegorz Kolodziejczyk
5d50dc020b client: Add support for optional gatt read offset parameter
This patch extends missing optional gatt read offset parameter.
2018-04-26 15:53:37 +03:00
Grzegorz Kolodziejczyk
1dd33d584c client: Fix writing attribute values
Attribute values is not copied with dbus_message_iter_get_fixed_array,
so gatt write callback needs to replace old value with reallocation and
copy.
2018-04-26 15:53:37 +03:00
Luiz Augusto von Dentz
9f1388f2cf client: Attempt to convert the device path to address
Printing the object path is not only long but it also may change.
2018-03-29 14:10:25 +03:00
Luiz Augusto von Dentz
650a0d814a client: Add envs for proxies
This adds envs for device and adapter proxies found so other files are
able to access them.
2018-03-29 14:10:25 +03:00
ERAMOTO Masaya
14388c1d94 client: Return exit status for non-interactive 2018-03-27 13:58:17 +03:00
Luiz Augusto von Dentz
db663b1d57 client: Parse all options passed for GATT attribute
This parses the options given to Acquire*, WriteValue and ReadValue.
2018-03-26 16:19:29 +03:00
ERAMOTO Masaya
76d29b9bad client: Fix stay on error handling in non-interactive
Returns the FAILURE status since there is no meaning of stay in
non-interactive mode when executing some commands with an invalid
argument or with no controller. Also returns with the SUCCESS status
when getting a scan filtering value or disconnecting a non-default
device.
2018-03-23 13:19:04 +02:00
Grzegorz Kolodziejczyk
d3f155e458 client: Add authorization request handling for attribute operations
This patch adds optional authorization request for reading, writing of
gatt database attributes.
2018-03-21 11:25:52 +01:00
Grzegorz Kolodziejczyk
bc6facb0cf client: Update read callbacks with invalid offset error handlers
This patch adds invalid offset handlers to read callbacks of attributes.
2018-03-21 10:47:07 +01:00
Grzegorz Kolodziejczyk
1abee58711 client: Fix reading long values
While value has more than single MTU can carry long read procedure will
be triggered. In such cases offset need to bo considered while getting
value from storage.
2018-03-21 10:47:07 +01:00
Luiz Augusto von Dentz
41465ce57c client: Fix lines going beyond 80 columns 2018-03-01 11:23:09 +02:00
ERAMOTO Masaya
237365998f client: Use g_dbus_dict_append_*() 2018-03-01 10:49:05 +02:00
Luiz Augusto von Dentz
936ad5ef7b client: Quit when done with command
This ensures that the commands don't stay hanging since bt_shell no
longer quits immediatelly after executing a command.
2018-02-28 16:17:13 +02:00
Luiz Augusto von Dentz
fd656b1ce3 client: Don't auto register agent on non-interactive mode
There is no use to register an agent when on non-interactive mode.
2018-02-22 11:52:16 +02:00
ERAMOTO Masaya
9c90fc508d client: Add clear command for advertise
Adds the clear command to advertise-related commands to clear individual
fields or whole of advertise configuration.
2018-02-19 12:21:11 +02:00
ERAMOTO Masaya
4d04b9f573 client: Introduce ad_disable_{uuids,service,manufacturer} 2018-02-19 12:21:11 +02:00
ERAMOTO Masaya
f0fccd6f4d client: Introduce data_clear() calling ->clear() 2018-02-19 12:21:11 +02:00
ERAMOTO Masaya
0540ff6339 client: Improve help messages for advertise 2018-02-19 12:21:11 +02:00
ERAMOTO Masaya
3df943537a client: Fix data growth if reconfiguring ad service
Since commit 65eff5c2 ("client: Rename set-service to service"), data
are appended in every run of advertise service with data arguments as
below:

  [bluetooth]# service 1 1 2
  [bluetooth]# service
  UUID: SDP(1)
    01 02                                            ..
  [bluetooth]# service 1 1 2 3
  [bluetooth]# service
  UUID: SDP(1)
    01 02 01 02 03                                   .....
2018-02-19 12:21:11 +02:00
ERAMOTO Masaya
7c6d0647ee client: Not output ad service info if no uuid sets 2018-02-19 12:21:11 +02:00
ERAMOTO Masaya
3de5807a53 client: Fix null output for ad service uuid
If getting the advertise service information without setting, outputs
null as UUID as below:

  [bluetooth]# service
  UUID: ((null))
2018-02-19 12:21:11 +02:00
Luiz Augusto von Dentz
17c8980ad3 client: Fix not cleaning up notify pipe
If remote unsubscribe, disconnects or the daemon closes the socket the
io shall be destroyed properly otherwise it will prevent new
subscriptions.
2018-02-06 09:54:13 -02:00
Luiz Augusto von Dentz
36e0a8f817 client: Don't set generators for modes
Commands that already have all values set on the argument string don't
need to add a generator since bt_shell can now auto complete them.
2018-02-06 09:54:13 -02:00
Luiz Augusto von Dentz
0c8e542c4d client: Print advertising details
Print advertising details when active.
2018-01-19 11:44:09 -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
821ad2ecd4 client: Rename set-name to name
Make the command return the current value if no parameters:

[bluetooth]# name blah
[bluetooth]# name
LocalName: blah
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
045e6b9a10 client: Rename set-manufacturer to manufacturer
Make the command return the current value if no parameters:

[bluetooth]# manufacturer 2 00
[bluetooth]# manufacturer
Manufacturer: 2
  00
2018-01-19 11:44:09 -02:00
Luiz Augusto von Dentz
65eff5c2eb client: Rename set-service to service
Make the command return the current value if no parameters:

[bluetooth]# service 0x1820 00 00 00
[bluetooth]# service
	UUID: Internet Protocol Support (0x1820)
  00 00 00                                         ...
2018-01-19 11:44:09 -02:00
Luiz Augusto von Dentz
6f20dba32d client: Rename set-uuids to uuids
Make the command return the current value if no parameters:

[bluetooth]# uuids 0x1820
[bluetooth]# uuids
UUID: Internet Protocol Support (0x1820
2018-01-19 11:44:09 -02:00
Luiz Augusto von Dentz
7b0e377b0d client: Fix register-{characteristic, descriptor}
Flags parameter should be found in the third parameter not the second
since bt_shell don't omit the command anymore.
2018-01-16 17:02:53 -02:00
Luiz Augusto von Dentz
d80f68286c client: Remove use of double const argument 2018-01-02 14:19:26 -02:00
ERAMOTO Masaya
203f5cb2f0 client: Use g_dbus_proxy_path_lookup() 2018-01-02 14:15:54 -02:00
ERAMOTO Masaya
6bf4c63d66 client: Use g_dbus_proxy_lookup() 2018-01-02 14:15:46 -02:00
Luiz Augusto von Dentz
7a03b61ee8 tools: Remove monitor/uuid.{c,h}
Use the shared/util.h helpers instead.
2017-12-21 10:08:22 -02:00
Szymon Janc
6c91d28459 client: Print Address type in show and info commands 2017-12-19 12:59:19 +01:00
Luiz Augusto von Dentz
a157235d66 client: Only set the discovery filter when necessary
Only set the discovery filter when the user wants execute the scan
command.
2017-12-16 16:53:50 +01:00
Luiz Augusto von Dentz
093768cd10 client: Add generator for scan:clear
This adds tab generator for scan:clear:

[bluetooth]# clear
duplicate-data  pathloss        rssi            transport       uuids
2017-12-16 16:50:05 +01:00
Luiz Augusto von Dentz
b80e11bf5c client: Make scan:clear clear individual fields
This reintroduces the option to clear individual fields which was
removed when redesining the commands which now read the fields when
no arguments are provided.
2017-12-16 16:50:04 +01:00
Luiz Augusto von Dentz
94c0774c31 client: Group discovery filter variables into a struct
This should be easier to read and maintain.
2017-12-16 16:50:03 +01:00
Luiz Augusto von Dentz
902ff0e049 client: Fix command scan:clear
Command clear shall clear all filters including DuplicateData.
2017-12-14 16:31:23 -02:00
Luiz Augusto von Dentz
3d15298157 client: Rename set-filter-clear to clear
All commands under scan submenu are related to set-filter so remove its
portion from it and make the command return the current value if no
parameters.
2017-12-14 16:31:23 -02:00
Luiz Augusto von Dentz
cd2dcedfc9 client: Rename set-filter-duplicate-data to duplicate-data
All commands under scan submenu are related to set-filter so remove its
portion from it and make the command return the current value if no
parameters:

[bluetooth]# duplicate-data on
SetDiscoveryFilter success
[bluetooth]# duplicate-data
DuplicateData: on
2017-12-14 16:31:23 -02:00
Luiz Augusto von Dentz
745918dfe2 client: Rename set-filter-transport to transport
All commands under scan submenu are related to set-filter so remove its
portion from it and make the command return the current value if no
parameters:

[bluetooth]# transport le
SetDiscoveryFilter success
[bluetooth]# transport
Transport: le
2017-12-14 16:31:23 -02:00
Luiz Augusto von Dentz
5ed59502c2 client: Rename set-filter-pathloss to pathloss
All commands under scan submenu are related to set-filter so remove its
portion from it and make the command return the current value if no
parameters:

[bluetooth]# pathloss 0
SetDiscoveryFilter success
[bluetooth]# pathloss
Pathloss: 0
2017-12-14 16:31:23 -02:00
Luiz Augusto von Dentz
4a6a055681 client: Rename set-filter-rssi to rssi
All commands under scan submenu are related to set-filter so remove its
portion from it and make the command return the current value if no
parameters:

[bluetooth]# rssi 0
SetDiscoveryFilter success
[bluetooth]# rssi
RSSI: 0
2017-12-14 16:31:23 -02:00
Luiz Augusto von Dentz
e1021f7e48 client: Rename set-filter-uuids to uuids
All commands under scan submenu are related to set-filter so remove its
portion from it and make the command return the current value if no
parameters:

[bluetooth]# uuids 0x1820
SetDiscoveryFilter success
[bluetooth]# uuids
	UUID: Internet Protocol Support (0x1820)

Note that to filter all UUIDs user must now use "all" instead of empty
list.
2017-12-14 16:31:23 -02:00
Szymon Janc
34553c1f74 client: Fix printing of array properties
ServiceData Key: 00001234-0000-1000-8000-00805f9b34fb
        ServiceData Value:
"3D     RSSI: -76
        TxPower: -7
2017-12-14 09:22:22 +01:00
Luiz Augusto von Dentz
8c60a31651 client: Add description for submenus
This adds proper descriptions for each submenu.
2017-12-13 10:08:38 -02:00
Luiz Augusto von Dentz
7c16c4044d shell: Add bt_shell_opt
Make use of struct option and getopt_long to parse the options given.
2017-12-08 13:06:19 +02:00
Luiz Augusto von Dentz
ab41d6df80 client: Fix arguments of set-filter-clear
Commands with no arguments shall use NULL not empty string.
2017-12-08 13:06:17 +02:00
Luiz Augusto von Dentz
8edcc31fa2 shared/shell: Don't remove command from arguments
Maintain the original argc and argv so the callback has a chance to
parse the command if it has to.
2017-12-08 13:06:11 +02:00
ERAMOTO Masaya
5e7ad41d08 shared/shell: Fix no version output with option
bluetoothctl does output the following error message with the option
-v/--version.

  $ bluetoothctl --version
  Unknown option --version
2017-12-05 16:18:57 -02:00
Luiz Augusto von Dentz
7cf75e0ca6 client: Fix format of arguments of set-service and set-manufacturer
Optional arguments should contain only one set of '[' ']' otherwise
wordexp won't be able to parse it.
2017-11-28 11:02:32 +02:00