| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows gatt.select-attribute local to select from the registered
attributes:
[bluetooth]# gatt.select-attribute local /org/bluez/app/service0/chrc0
[/org/bluez/app/service0/chrc0]# gatt.write 0x01
[CHG] Attribute /org/bluez/app/service0/chrc0 (%UUID) written
[/org/bluez/app/service0/chrc0]# gatt.read
01 .
[/org/bluez/app/service0/chrc0]# gatt.select-attribute local
/org/bluez/app/service0/chrc1
[/org/bluez/app/service0/chrc1]# gatt.write 0x01
[CHG] Attribute /org/bluez/app/service0/chrc1 (%UUID) written
[/org/bluez/app/service0/chrc1]# gatt.read
01 .
[/org/bluez/app/service0/chrc1]#
|
|
|
|
|
|
|
|
|
| |
This fixes the following warning:
client/gatt.c:2146:2: warning: Null pointer passed to 2nd parameter
expecting 'nonnull' [core.NonNullParamChecker]
memcpy(*dst_value + offset, src_val, src_len);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
| |
The passed iterator can be NULL as in
gdbus/client.c::properties_changed():
...
proxy->prop_func(..., ..., iter=NULL, ...)
+--client/gatt.c::proxy_property_changed(..., ..., iter, ...);
+--dbus_message_iter_get_arg_type(iter);
...
|
|
|
|
|
| |
When notifications are enabled/disable the output was not print a new
line.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While performing the static tool analysis using coverity tool
found following reports
Error: RESOURCE_LEAK (CWE-772):
bluez-5.64/client/gatt.c:1531: leaked_storage: Variable "service"
going out of scope leaks the storage it points to.
Error: RESOURCE_LEAK (CWE-772):
bluez-5.64/client/gatt.c:2626: leaked_storage: Variable "chrc"
going out of scope leaks the storage it points to.
Error: RESOURCE_LEAK (CWE-772):
bluez-5.64/client/gatt.c:2906: leaked_storage: Variable "desc"
going out of scope leaks the storage it points to.
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces the uses of g_memdup with util_memdup since the former has
been deprecated:
warning: ‘g_memdup’ is deprecated: Use 'g_memdup2' instead
[-Wdeprecated-declarations]
g_memdup2 requires bumping glib version which would likely have its
own problems thus why util_memdup was introduced.
|
|
|
|
|
| |
g_dbus_emit_property_changed was not working properly in the WriteValue
for the descriptor because the Characteristic interface was being used.
|
|
|
|
|
| |
This patch fixes the uninitiailzed varialble(CWE-457) reported by
the Coverity scan.
|
|
|
|
|
|
| |
atoi doesn't support values entered in hexadecimal (0x...) which is
likely the prefered format for the likes of handles, etc, so this
replaces the uses of atoi with strtol.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
This patch adds invalid offset handlers to write callbacks of attributes.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
When selecting attributes by UUID the code was not checking attributes
that are not a children of the current selected attribute.
|
|
|
|
| |
This allow passing UUIDs on 16 bits format.
|
|
|
|
|
|
|
| |
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'
|
|
|
|
|
| |
trusted should be initialized with false since the property may not be
available.
|
|
|
|
|
| |
This prints the UUID along with attribute path and also print the
hexdump when payload is available.
|
|
|
|
|
| |
Notifications come in a form of 'Value' property changes thus this
copies the values to the local attribute so they are in sync.
|
|
|
|
|
| |
This unregister the cloned services if the proxy is removed since they
would no longer be accessible.
|
|
|
|
|
| |
This uses the proxies created by clone command to forward the
subscriptions to the cloned services.
|
|
|
|
|
| |
This uses the proxies created by clone command to forward the requests
to the cloned services.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
This emulates application setting their attribute handles.
|
|
|
|
|
| |
This enable bluetoothd to write back the actual value of attribute
handles.
|
| |
|
|
|
|
| |
Use sendmsg with MSG_NOSIGNAL to prevent crashes involving SIGPIPE.
|
|
|
|
|
| |
This patch adds possibility to ommit authorization request from trusted
devices.
|
|
|
|
|
| |
This patch adds handling of characteristic prepare write authorized
property to bluetoothctl.
|
|
|
|
| |
included service support implemented at service registration
|
|
|
|
| |
Initial registered attribute value is set as maximal attribute length.
|
|
|
|
| |
This patch free duplicated strings in read, write attribute callbacks.
|
|
|
|
| |
This patch extends missing optional gatt write offset parameter.
|
|
|
|
| |
This patch extends missing optional gatt read offset parameter.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Printing the object path is not only long but it also may change.
|
|
|
|
| |
This parses the options given to Acquire*, WriteValue and ReadValue.
|
|
|
|
|
| |
This patch adds optional authorization request for reading, writing of
gatt database attributes.
|
|
|
|
| |
This patch adds invalid offset handlers to read callbacks of attributes.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This ensures that the commands don't stay hanging since bt_shell no
longer quits immediatelly after executing a command.
|
|
|
|
|
|
| |
If remote unsubscribe, disconnects or the daemon closes the socket the
io shall be destroyed properly otherwise it will prevent new
subscriptions.
|
|
|
|
|
| |
Flags parameter should be found in the third parameter not the second
since bt_shell don't omit the command anymore.
|
| |
|
| |
|
|
|
|
| |
Use the shared/util.h helpers instead.
|
|
|
|
|
| |
Maintain the original argc and argv so the callback has a chance to
parse the command if it has to.
|